* amixer shows capability "penum" on every Simple mixer control
@ 2012-03-12 21:09 Christian Esken (KDE)
2012-03-13 9:52 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: Christian Esken (KDE) @ 2012-03-12 21:09 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-12 21:09 amixer shows capability "penum" on every Simple mixer control Christian Esken (KDE) @ 2012-03-13 9:52 ` Takashi Iwai 2012-03-13 13:32 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2012-03-13 9:52 UTC (permalink / raw) To: Christian Esken (KDE); +Cc: alsa-devel 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 : > > 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. Looks like a bug in alsa mixer abstraction, indeed. Will take a look at it later. thanks, Takashi ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-13 9:52 ` Takashi Iwai @ 2012-03-13 13:32 ` Takashi Iwai 2012-03-14 12:35 ` Raymond Yau 2012-03-16 20:18 ` Christian Esken (KDE) 0 siblings, 2 replies; 8+ messages in thread From: Takashi Iwai @ 2012-03-13 13:32 UTC (permalink / raw) To: Christian Esken (KDE); +Cc: alsa-devel 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 : > > > > 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. > > 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 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-13 13:32 ` Takashi Iwai @ 2012-03-14 12:35 ` Raymond Yau 2012-03-14 13:43 ` Takashi Iwai 2012-03-16 20:18 ` Christian Esken (KDE) 1 sibling, 1 reply; 8+ messages in thread From: Raymond Yau @ 2012-03-14 12:35 UTC (permalink / raw) To: Takashi Iwai; +Cc: Christian Esken (KDE), alsa-devel 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 : >> > >> > 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. >> >> 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' ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-14 12:35 ` Raymond Yau @ 2012-03-14 13:43 ` Takashi Iwai 2012-03-15 0:23 ` Raymond Yau 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2012-03-14 13:43 UTC (permalink / raw) To: Raymond Yau; +Cc: Christian Esken (KDE), alsa-devel 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 : > >> > > >> > 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. > >> > >> 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-14 13:43 ` Takashi Iwai @ 2012-03-15 0:23 ` Raymond Yau 2012-03-15 6:32 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Raymond Yau @ 2012-03-15 0:23 UTC (permalink / raw) To: Takashi Iwai; +Cc: Christian Esken (KDE), alsa-devel 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' ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-15 0:23 ` Raymond Yau @ 2012-03-15 6:32 ` Takashi Iwai 0 siblings, 0 replies; 8+ messages in thread From: Takashi Iwai @ 2012-03-15 6:32 UTC (permalink / raw) To: Raymond Yau; +Cc: Christian Esken (KDE), alsa-devel 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: amixer shows capability "penum" on every Simple mixer control 2012-03-13 13:32 ` Takashi Iwai 2012-03-14 12:35 ` Raymond Yau @ 2012-03-16 20:18 ` Christian Esken (KDE) 1 sibling, 0 replies; 8+ messages in thread From: Christian Esken (KDE) @ 2012-03-16 20:18 UTC (permalink / raw) To: alsa-devel 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 : > > > > > > 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. > > > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-16 20:18 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-12 21:09 amixer shows capability "penum" on every Simple mixer control Christian Esken (KDE) 2012-03-13 9:52 ` Takashi Iwai 2012-03-13 13:32 ` Takashi Iwai 2012-03-14 12:35 ` Raymond Yau 2012-03-14 13:43 ` Takashi Iwai 2012-03-15 0:23 ` Raymond Yau 2012-03-15 6:32 ` Takashi Iwai 2012-03-16 20:18 ` Christian Esken (KDE)
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.