SHA256
1
0
forked from pool/alsa-utils
alsa-utils/0009-speaker-test-Always-show-chmap-channel-names-if-avai.patch
Takashi Iwai f84c139643 Accepting request 208681 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: a few fixes for chmap support, alsaconf
  updates, a new monitor command for alsactl, etc:
  0006-amixer-fix-indentation-when-printing-container-TLV-c.patch
  0007-alsaloop-pcmjob.c-use-portable-way-to-initialize-rec.patch
  0008-speaker-test-Fix-chmapped-channel-selection-without-.patch
  0009-speaker-test-Always-show-chmap-channel-names-if-avai.patch
  0010-speaker-test-Show-out-of-chmap-channels-as-Unknown.patch
  0011-alsaconf-support-newer-m-i-t-and-kmod.patch
  0012-alsaconf-update-gentoo-to-use-modprobe.d-method-as-e.patch
  0013-configure-detect-udevdir-via-pkg-config-fallback-to-.patch
  0014-alsactl-Add-monitor-command.patch
  0015-alsactl-Fix-REMOVE-event-handling-in-monitor-command.patch
  0016-alsactl-monitor-all-cards-as-default.patch

OBS-URL: https://build.opensuse.org/request/show/208681
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=94
2013-11-27 13:18:04 +00:00

45 lines
1.6 KiB
Diff

From 5b0c6da0d8166cd404379740c5f75fda44ca5806 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sun, 10 Nov 2013 20:29:18 +0200
Subject: [PATCH] speaker-test: Always show chmap channel names if available
Currently speaker-test only uses channel names retrieved by
snd_pcm_chmap_long_name() when a channel map has been manually set.
However, the device may provide a default (or fixed) channel map that
differs from the traditional ALSA map, in which case wrong channel names
are shown.
Fix that by always using the name from the channel map when a channel
map is present.
Note that the names retrieved by snd_pcm_chmap_long_name() are not
currently localized via gettext.
Also note that Linux kernel HDMI driver reported wrong default channel
maps before 56cac413dd6d43af8355f5d1f90a199b540f73fc ("ALSA: hda - hdmi:
Fix reported channel map on common default layouts").
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
speaker-test/speaker-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c
index 25b08dcee70b..101bb0d390ee 100644
--- a/speaker-test/speaker-test.c
+++ b/speaker-test/speaker-test.c
@@ -267,7 +267,7 @@ static int get_speaker_channel(int chn)
static const char *get_channel_name(int chn)
{
#ifdef CONFIG_SUPPORT_CHMAP
- if (channel_map_set && chn < channel_map->channels) {
+ if (channel_map && chn < channel_map->channels) {
const char *name = snd_pcm_chmap_long_name(channel_map->pos[chn]);
return name ? name : "Unknown";
}
--
1.8.4.3