From ac1dca240a9c98d8d88b03e030d4c916b176f6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Sat, 4 Jun 2022 18:13:40 +0200 Subject: [PATCH] control: Fall back to old naming if ELD device name decoding fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If ELD device name lookup fails, fall back to the old style naming instead of disabling the HDMI output altogether. Fixes: https://github.com/alsa-project/alsa-lib/issues/233 Signed-off-by: Bernhard Rosenkränzer --- src/control/control_hw.c | 6 ++++-- src/pcm/pcm_hw.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/control/control_hw.c b/src/control/control_hw.c index 0ed9f6b2..0604023d 100644 --- a/src/control/control_hw.c +++ b/src/control/control_hw.c @@ -288,8 +288,10 @@ static int snd_ctl_hw_pcm_info(snd_ctl_t *handle, snd_pcm_info_t * info) if (ioctl(hw->fd, SNDRV_CTL_IOCTL_PCM_INFO, info) < 0) return -errno; /* may be configurable (optional) */ - if (__snd_pcm_info_eld_fixup_check(info)) - return __snd_pcm_info_eld_fixup(info); + if (__snd_pcm_info_eld_fixup_check(info)) { + if (__snd_pcm_info_eld_fixup(info)) + SYSMSG("ELD lookup failed, using old HDMI output names\n"); + } return 0; } diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 5dfe32ee..e5f36011 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -325,7 +325,8 @@ static int snd_pcm_hw_info(snd_pcm_t *pcm, snd_pcm_info_t * info) } /* may be configurable (optional) */ if (__snd_pcm_info_eld_fixup_check(info)) - return __snd_pcm_info_eld_fixup(info); + if (__snd_pcm_info_eld_fixup(info)) + SYSMSG("ELD lookup failed, using old HDMI output names\n"); return 0; }