[alsa-devel] amixer shows capability "penum" on every Simple mixer control
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
1) "Creative X-Fi" does not have any Enum's. alsamixer does not show Enums's. amixer lists "penum" for ALL Simple mixer controls.
2) "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Christian
At Mon, 12 Mar 2012 22:09:35 +0100, Christian Esken (KDE) wrote:
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
- "Creative X-Fi" does not have any Enum's. alsamixer does not show
Enums's. amixer lists "penum" for ALL Simple mixer controls.
- "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it
correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later.
thanks,
Takashi
At Tue, 13 Mar 2012 10:52:21 +0100, Takashi Iwai wrote:
At Mon, 12 Mar 2012 22:09:35 +0100, Christian Esken (KDE) wrote:
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
- "Creative X-Fi" does not have any Enum's. alsamixer does not show
Enums's. amixer lists "penum" for ALL Simple mixer controls.
- "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it
correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later.
I committed the fix to git tree now. The fix patch is below.
Takashi
--- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
The functions to check whether the element is an enum don't need the extra check of the type. It should return simply 0 or 1 without error.
Signed-off-by: Takashi Iwai tiwai@suse.de --- src/mixer/simple.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 8079fe7..ec22a9c 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -889,7 +889,6 @@ int snd_mixer_selem_is_enumerated(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) { CHECK_BASIC(elem); - CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_PLAY, SM_OPS_IS_ENUMERATED, 1); }
@@ -901,7 +900,6 @@ int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_capture(snd_mixer_elem_t *elem) { CHECK_BASIC(elem); - CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_CAPT, SM_OPS_IS_ENUMERATED, 1); }
2012/3/13, Takashi Iwai tiwai@suse.de:
At Tue, 13 Mar 2012 10:52:21 +0100, Takashi Iwai wrote:
At Mon, 12 Mar 2012 22:09:35 +0100, Christian Esken (KDE) wrote:
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
- "Creative X-Fi" does not have any Enum's. alsamixer does not show
Enums's. amixer lists "penum" for ALL Simple mixer controls.
- "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it
correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later.
I committed the fix to git tree now. The fix patch is below.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
The functions to check whether the element is an enum don't need the extra check of the type. It should return simply 0 or 1 without error.
Signed-off-by: Takashi Iwai tiwai@suse.de
src/mixer/simple.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 8079fe7..ec22a9c 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -889,7 +889,6 @@ int snd_mixer_selem_is_enumerated(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) { CHECK_BASIC(elem);
- CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_PLAY, SM_OPS_IS_ENUMERATED, 1);
}
@@ -901,7 +900,6 @@ int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_capture(snd_mixer_elem_t *elem) { CHECK_BASIC(elem);
- CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_CAPT, SM_OPS_IS_ENUMERATED, 1);
}
-- 1.7.9.2
The patch changed some penum to enum
(e.g. "Independent HP" or "Channel Mode" )
Simple mixer control 'Independent HP',0 Capabilities: enum Items: 'OFF' 'ON' Item0: 'ON'
At Wed, 14 Mar 2012 20:35:33 +0800, Raymond Yau wrote:
2012/3/13, Takashi Iwai tiwai@suse.de:
At Tue, 13 Mar 2012 10:52:21 +0100, Takashi Iwai wrote:
At Mon, 12 Mar 2012 22:09:35 +0100, Christian Esken (KDE) wrote:
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
- "Creative X-Fi" does not have any Enum's. alsamixer does not show
Enums's. amixer lists "penum" for ALL Simple mixer controls.
- "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it
correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later.
I committed the fix to git tree now. The fix patch is below.
Takashi
From: Takashi Iwai tiwai@suse.de Subject: [PATCH] mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
The functions to check whether the element is an enum don't need the extra check of the type. It should return simply 0 or 1 without error.
Signed-off-by: Takashi Iwai tiwai@suse.de
src/mixer/simple.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 8079fe7..ec22a9c 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -889,7 +889,6 @@ int snd_mixer_selem_is_enumerated(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) { CHECK_BASIC(elem);
- CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_PLAY, SM_OPS_IS_ENUMERATED, 1);
}
@@ -901,7 +900,6 @@ int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t *elem) int snd_mixer_selem_is_enum_capture(snd_mixer_elem_t *elem) { CHECK_BASIC(elem);
- CHECK_ENUM(elem); return sm_selem_ops(elem)->is(elem, SM_CAPT, SM_OPS_IS_ENUMERATED, 1);
}
-- 1.7.9.2
The patch changed some penum to enum
(e.g. "Independent HP" or "Channel Mode" )
Simple mixer control 'Independent HP',0 Capabilities: enum Items: 'OFF' 'ON' Item0: 'ON'
Yes, and it's the right fix. The enum is not specific to playback, at least, judging from the name string.
Takashi
2012/3/14, Takashi Iwai tiwai@suse.de:
The patch changed some penum to enum
(e.g. "Independent HP" or "Channel Mode" )
Simple mixer control 'Independent HP',0 Capabilities: enum Items: 'OFF' 'ON' Item0: 'ON'
Yes, and it's the right fix. The enum is not specific to playback, at least, judging from the name string.
on hda ad198x , "input source" are cenum
Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Front Mic' Simple mixer control 'Input Source',1 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Front Mic' Simple mixer control 'Input Source',2 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Line'
but those "Universal Jack" input source are enum
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5548
Simple mixer control 'Line Input Source',0 Capabilities: enum Items: 'Mic2 Jack' 'Mic1 Jack' 'Line In Jack' 'Front Jack' 'Rear Jack' 'Center/LFE Jack' 'Mute' Item0: 'Line In Jack'
Simple mixer control 'Mic Input Source',0 Capabilities: enum Items: 'Mic2 Jack' 'Mic1 Jack' 'Line In Jack' 'Front Jack' 'Rear Jack' 'Center/LFE Jack' 'Mute' Item0: 'Mic1 Jack' Simple mixer control 'Mic Select',0 Capabilities: enum Items: 'Mic1' 'Mic2' Item0: 'Mic1'
Do the user of 3 jack motherboard need to run a script to retask the Universal Audio Jack for surround51 in Ubuntu 11.10 ?
Simple mixer control 'Front Jack',0 Capabilities: enum Items: 'Input/Disabled' 'Front Output' 'Rear Output' 'Center/LFE Output' 'Mixer Output' Item0: 'Mixer Output'
Simple mixer control 'Center/LFE Jack',0 Capabilities: enum Items: 'Input/Disabled' 'Front Output' 'Rear Output' 'Center/LFE Output' 'Mixer Output' Item0: 'Center/LFE Output'
Simple mixer control 'LineIn Jack',0 Capabilities: enum Items: 'Input/Disabled' 'Front Output' 'Rear Output' 'Center/LFE Output' 'Mixer Output' Item0: 'Input/Disabled'
Simple mixer control 'Mic1 Jack',0 Capabilities: enum Items: 'Input/Disabled' 'Front Output' 'Rear Output' 'Center/LFE Output' 'Mixer Output' Item0: 'Input/Disabled'
Simple mixer control 'Rear Jack',0 Capabilities: enum Items: 'Input/Disabled' 'Front Output' 'Rear Output' 'Center/LFE Output' 'Mixer Output' Item0: 'Rear Output'
At Thu, 15 Mar 2012 08:23:47 +0800, Raymond Yau wrote:
2012/3/14, Takashi Iwai tiwai@suse.de:
The patch changed some penum to enum
(e.g. "Independent HP" or "Channel Mode" )
Simple mixer control 'Independent HP',0 Capabilities: enum Items: 'OFF' 'ON' Item0: 'ON'
Yes, and it's the right fix. The enum is not specific to playback, at least, judging from the name string.
on hda ad198x , "input source" are cenum
Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Front Mic' Simple mixer control 'Input Source',1 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Front Mic' Simple mixer control 'Input Source',2 Capabilities: cenum Items: 'Front Mic' 'Rear Mic' 'Line' 'CD' 'Mix' Item0: 'Line'
but those "Universal Jack" input source are enum
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5548
Simple mixer control 'Line Input Source',0 Capabilities: enum Items: 'Mic2 Jack' 'Mic1 Jack' 'Line In Jack' 'Front Jack' 'Rear Jack' 'Center/LFE Jack' 'Mute' Item0: 'Line In Jack'
Simple mixer control 'Mic Input Source',0 Capabilities: enum Items: 'Mic2 Jack' 'Mic1 Jack' 'Line In Jack' 'Front Jack' 'Rear Jack' 'Center/LFE Jack' 'Mute' Item0: 'Mic1 Jack' Simple mixer control 'Mic Select',0 Capabilities: enum Items: 'Mic1' 'Mic2' Item0: 'Mic1'
These are really not for captures. Thus it's correct to assign to the global enum.
Takashi
Am Dienstag, den 13.03.2012, 14:32 +0100 schrieb Takashi Iwai:
At Tue, 13 Mar 2012 10:52:21 +0100, Takashi Iwai wrote:
At Mon, 12 Mar 2012 22:09:35 +0100, Christian Esken (KDE) wrote:
Hello,
when I run amixer it shows the capability "penum" on nearly every Simple mixer control. I posted the bug report https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 , but Raymond asked me to report it on this mailing list ("as it is related to this patch 6d511eefa05878abee9f8b9145697230de605200 Implements support for capture/playback enums.").
I posted details for the following two examples in https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5496 :
- "Creative X-Fi" does not have any Enum's. alsamixer does not show
Enums's. amixer lists "penum" for ALL Simple mixer controls.
- "HDA ATI SB" has no penum's, only 3 cenum's. alsamixer shows it
correctly, but amixer disagrees and shows penum for NEARLY ALL Simple mixer controls (except for those with cpability "cenum").
I found this as I received several bug reports for KMix with "absurd" amixer output. I could perceive from those bug report that the bug is affecting a lot (or all?) sound cards.
Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later.
I committed the fix to git tree now. The fix patch is below.
I compiled and installed the alsa-lib from git, and the existing old executable (1.0.24.2 from openSUSE 12.1) now shows the correct values. I also tested with amixer from git, and it also works for me.
Thanks for the quick fix.
Christian
participants (3)
-
Christian Esken (KDE)
-
Raymond Yau
-
Takashi Iwai