mbox series

[0/3] ASoC: hdmi-codec: add component name prefix to controls

Message ID 20230505165514.4666-1-srinivas.kandagatla@linaro.org (mailing list archive)
Headers show
Series ASoC: hdmi-codec: add component name prefix to controls | expand

Message

Srinivas Kandagatla May 5, 2023, 4:55 p.m. UTC
While adding audio support to two instances of Display port on x13s,
hdmi-codec failed to add controls as two codec instances were trying
to add controls with same name.
    
snd-sc8280xp sound: control 3:16:0:IEC958 Playback Mask:0 is already present
snd-sc8280xp sound: control 3:16:0:Playback Channel Map:0 is already present
hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_pcm_dai_new on i2s-hifi: -16

To fix this issue, I have added a new api snd_pcm_add_chmap_ctls_with_prefix()
to allow to pass asoc component name prefix, which should provide a unique control
names. We can also make snd_pcm_add_chmap_ctls() take prefix argument to do the same
this.

Srinivas Kandagatla (3):
  ALSA: pcm: add snd_pcm_add_chmap_ctls_with_prefix
  ASoC: hdmi-codec: use snd_pcm_add_chmap_ctls_with_prefix to add
    controls
  ASoC: hdmi-codec: use snd_soc_cnew to add controls

 include/sound/pcm.h           |  7 +++++++
 sound/core/pcm_lib.c          | 30 ++++++++++++++++++++++++++++--
 sound/soc/codecs/hdmi-codec.c | 10 ++++++----
 3 files changed, 41 insertions(+), 6 deletions(-)