Commit 7078ac4f authored by Shenghao Ding's avatar Shenghao Ding Committed by Mark Brown

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: 38803ce7 ("ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()")
Signed-off-by: default avatarShenghao Ding <shenghao-ding@ti.com>
Link: https://msgid.link/r/20240518033515.866-1-shenghao-ding@ti.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 714f5df0
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
/* /*
* tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier * tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier
* *
* Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com * Copyright (C) 2014 - 2024 Texas Instruments Incorporated -
* https://www.ti.com
* *
* Author: Dan Murphy <dmurphy@ti.com> * Author: Dan Murphy <dmurphy@ti.com>
*/ */
...@@ -119,12 +120,14 @@ static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] = ...@@ -119,12 +120,14 @@ static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
&tas2552_input_mux_control), &tas2552_input_mux_control),
SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("ASI OUT", "DAC Capture", 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0), SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0), SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0),
SND_SOC_DAPM_POST("Post Event", tas2552_post_event), SND_SOC_DAPM_POST("Post Event", tas2552_post_event),
SND_SOC_DAPM_OUTPUT("OUT") SND_SOC_DAPM_OUTPUT("OUT"),
SND_SOC_DAPM_INPUT("DMIC")
}; };
static const struct snd_soc_dapm_route tas2552_audio_map[] = { static const struct snd_soc_dapm_route tas2552_audio_map[] = {
...@@ -134,6 +137,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = { ...@@ -134,6 +137,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = {
{"ClassD", NULL, "Input selection"}, {"ClassD", NULL, "Input selection"},
{"OUT", NULL, "ClassD"}, {"OUT", NULL, "ClassD"},
{"ClassD", NULL, "PLL"}, {"ClassD", NULL, "PLL"},
{"ASI OUT", NULL, "DMIC"}
}; };
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -538,6 +542,13 @@ static struct snd_soc_dai_driver tas2552_dai[] = { ...@@ -538,6 +542,13 @@ static struct snd_soc_dai_driver tas2552_dai[] = {
.rates = SNDRV_PCM_RATE_8000_192000, .rates = SNDRV_PCM_RATE_8000_192000,
.formats = TAS2552_FORMATS, .formats = TAS2552_FORMATS,
}, },
.capture = {
.stream_name = "Capture",
.channels_min = 2,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000,
.formats = TAS2552_FORMATS,
},
.ops = &tas2552_speaker_dai_ops, .ops = &tas2552_speaker_dai_ops,
}, },
}; };
......
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