Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	liam.r.girdwood@linux.intel.com, vkoul@kernel.org,
	broonie@kernel.org, rakesh.a.ughreja@intel.com
Subject: [PATCH v3 06/13] ASoC: Intel: Skylake: add HDA BE DAIs
Date: Fri,  1 Jun 2018 22:53:54 -0500	[thread overview]
Message-ID: <20180602035401.26934-7-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20180602035401.26934-1-pierre-louis.bossart@linux.intel.com>

From: Rakesh Ughreja <rakesh.a.ughreja@intel.com>

Add support for HDA BE DAIs in SKL platform driver.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 70 ++++++++++++++++++++++++++++++++-------
 1 file changed, 58 insertions(+), 12 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index d7fc3b2d3e68..3284f16077a5 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -32,6 +32,7 @@
 #define HDA_MONO 1
 #define HDA_STEREO 2
 #define HDA_QUAD 4
+#define HDA_MAX 8
 
 static const struct snd_pcm_hardware azx_pcm_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP |
@@ -569,7 +570,10 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream,
 	stream_tag = hdac_stream(link_dev)->stream_tag;
 
 	/* set the stream tag in the codec dai dma params  */
-	snd_soc_dai_set_tdm_slot(codec_dai, stream_tag, 0, 0, 0);
+	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+		snd_soc_dai_set_tdm_slot(codec_dai, stream_tag, 0, 0, 0);
+	else
+		snd_soc_dai_set_tdm_slot(codec_dai, 0, stream_tag, 0, 0);
 
 	p_params.s_fmt = snd_pcm_format_width(params_format(params));
 	p_params.ch = params_channels(params);
@@ -995,21 +999,63 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
 	},
 },
 {
-	.name = "HD-Codec Pin",
+	.name = "Analog CPU DAI",
 	.ops = &skl_link_dai_ops,
 	.playback = {
-		.stream_name = "HD-Codec Tx",
-		.channels_min = HDA_STEREO,
-		.channels_max = HDA_STEREO,
-		.rates = SNDRV_PCM_RATE_48000,
-		.formats = SNDRV_PCM_FMTBIT_S16_LE,
+		.stream_name = "Analog CPU Playback",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
 	},
 	.capture = {
-		.stream_name = "HD-Codec Rx",
-		.channels_min = HDA_STEREO,
-		.channels_max = HDA_STEREO,
-		.rates = SNDRV_PCM_RATE_48000,
-		.formats = SNDRV_PCM_FMTBIT_S16_LE,
+		.stream_name = "Analog CPU Capture",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
+	.name = "Alt Analog CPU DAI",
+	.ops = &skl_link_dai_ops,
+	.playback = {
+		.stream_name = "Alt Analog CPU Playback",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
+	},
+	.capture = {
+		.stream_name = "Alt Analog CPU Capture",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
+	},
+},
+{
+	.name = "Digital CPU DAI",
+	.ops = &skl_link_dai_ops,
+	.playback = {
+		.stream_name = "Digital CPU Playback",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
+	},
+	.capture = {
+		.stream_name = "Digital CPU Capture",
+		.channels_min = HDA_MONO,
+		.channels_max = HDA_MAX,
+		.rates = SNDRV_PCM_RATE_8000_192000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_S32_LE,
 	},
 },
 };
-- 
2.14.1

  parent reply	other threads:[~2018-06-02  3:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-02  3:53 [PATCH v3 00/13] Enable HDA Codec support on Intel Platforms Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 01/13] ALSA: hdac: Remove usage of struct hdac_ext_device and use hdac_device instead Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 02/13] ALSA: hdac: Remove usage of struct hdac_ext_bus and use hdac_bus instead Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 03/13] ALSA: hdac: Remove usage of struct hdac_ext_driver, use hdac_driver instead Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 04/13] ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecs Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 05/13] ASoC: Intel: Skylake: Add entry in sst_acpi_mach for HDA codecs Pierre-Louis Bossart
2018-06-02  3:53 ` Pierre-Louis Bossart [this message]
2018-06-02  3:53 ` [PATCH v3 07/13] ASoC: Intel: Skylake: use hda_bus instead of hdac_bus Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 08/13] ALSA: hda: split snd_hda_codec_new function Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 09/13] ALSA: hdac: remove memory allocation from snd_hdac_ext_bus_device_init Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 10/13] ALSA: hdac: add extended ops in the hdac_bus Pierre-Louis Bossart
2018-06-02  3:53 ` [PATCH v3 11/13] ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers Pierre-Louis Bossart
2018-06-02  3:54 ` [PATCH v3 12/13] ALSA: hdac: ext: add wait for codec to respond after link reset Pierre-Louis Bossart
2018-06-02  3:54 ` [PATCH v3 13/13] ASoC: Intel: Skylake: fix widget handling Pierre-Louis Bossart
2018-06-02  9:00 ` [PATCH v3 00/13] Enable HDA Codec support on Intel Platforms Takashi Iwai
2018-06-04 13:27   ` Pierre-Louis Bossart
2018-06-04 13:33     ` Mark Brown
2018-06-04 13:44     ` Takashi Iwai
2018-06-26 19:04       ` Takashi Iwai
2018-06-27 23:04         ` Pierre-Louis Bossart
2018-06-28  5:02           ` Pierre-Louis Bossart
2018-06-28  5:34             ` Takashi Iwai
2018-07-04 10:38               ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180602035401.26934-7-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox