From patchwork Wed Jul 29 16:45:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 6895481 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4BDFDC05AC for ; Wed, 29 Jul 2015 16:53:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F7C420644 for ; Wed, 29 Jul 2015 16:53:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 08703205CA for ; Wed, 29 Jul 2015 16:53:42 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3AADB266439; Wed, 29 Jul 2015 18:53:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 90D08265D98; Wed, 29 Jul 2015 18:47:47 +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 21561265A01; Wed, 29 Jul 2015 18:47:45 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 3A1402606AB for ; Wed, 29 Jul 2015 18:46:03 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 29 Jul 2015 09:46:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,572,1432623600"; d="scan'208";a="615321089" Received: from iikavana-mobl1.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.21.221]) by orsmga003.jf.intel.com with ESMTP; 29 Jul 2015 09:46:01 -0700 From: Liam Girdwood To: Date: Wed, 29 Jul 2015 17:45:25 +0100 Message-Id: <1438188325-11553-14-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438188325-11553-1-git-send-email-liam.r.girdwood@linux.intel.com> References: <1438188325-11553-1-git-send-email-liam.r.girdwood@linux.intel.com> Cc: Takashi Iwai , Liam Girdwood , Mark Brown Subject: [alsa-devel] [PATCH v3 13/13] conf: topology: Add topology file for broadwell audio DSP 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 Signed-off-by: Liam Girdwood --- src/conf/Makefile.am | 2 +- src/conf/topology/Makefile.am | 1 + src/conf/topology/broadwell/Makefile.am | 4 + src/conf/topology/broadwell/broadwell.conf | 375 +++++++++++++++++++++++++++++ 4 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 src/conf/topology/Makefile.am create mode 100644 src/conf/topology/broadwell/Makefile.am create mode 100644 src/conf/topology/broadwell/broadwell.conf diff --git a/src/conf/Makefile.am b/src/conf/Makefile.am index 948d5a1..a04f73f 100644 --- a/src/conf/Makefile.am +++ b/src/conf/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS=cards pcm alsa.conf.d ucm +SUBDIRS=cards pcm alsa.conf.d ucm topology cfg_files = alsa.conf if BUILD_ALISP diff --git a/src/conf/topology/Makefile.am b/src/conf/topology/Makefile.am new file mode 100644 index 0000000..f56a96c --- /dev/null +++ b/src/conf/topology/Makefile.am @@ -0,0 +1 @@ +SUBDIRS=broadwell diff --git a/src/conf/topology/broadwell/Makefile.am b/src/conf/topology/broadwell/Makefile.am new file mode 100644 index 0000000..35d1e83 --- /dev/null +++ b/src/conf/topology/broadwell/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +topologydir = $(alsaconfigdir)/topology/broadwell +topology_DATA = broadwell.conf +EXTRA_DIST = $(topology_DATA) diff --git a/src/conf/topology/broadwell/broadwell.conf b/src/conf/topology/broadwell/broadwell.conf new file mode 100644 index 0000000..05b3889 --- /dev/null +++ b/src/conf/topology/broadwell/broadwell.conf @@ -0,0 +1,375 @@ +# Dynamic Firmware Configuration for Broadwell + +# TLV +SectionTLV."hsw_vol_tlv" { + Comment "TLV used by both global and stream volumes" + + scale { + min "-9000" + step "300" + mute "1" + } +} + +# Controls +SectionControlMixer."Master Playback Volume" { + Comment "Global DSP volume" + + # control belongs to this index group + index "1" + + # Channel register and shift for Front Left/Right + channel."FL" { + reg "0" + shift "0" + } + channel."FR" { + reg "0" + shift "8" + } + + # max control value and whether value is inverted + max "31" + invert "false" + + # control uses bespoke driver get/put/info ID 0 + ops."ctl" { + info "volsw" + get "256" + put "256" + } + + # uses TLV data above + tlv "hsw_vol_tlv" +} + +SectionControlMixer."Media0 Playback Volume" { + Comment "Offload 0 volume" + + # control belongs to this index group + index "1" + + # Channel register and shift for Front Left/Right + channel."FL" { + reg "1" + shift "0" + } + channel."FR" { + reg "1" + shift "8" + } + + # max control value and whether value is inverted + max "31" + invert "false" + + # control uses bespoke driver get/put/info ID 0 + ops."ctl" { + info "volsw" + get "257" + put "257" + } + + # uses TLV data above + tlv "hsw_vol_tlv" +} + +SectionControlMixer."Media1 Playback Volume" { + Comment "Offload 1 volume" + + # control belongs to this index group + index "1" + + # Channel register and shift for Front Left/Right + channel."FL" { + reg "2" + shift "0" + } + channel."FR" { + reg "2" + shift "8" + } + + # max control value and whether value is inverted + max "31" + invert "false" + + # control uses bespoke driver get/put/info ID 0 + ops."ctl" { + info "volsw" + get "257" + put "257" + } + + # uses TLV data above + tlv "hsw_vol_tlv" +} + +SectionControlMixer."Mic Capture Volume" { + Comment "Mic Capture volume" + + # control belongs to this index group + index "1" + + # Channel register and shift for Front Left/Right + channel."FL" { + reg "0" + shift "0" + } + channel."FR" { + reg "0" + shift "8" + } + + # max control value and whether value is inverted + max "31" + invert "false" + + # control uses bespoke driver get/put/info ID 0 + ops."ctl" { + info "volsw" + get "257" + put "257" + } + + # uses TLV data above + tlv "hsw_vol_tlv" +} + +SectionWidget."SSP0 CODEC IN" { + + index "1" + type "aif_in" + no_pm "true" + shift "0" + invert "0" +} + +SectionWidget."SSP0 CODEC OUT" { + + index "1" + type "aif_out" + no_pm "true" + shift "0" + invert "0" +} + +SectionWidget."SSP1 BT IN" { + + index "1" + type "aif_in" + no_pm "true" + shift "0" + invert "0" +} + +SectionWidget."SSP1 BT OUT" { + + index "1" + type "aif_out" + no_pm "true" + shift "0" + invert "0" +} + +SectionWidget."Playback VMixer" { + + index "1" + type "mixer" + no_pm "true" + shift "0" + invert "0" +} + +# PCM Configurations supported by FW +SectionPCMConfig."PCM 48k Stereo 24bit" { + + config."playback" { + format "S24_LE" + rate "48000" + channels "2" + tdm_slot "0xf" + } + + config."capture" { + format "S24_LE" + rate "48000" + channels "2" + tdm_slot "0xf" + } +} + +SectionPCMConfig."PCM 48k Stereo 16bit" { + + config."playback" { + format "S16_LE" + rate "48000" + channels "2" + tdm_slot "0xf" + } + + config."capture" { + format "S16_LE" + rate "48000" + channels "2" + tdm_slot "0xf" + } +} + +SectionPCMConfig."PCM 48k 2P/4C 16bit" { + + config."playback" { + format "S16_LE" + rate "48000" + channels "2" + tdm_slot "0xf" + } + + config."capture" { + format "S16_LE" + rate "48000" + channels "4" + tdm_slot "0xf" + } +} + +# PCM capabilities supported by FW +SectionPCMCapabilities."System Playback" { + + formats "S24_LE,S16_LE" + rate_min "48000" + rate_max "48000" + channels_min "2" + channels_max "2" +} + +SectionPCMCapabilities."Analog Capture" { + + formats "S24_LE,S16_LE" + rate_min "48000" + rate_max "48000" + channels_min "2" + channels_max "4" +} + +SectionPCMCapabilities."Loopback Capture" { + + formats "S24_LE,S16_LE" + rate_min "48000" + rate_max "48000" + channels_min "2" + channels_max "2" +} + +SectionPCMCapabilities."Offload0 Playback" { + formats "S24_LE,S16_LE" + rate_min "8000" + rate_max "192000" + channels_min "2" + channels_max "2" +} + +SectionPCMCapabilities."Offload1 Playback" { + formats "S24_LE,S16_LE" + rate_min "8000" + rate_max "48000" + channels_min "2" + channels_max "2" +} + +# PCM devices exported by Firmware +SectionPCM."System Pin" { + + index "1" + + # used for binding to the PCM + ID "0" + + pcm."playback" { + + capabilities "System Playback" + + configs [ + "PCM 48k Stereo 24bit" + "PCM 48k Stereo 16bit" + ] + } + + pcm."capture" { + + capabilities "Analog Capture" + + configs [ + "PCM 48k Stereo 24bit" + "PCM 48k Stereo 16bit" + "PCM 48k 2P/4C 16bit" + ] + } +} + +SectionPCM."Offload0 Pin" { + + index "1" + + # used for binding to the PCM + ID "1" + + pcm."playback" { + + capabilities "Offload0 Playback" + + configs [ + "PCM 48k Stereo 24bit" + "PCM 48k Stereo 16bit" + ] + } +} + +SectionPCM."Offload1 Pin" { + + index "1" + + # used for binding to the PCM + ID "2" + + pcm."playback" { + + capabilities "Offload1 Playback" + + configs [ + "PCM 48k Stereo 24bit" + "PCM 48k Stereo 16bit" + ] + } +} + +SectionPCM."Loopback Pin" { + + index "1" + + # used for binding to the PCM + ID "3" + + pcm."capture" { + + capabilities "Loopback Capture" + + configs [ + "PCM 48k Stereo 24bit" + "PCM 48k Stereo 16bit" + ] + } +} + +SectionGraph."dsp" { + index "1" + + lines [ + "Playback VMixer, , System Playback" + "Playback VMixer, , Offload0 Playback" + "Playback VMixer, , Offload1 Playback" + "SSP0 CODEC OUT, , Playback VMixer" + "Loopback Capture, , Playback VMixer" + "Analog Capture, , SSP0 CODEC IN" + ] +}