Skip to content

Commit 7078ac4

Browse files
Shenghao-Dingbroonie
authored andcommitted
ASoC: tas2552: Add TX path for capturing AUDIO-OUT data
TAS2552 is a Smartamp with I/V sense data, add TX path to support capturing I/V data. Fixes: 38803ce ("ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()") Signed-off-by: Shenghao Ding <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 714f5df commit 7078ac4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

sound/soc/codecs/tas2552.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/*
33
* tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier
44
*
5-
* Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
5+
* Copyright (C) 2014 - 2024 Texas Instruments Incorporated -
6+
* https://www.ti.com
67
*
78
* Author: Dan Murphy <[email protected]>
89
*/
@@ -119,12 +120,14 @@ static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
119120
&tas2552_input_mux_control),
120121

121122
SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0),
123+
SND_SOC_DAPM_AIF_OUT("ASI OUT", "DAC Capture", 0, SND_SOC_NOPM, 0, 0),
122124
SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
123125
SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0),
124126
SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0),
125127
SND_SOC_DAPM_POST("Post Event", tas2552_post_event),
126128

127-
SND_SOC_DAPM_OUTPUT("OUT")
129+
SND_SOC_DAPM_OUTPUT("OUT"),
130+
SND_SOC_DAPM_INPUT("DMIC")
128131
};
129132

130133
static const struct snd_soc_dapm_route tas2552_audio_map[] = {
@@ -134,6 +137,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = {
134137
{"ClassD", NULL, "Input selection"},
135138
{"OUT", NULL, "ClassD"},
136139
{"ClassD", NULL, "PLL"},
140+
{"ASI OUT", NULL, "DMIC"}
137141
};
138142

139143
#ifdef CONFIG_PM
@@ -538,6 +542,13 @@ static struct snd_soc_dai_driver tas2552_dai[] = {
538542
.rates = SNDRV_PCM_RATE_8000_192000,
539543
.formats = TAS2552_FORMATS,
540544
},
545+
.capture = {
546+
.stream_name = "Capture",
547+
.channels_min = 2,
548+
.channels_max = 2,
549+
.rates = SNDRV_PCM_RATE_8000_192000,
550+
.formats = TAS2552_FORMATS,
551+
},
541552
.ops = &tas2552_speaker_dai_ops,
542553
},
543554
};

0 commit comments

Comments
 (0)