summaryrefslogtreecommitdiff
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-02-10 20:10:03 +0000
committerMark Brown <broonie@kernel.org>2021-02-10 20:10:03 +0000
commitb165457c5004c9363397d2e051be6fef56f35244 (patch)
tree7fa48300fd7621c91bed411d7c8e2769769354ec /sound/soc/intel
parent4fc320da5dc6d9d650e9c80b6141299606035cf1 (diff)
parent1183c350011a6f6b551c200b9206bf1808c22a4c (diff)
Merge series "ASoC: dapm/pins: handle component prefix" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
SoundWire machine drivers make a heavy use of component prefixes to uniquify control names. This however results in errors when looking for widgets or pins. This patchset suggests two solutions but feedback or suggestions on how to take the prefix into account would be welcome. Bard Liao (1): ASoC: Intel: boards: max98373: get dapm from cpu_dai Shuming Fan (1): ASoC: dapm: use component prefix when checking widget names sound/soc/intel/boards/sof_maxim_common.c | 5 +++-- sound/soc/soc-dapm.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) -- 2.25.1
Diffstat (limited to 'sound/soc/intel')
-rw-r--r--sound/soc/intel/boards/sof_maxim_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/sof_maxim_common.c b/sound/soc/intel/boards/sof_maxim_common.c
index c2a9757181fe..437d20562753 100644
--- a/sound/soc/intel/boards/sof_maxim_common.c
+++ b/sound/soc/intel/boards/sof_maxim_common.c
@@ -63,6 +63,7 @@ int max98373_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai;
+ struct snd_soc_dai *cpu_dai;
int j;
int ret = 0;
@@ -70,10 +71,10 @@ int max98373_trigger(struct snd_pcm_substream *substream, int cmd)
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
return 0;
+ cpu_dai = asoc_rtd_to_cpu(rtd, 0);
for_each_rtd_codec_dais(rtd, j, codec_dai) {
- struct snd_soc_component *component = codec_dai->component;
struct snd_soc_dapm_context *dapm =
- snd_soc_component_get_dapm(component);
+ snd_soc_component_get_dapm(cpu_dai->component);
char pin_name[MAX_98373_PIN_NAME];
snprintf(pin_name, ARRAY_SIZE(pin_name), "%s Spk",