From patchwork Sun Jun 18 20:23:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Tsoy X-Patchwork-Id: 9794955 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 8AEF1600F6 for ; Sun, 18 Jun 2017 20:23:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C52227FE4 for ; Sun, 18 Jun 2017 20:23:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EC7F28066; Sun, 18 Jun 2017 20:23:36 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,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 9AF0727FE4 for ; Sun, 18 Jun 2017 20:23:35 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B795B266E8C; Sun, 18 Jun 2017 22:23:16 +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 33F8A266E73; Sun, 18 Jun 2017 22:23:14 +0200 (CEST) Received: from puleglot.ru (puleglot.ru [78.47.112.147]) by alsa0.perex.cz (Postfix) with ESMTP id E9EEF266E56 for ; Sun, 18 Jun 2017 22:23:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsoy.me; s=mymail; h=Sender:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bvQtz+PEay2NCV4xMoWHRqVe5H06yKHB1oic/b9KJfA=; b=p3flrZuROEx2jUOy3rEkdakhsY 6JQLnX1jKhCRkyhWZvPxod2AxvMV5ZVjybZOTdajwKI0WrxoiEptw2f+x3B1K6seYLgxv4NUwcxKl A5fGwNh9BpmX2S+Et4ucpzCXrYt3lOftS9QsbOITpd1FMGoS0I0Sr5EBV2u/07F9Jrxw=; Received: from ppp109-252-67-198.pppoe.spdop.ru ([109.252.67.198] helo=home.puleglot.ru) by puleglot.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89) (envelope-from <@puleglot.ru>) id 1dMgix-0006Dz-7g; Sun, 18 Jun 2017 23:23:07 +0300 From: Alexander Tsoy To: alsa-devel@alsa-project.org Date: Sun, 18 Jun 2017 23:23:03 +0300 Message-Id: <20170618202303.29269-2-alexander@tsoy.me> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170618202303.29269-1-alexander@tsoy.me> References: <20170618202303.29269-1-alexander@tsoy.me> Cc: Clemens Ladisch Subject: [alsa-devel] [PATCH alsa-lib 2/2] USB-Audio: allow custom definitions for "default" devices 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 Fixes: a9b129955659 ("USB-Audio.conf: fix definition for M-Audio AudioP...") Signed-off-by: Alexander Tsoy --- src/conf/cards/USB-Audio.conf | 77 ++++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf index f72ef121..cc8c718c 100644 --- a/src/conf/cards/USB-Audio.conf +++ b/src/conf/cards/USB-Audio.conf @@ -67,7 +67,7 @@ USB-Audio.pcm.iec958_2_device { } -# If a device requires non-standard definitions for front, surround40, +# If a device requires non-standard definitions for front, default, surround40, # surround51, surround71 or iec958, they can be defined here. # M-Audio AudioPhile USB: @@ -125,13 +125,13 @@ USB-Audio."Audio Advantage MicroII".pcm.iec958 { @args.AES2 { type integer } @args.AES3 { type integer } - type hooks - slave.pcm { + type hooks + slave.pcm { type hw card $CARD - } + } - hooks.0 { + hooks.0 { type ctl_elems hook_args [ { @@ -174,41 +174,52 @@ USB-Audio.pcm.front.0 { card $CARD device 0 } -} +} USB-Audio.pcm.default { @args [ CARD ] @args.CARD { type string } - type asym - playback.pcm { - type plug - slave.pcm { - @func refer - name { - @func concat - strings [ - "cards.USB-Audio.pcm.default_playback_dmix_" - { - @func refer - name { - @func concat - strings [ - "cards.USB-Audio.pcm.use_dmix." - { @func card_name card $CARD } - ] + @func refer + name { + @func concat + strings [ + "cards.USB-Audio." + { @func card_name card $CARD } + ".pcm.default:CARD=" $CARD + ] + } + default { + type asym + playback.pcm { + type plug + slave.pcm { + @func refer + name { + @func concat + strings [ + "cards.USB-Audio.pcm.default_playback_dmix_" + { + @func refer + name { + @func concat + strings [ + "cards.USB-Audio.pcm.use_dmix." + { @func card_name card $CARD } + ] + } + default yes } - default yes - } - ":CARD=" $CARD - ] + ":CARD=" $CARD + ] + } } } - } - capture.pcm { - type plug - slave.pcm { - @func concat - strings [ "dsnoop:" $CARD ] + capture.pcm { + type plug + slave.pcm { + @func concat + strings [ "dsnoop:" $CARD ] + } } } }