Skip to content

Commit d179228

Browse files
Mylène Josserandbroonie
authored andcommitted
ASoC: sun8i-codec: Convert to use SND_SOC_DAPM_AIF_IN
Update the driver to use SND_SOC_DAPM_AIF_IN instead of SND_SOC_DAPM_DAC. Rename the interface's widgets to be more precise on which slot the interface is connected. Signed-off-by: Mylène Josserand <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 79e26de commit d179228

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

sound/soc/sunxi/sun8i-codec.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,13 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
281281
SND_SOC_DAPM_SUPPLY("DAC", SUN8I_DAC_DIG_CTRL, SUN8I_DAC_DIG_CTRL_ENDA,
282282
0, NULL, 0),
283283

284-
/* Analog DAC */
285-
SND_SOC_DAPM_DAC("Digital Left DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
286-
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
287-
SND_SOC_DAPM_DAC("Digital Right DAC", "Playback", SUN8I_AIF1_DACDAT_CTRL,
288-
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
284+
/* Analog DAC AIF */
285+
SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Left", "Playback", 0,
286+
SUN8I_AIF1_DACDAT_CTRL,
287+
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0L_ENA, 0),
288+
SND_SOC_DAPM_AIF_IN("AIF1 Slot 0 Right", "Playback", 0,
289+
SUN8I_AIF1_DACDAT_CTRL,
290+
SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
289291

290292
/* DAC Mixers */
291293
SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
@@ -331,14 +333,14 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = {
331333
{ "DAC", NULL, "MODCLK DAC" },
332334

333335
/* DAC Routes */
334-
{ "Digital Left DAC", NULL, "DAC" },
335-
{ "Digital Right DAC", NULL, "DAC" },
336+
{ "AIF1 Slot 0 Right", NULL, "DAC" },
337+
{ "AIF1 Slot 0 Left", NULL, "DAC" },
336338

337339
/* DAC Mixer Routes */
338340
{ "Left Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
339-
"Digital Left DAC"},
341+
"AIF1 Slot 0 Left"},
340342
{ "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch",
341-
"Digital Right DAC"},
343+
"AIF1 Slot 0 Right"},
342344
};
343345

344346
static struct snd_soc_dai_ops sun8i_codec_dai_ops = {

0 commit comments

Comments
 (0)