Commit 3bec6fa3 authored by Agrawal, Akshu's avatar Agrawal, Akshu Committed by Mark Brown

ASoC: AMD: Change codec to channel link as per hardware redesign

This is a correction to match acutal hardware configuration.
The hardware configuration looks like:
I2S_BT -> SPK(Max) + DMIC(Adau)
I2S_SP -> DA7219 Headset

No actual products have been shipped with previous configuration.
Signed-off-by: default avatarAkshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 366f074d
...@@ -148,7 +148,7 @@ static int cz_da7219_startup(struct snd_pcm_substream *substream) ...@@ -148,7 +148,7 @@ static int cz_da7219_startup(struct snd_pcm_substream *substream)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&constraints_rates); &constraints_rates);
machine->i2s_instance = I2S_BT_INSTANCE; machine->i2s_instance = I2S_SP_INSTANCE;
return da7219_clk_enable(substream); return da7219_clk_enable(substream);
} }
...@@ -163,7 +163,7 @@ static int cz_max_startup(struct snd_pcm_substream *substream) ...@@ -163,7 +163,7 @@ static int cz_max_startup(struct snd_pcm_substream *substream)
struct snd_soc_card *card = rtd->card; struct snd_soc_card *card = rtd->card;
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
machine->i2s_instance = I2S_SP_INSTANCE; machine->i2s_instance = I2S_BT_INSTANCE;
return da7219_clk_enable(substream); return da7219_clk_enable(substream);
} }
...@@ -178,7 +178,7 @@ static int cz_dmic_startup(struct snd_pcm_substream *substream) ...@@ -178,7 +178,7 @@ static int cz_dmic_startup(struct snd_pcm_substream *substream)
struct snd_soc_card *card = rtd->card; struct snd_soc_card *card = rtd->card;
struct acp_platform_info *machine = snd_soc_card_get_drvdata(card); struct acp_platform_info *machine = snd_soc_card_get_drvdata(card);
machine->i2s_instance = I2S_SP_INSTANCE; machine->i2s_instance = I2S_BT_INSTANCE;
return da7219_clk_enable(substream); return da7219_clk_enable(substream);
} }
...@@ -204,16 +204,27 @@ static const struct snd_soc_ops cz_dmic_cap_ops = { ...@@ -204,16 +204,27 @@ static const struct snd_soc_ops cz_dmic_cap_ops = {
static struct snd_soc_dai_link cz_dai_7219_98357[] = { static struct snd_soc_dai_link cz_dai_7219_98357[] = {
{ {
.name = "amd-da7219-play-cap", .name = "amd-da7219-play",
.stream_name = "Playback and Capture", .stream_name = "Playback",
.platform_name = "acp_audio_dma.0.auto", .platform_name = "acp_audio_dma.0.auto",
.cpu_dai_name = "designware-i2s.3.auto", .cpu_dai_name = "designware-i2s.1.auto",
.codec_dai_name = "da7219-hifi", .codec_dai_name = "da7219-hifi",
.codec_name = "i2c-DLGS7219:00", .codec_name = "i2c-DLGS7219:00",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
| SND_SOC_DAIFMT_CBM_CFM, | SND_SOC_DAIFMT_CBM_CFM,
.init = cz_da7219_init, .init = cz_da7219_init,
.dpcm_playback = 1, .dpcm_playback = 1,
.ops = &cz_da7219_cap_ops,
},
{
.name = "amd-da7219-cap",
.stream_name = "Capture",
.platform_name = "acp_audio_dma.0.auto",
.cpu_dai_name = "designware-i2s.2.auto",
.codec_dai_name = "da7219-hifi",
.codec_name = "i2c-DLGS7219:00",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
| SND_SOC_DAIFMT_CBM_CFM,
.dpcm_capture = 1, .dpcm_capture = 1,
.ops = &cz_da7219_cap_ops, .ops = &cz_da7219_cap_ops,
}, },
...@@ -221,7 +232,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { ...@@ -221,7 +232,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
.name = "amd-max98357-play", .name = "amd-max98357-play",
.stream_name = "HiFi Playback", .stream_name = "HiFi Playback",
.platform_name = "acp_audio_dma.0.auto", .platform_name = "acp_audio_dma.0.auto",
.cpu_dai_name = "designware-i2s.1.auto", .cpu_dai_name = "designware-i2s.3.auto",
.codec_dai_name = "HiFi", .codec_dai_name = "HiFi",
.codec_name = "MX98357A:00", .codec_name = "MX98357A:00",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
...@@ -233,7 +244,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { ...@@ -233,7 +244,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
.name = "dmic", .name = "dmic",
.stream_name = "DMIC Capture", .stream_name = "DMIC Capture",
.platform_name = "acp_audio_dma.0.auto", .platform_name = "acp_audio_dma.0.auto",
.cpu_dai_name = "designware-i2s.2.auto", .cpu_dai_name = "designware-i2s.3.auto",
.codec_dai_name = "adau7002-hifi", .codec_dai_name = "adau7002-hifi",
.codec_name = "ADAU7002:00", .codec_name = "ADAU7002:00",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
......
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