From patchwork Fri Sep 16 09:12:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrej Krutak X-Patchwork-Id: 9335729 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 3EDE7607FF for ; Fri, 16 Sep 2016 12:35:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FB9E29F74 for ; Fri, 16 Sep 2016 12:35:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2159929F80; Fri, 16 Sep 2016 12:35:15 +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 5159629F74 for ; Fri, 16 Sep 2016 12:35:11 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id DBCD926701C; Fri, 16 Sep 2016 14:35:09 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BB7F4266829; Fri, 16 Sep 2016 14:32:49 +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 04E502667DF; Fri, 16 Sep 2016 11:13:30 +0200 (CEST) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by alsa0.perex.cz (Postfix) with ESMTP id 11F3C266718 for ; Fri, 16 Sep 2016 11:13:28 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id l132so1525002wmf.1 for ; Fri, 16 Sep 2016 02:13:28 -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=XeT19v84tTu+TsbLZ1W/AWm05l3BtrRiLSAnRt5zraZgbfIWby9XgBvucDkpWo2mXx yuP7OH8YpRGEoftSQ8Pzr88UL2AKk8yVnefITGMvn0/r+zykOPPE/g1IH9sJSaycV1rZ n08XUro9nnNDXpMTD1gK3pOTKX1cnrj9NAidecZHhmN/K1YoSeo+LkqQIAUSnna01M0O R+Za0mOv0N7jxrnBVWjoHRQtjBBMYeKqN9eeVIp6LpnxNlUpHaZc1N2wR3dS7y2+uuGN 8rV0L1fJB7MXWu7fLDDBcvBwjLEpaGtAmfCd90QYWqLpeHHaEElfAzQAl7A0vWDgr+c+ +ecA== 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=Ac1vjr0AeLzV3Vt5SDFBHcqwENNkb4oBCzxGp9KiZucp81mZhRjSVE0TrQ1F8clM9L LDBdABlgi83O6iHJkiHfp5hA4W23Auxa83PwnKxk+ljke9fh7AwbDkuI4cz3FXnT89Y3 DRJvkkXd+kiMAwbaBmwscC0yelnrfwIf3TU1HuKBSlRLT3KzJDDZDYP0mhNkXeo7wU/O ue64gAmJZznS159ItlE7Dk9FnVhuOEqBE0Js2sgTL2RVhnQ1Hgubob3TU2OMCmuCzBi0 rE70lHPCTR9vYZRTZj7LQoRf+0hNa9yuO3dnncxgDPZjOHLU36kZROLx9WGjgjnX7JEg fWiQ== X-Gm-Message-State: AE9vXwP6jFa5G1Y6JYBFBNfW7BgoXXaeqVpIj8mfF17NoTA4H0gGsAZBTmSLREDAOj1JRg== X-Received: by 10.194.59.84 with SMTP id x20mr11330926wjq.89.1474017208675; Fri, 16 Sep 2016 02:13:28 -0700 (PDT) Received: from localhost.localdomain ([217.30.74.231]) by smtp.gmail.com with ESMTPSA id u124sm6391513wmu.10.2016.09.16.02.13.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Sep 2016 02:13:27 -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: Fri, 16 Sep 2016 11:12:55 +0200 Message-Id: <1474017177-23769-12-git-send-email-dev@andree.sk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1474017177-23769-1-git-send-email-dev@andree.sk> References: <1470942147-19848-1-git-send-email-dev@andree.sk> <1474017177-23769-1-git-send-email-dev@andree.sk> Cc: Andrej Krutak Subject: [alsa-devel] [PATCH v3 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 */