From patchwork Sun Sep 18 18:59:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrej Krutak X-Patchwork-Id: 9338381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8478B607D0 for ; Sun, 18 Sep 2016 22:26:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E2C128D14 for ; Sun, 18 Sep 2016 22:26:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4985828D16; Sun, 18 Sep 2016 22:26:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7346528D14 for ; Sun, 18 Sep 2016 22:26:38 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A47FC266ADE; Mon, 19 Sep 2016 00:26:37 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E782A266ABB; Mon, 19 Sep 2016 00:24:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2113326155B; Sun, 18 Sep 2016 21:01:06 +0200 (CEST) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by alsa0.perex.cz (Postfix) with ESMTP id 0A49126680E for ; Sun, 18 Sep 2016 21:00:58 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id l132so10516414wmf.1 for ; Sun, 18 Sep 2016 12:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=eODtn2m6J6ZI+4DC9ltjV+3K82RYP+zZAAR20hT9/5Y=; b=KgrdQJZfGyuMnLFM4xFZpA20DZKVo5daa+vMbQoKeusIE0L1g1AQMWnUUF73b2yAE6 LSDmtxbX4Lcb6H5bEPjuPGRxJV5YV8hFZiTikPHp0/azunxd48OlUR693d8ehT3zRLoy zXcIpfgT4DKeQN5IOAmC3bqY/TLhDB7OnoQRkb7egiBEbOd98cKwYIho4crz6joqd2pp XR4ifvYca2zCJhnj9sOVP1mZUzZBvyCFpIG4k2+pUXRoehbyOQ8KqXRqzwPDoCJ2U6eP HDRlKROa+9tE7bXPW9SVVgdBJS+EeALG/5J6a7Z8KlYthRvYHAREs2YSW3veggx4nuAx 8+3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=eODtn2m6J6ZI+4DC9ltjV+3K82RYP+zZAAR20hT9/5Y=; b=jqLZoOSh+98o6+Y/OVdAxH82UUDD+BJgSZpx8Rc070NhD5CMda/x7tOxyeFD920ILB MX+uaptuQhrqRjrhzhTd7EmQw7ZVh9RGYlzuTn5byC2egITepDj/Epr+5k8e7/1w3EGc S/kX6062MZHMo8VvILQReRdCNn35hY5fnfVLtawHhLScwcA/f3bSIOgzSrUzuMTXw3qQ VhyhS0hsy6nRzTYHm4Lrsl1LLMR+Sw123TnlqU7QxODjz0Z7VptSRyLP3JboYZPpzxuu fDBnB07Tyx68DX+kLh2suvL0/XEyrCYDp+YJCfHtdveHpEcyoQ+ClOCx9T99NukkD1Ee FF7g== X-Gm-Message-State: AE9vXwOex3zT6Cw1Dq87Amh23wtlhZBYDQBDvg/dISnIAo7a9xOFedQjmjU8qgoqEU3U6A== X-Received: by 10.28.97.69 with SMTP id v66mr5820946wmb.12.1474225258584; Sun, 18 Sep 2016 12:00:58 -0700 (PDT) Received: from andree.lan ([217.30.74.231]) by smtp.gmail.com with ESMTPSA id 142sm18158112wmh.12.2016.09.18.12.00.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 12:00:57 -0700 (PDT) From: Andrej Krutak To: tiwai@suse.com, perex@perex.cz, stefanha@gmail.com, grabner@icg.tugraz.at, alsa-devel@alsa-project.org Date: Sun, 18 Sep 2016 20:59:31 +0200 Message-Id: <1474225172-32081-12-git-send-email-dev@andree.sk> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474225172-32081-1-git-send-email-dev@andree.sk> References: <1470942147-19848-1-git-send-email-dev@andree.sk> <1474225172-32081-1-git-send-email-dev@andree.sk> Cc: Andrej Krutak Subject: [alsa-devel] [PATCH v4 11/12] ALSA: line6: Cleanup podhd initialization X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Only initialize PCM for POD HD devices that support it. No POD HD seems to support MIDI, thus drop the initialization. Signed-off-by: Andrej Krutak --- sound/usb/line6/podhd.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c index 8246ea5..193eb29 100644 --- a/sound/usb/line6/podhd.c +++ b/sound/usb/line6/podhd.c @@ -314,17 +314,14 @@ static int podhd_init(struct usb_line6 *line6, return err; } - /* initialize MIDI subsystem: */ - err = line6_init_midi(line6); - if (err < 0) - return err; - - /* initialize PCM subsystem: */ - err = line6_init_pcm(line6, - (id->driver_info == LINE6_PODX3) ? &podx3_pcm_properties : - &podhd_pcm_properties); - if (err < 0) - return err; + if (pod->line6.properties->capabilities & LINE6_CAP_PCM) { + /* initialize PCM subsystem: */ + err = line6_init_pcm(line6, + (id->driver_info == LINE6_PODX3) ? &podx3_pcm_properties : + &podhd_pcm_properties); + if (err < 0) + return err; + } if (!(pod->line6.properties->capabilities & LINE6_CAP_CONTROL)) { /* register USB audio system directly */