From patchwork Wed Aug 16 16:08:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 9904107 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 EE93B600CA for ; Wed, 16 Aug 2017 16:10:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E07FD28A58 for ; Wed, 16 Aug 2017 16:10:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE96D28A5B; Wed, 16 Aug 2017 16:10:30 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham 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 7C2A528A3C for ; Wed, 16 Aug 2017 16:10:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 59F58267559; Wed, 16 Aug 2017 18:10:28 +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 679AF26755C; Wed, 16 Aug 2017 18:10:27 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id D1D5026755B for ; Wed, 16 Aug 2017 18:10:22 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2017 09:10:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,383,1498546800"; d="scan'208";a="138223764" Received: from jbfryman-ivm2.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.249.9.94]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2017 09:10:09 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Wed, 16 Aug 2017 11:08:48 -0500 Message-Id: <20170816160848.19297-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.9.3 Cc: Pierre-Louis Bossart Subject: [alsa-devel] [PATCH] conf: HdmiLpeAudio: add support for 3 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 The LPE Audio mode on BYT/CHT supports up to 3 devices, and also supports IEC61937 passthrough. Add missing alsa-lib configurations so that apps can use the usual -D'hdmi:CARD=X,DEV=Y,AES0=0x[4|6]' syntax, e.g. aplay -D'hdmi:CARD=0,DEV=2,AES0=0x6' -c2 -r48000 -fs16_le ac3_surround_test.spdif Tested on Zotac PI330 with Onkyo receiver Signed-off-by: Pierre-Louis Bossart --- src/conf/cards/HdmiLpeAudio.conf | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/src/conf/cards/HdmiLpeAudio.conf b/src/conf/cards/HdmiLpeAudio.conf index dae71fa..9fa30da 100644 --- a/src/conf/cards/HdmiLpeAudio.conf +++ b/src/conf/cards/HdmiLpeAudio.conf @@ -56,6 +56,83 @@ HdmiLpeAudio.pcm.hdmi.0 { { interface PCM name "IEC958 Playback Default" + device 0 + lock true + preserve true + value [ $AES0 $AES1 $AES2 $AES3 ] + } + ] + } +} + +HdmiLpeAudio.pcm.hdmi.1 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type hooks + slave.pcm { + type hw + card $CARD + device 1 + } + hooks.0 { + type ctl_elems + hook_args [ + { + interface PCM + name "IEC958 Playback Default" + device 1 + lock true + preserve true + value [ $AES0 $AES1 $AES2 $AES3 ] + } + ] + } +} + +HdmiLpeAudio.pcm.hdmi.2 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type hooks + slave.pcm { + type hw + card $CARD + device 2 + } + hooks.0 { + type ctl_elems + hook_args [ + { + interface PCM + name "IEC958 Playback Default" + device 2 lock true preserve true value [ $AES0 $AES1 $AES2 $AES3 ]