aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/hdmi-codec.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2025-04-28 08:32:58 +0000
committerGreg Kroah-Hartman <[email protected]>2025-04-28 08:32:58 +0000
commit615dca38c2eae55aff80050275931c87a812b48c (patch)
tree8674a3a3f66a39bf7c7f2ab733a757e624bd99ec /sound/soc/codecs/hdmi-codec.c
parentusb: gadget: u_serial: Implement remote wakeup capability (diff)
parentLinux 6.15-rc4 (diff)
downloadkernel-615dca38c2eae55aff80050275931c87a812b48c.tar.gz
kernel-615dca38c2eae55aff80050275931c87a812b48c.zip
Merge 6.15-rc4 into usb-next
We need the USB fixes in here as well, and this resolves the following merge conflicts that were reported in linux-next: drivers/usb/chipidea/ci_hdrc_imx.c drivers/usb/host/xhci.h Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'sound/soc/codecs/hdmi-codec.c')
-rw-r--r--sound/soc/codecs/hdmi-codec.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 17019b1d680b..bc01ff65bd6f 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -842,12 +842,28 @@ static void print_eld_info(struct snd_info_entry *entry,
static int hdmi_dai_proc_new(struct hdmi_codec_priv *hcp,
struct snd_soc_dai *dai)
{
+ struct snd_soc_component *component = dai->component;
+ struct snd_soc_card *card = component->card;
+ struct snd_soc_dai *d;
+ struct snd_soc_pcm_runtime *rtd;
struct snd_info_entry *entry;
char name[32];
- int err;
+ int err, i, id = 0;
- snprintf(name, sizeof(name), "eld#%d", dai->id);
- err = snd_card_proc_new(dai->component->card->snd_card, name, &entry);
+ /*
+ * To avoid duplicate proc entry, find its rtd and use rtd->id
+ * instead of dai->id
+ */
+ for_each_card_rtds(card, rtd) {
+ for_each_rtd_dais(rtd, i, d)
+ if (d == dai) {
+ id = rtd->id;
+ goto found;
+ }
+ }
+found:
+ snprintf(name, sizeof(name), "eld#%d", id);
+ err = snd_card_proc_new(card->snd_card, name, &entry);
if (err < 0)
return err;