Commit 3d178713 authored by Rakesh Ughreja's avatar Rakesh Ughreja Committed by Mark Brown

ASoC: Intel: Skylake: add HDA BE DAIs

Add support for HDA BE DAIs in SKL platform driver.
Signed-off-by: default avatarRakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9cdae435
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define HDA_MONO 1 #define HDA_MONO 1
#define HDA_STEREO 2 #define HDA_STEREO 2
#define HDA_QUAD 4 #define HDA_QUAD 4
#define HDA_MAX 8
static const struct snd_pcm_hardware azx_pcm_hw = { static const struct snd_pcm_hardware azx_pcm_hw = {
.info = (SNDRV_PCM_INFO_MMAP | .info = (SNDRV_PCM_INFO_MMAP |
...@@ -569,7 +570,10 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream, ...@@ -569,7 +570,10 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream,
stream_tag = hdac_stream(link_dev)->stream_tag; stream_tag = hdac_stream(link_dev)->stream_tag;
/* set the stream tag in the codec dai dma params */ /* 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.s_fmt = snd_pcm_format_width(params_format(params));
p_params.ch = params_channels(params); p_params.ch = params_channels(params);
...@@ -995,21 +999,63 @@ static struct snd_soc_dai_driver skl_platform_dai[] = { ...@@ -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, .ops = &skl_link_dai_ops,
.playback = { .playback = {
.stream_name = "HD-Codec Tx", .stream_name = "Analog CPU Playback",
.channels_min = HDA_STEREO, .channels_min = HDA_MONO,
.channels_max = HDA_STEREO, .channels_max = HDA_MAX,
.rates = SNDRV_PCM_RATE_48000, .rates = SNDRV_PCM_RATE_8000_192000,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_S32_LE,
}, },
.capture = { .capture = {
.stream_name = "HD-Codec Rx", .stream_name = "Analog CPU Capture",
.channels_min = HDA_STEREO, .channels_min = HDA_MONO,
.channels_max = HDA_STEREO, .channels_max = HDA_MAX,
.rates = SNDRV_PCM_RATE_48000, .rates = SNDRV_PCM_RATE_8000_192000,
.formats = SNDRV_PCM_FMTBIT_S16_LE, .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,
}, },
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment