I get no sliders with xfce4-mixer. Screenshot: http://hideout.unk.fi/~drac/xfce4-mixer.png driver is ca0601 alsamixer works. alsamixergui works. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Hmm. It was configure with --prefix=/usr --with-sound=alsa , cause it defaulted to oss first. And it detected 4.4 Panel, mighty mouse or whatever that was called :-)
I see... what does View > Manage say?
It doesn't say anything, literally. Picture tells more that words: http://hideout.unk.fi/~drac/xfce4-mixer2.png
and when you hit "+" ?
Nada.. http://hideout.unk.fi/~drac/xfce4-mixer3.png No option to select something.. Thanks for fixing PANELDESKTOPDATA dir thingie btw :-)
drac@unaffiliated ~ $ cat ~/.config/xfce4/mixer/config.xml <?xml version="1.0"?> <Mixer> <device name="default"> <position x="25" y="546"/> <size width="600" height="235"/> <state sticky="0"/> <disclosure expanded="0"/> </device> </Mixer> drac@unaffiliated ~ $ cat ~/.config/xfce4/mixer/profiles.xml <?xml version="1.0"?> <Profiles> <device name="default"> <profile name="new"> <controls/> </profile> <profile name="new2"> <controls/> </profile> <profile name="Something.."> <controls/> </profile> </device> </Profiles> drac@unaffiliated ~ $
no problem :) ok, about the mixer stuff: try this: cd xfce4-mixer/lib gcc -o test_vc test_vc.c vc_oss.c vc_alsa.c -I../include `pkg-config --cflags -- libs gtk+-2.0 libxfce4util-1.0` vc.c vcs.c -DUSE_ALSA -DHAVE_CONFIG_H -g3 -I.. - lasound ./test_vc DO NOT PLAY ANY AUDIO while doing that :) Jasper knows why I say that :) the test program changes all the volumes, so if you value your ears / peace with your neighbours... don't :)
Okay, here is output: unaffiliated lib # ./test_vc Device: default Device: #0: CA0106 unaffiliated lib # No sound came out of speakers.
And.. no volumes changed in alsamixer (checked afterwards)
hmm.. that should output a list of controls it found too... apparently zero.. weird can you use a debugger? Put a breakpoint at vc_alsa.c:346 and at vc_alsa.c:356, please... I wonder what the heck it's doing...
I have gdb installed, but to be honest, i'm really not so good with it as in I don't know what you mean by breakpoints at those lines.. But if you can quickly introduce me to secrets of doing that sure. Or I can even provide you temporary access to this machine to debug the issue. Whatever is easiest way.
something along these lines would be nice: gdb ./test_vc break vc_alsa.c:346 break vc_alsa.c:356 run *wait until it breaks* n print b n print e
(gdb) break vc_alsa.c:346 Breakpoint 1 at 0x804a03a: file vc_alsa.c, line 346. (gdb) break vc_alsa.c:356 Breakpoint 2 at 0x804a056: file vc_alsa.c, line 356. (gdb) run Starting program: /tmp/xfce4-mixer/trunk/lib/test_vc [Thread debugging using libthread_db enabled] [New Thread -1209510224 (LWP 29545)] Device: default [Switching to Thread -1209510224 (LWP 29545)] Breakpoint 1, vc_get_control_list () at vc_alsa.c:346 346 g = NULL; (gdb) n 352 if (!handle) { (gdb) print b $1 = (snd_mixer_elem_t *) 0xffffffff (gdb) n 353 return NULL; (gdb) print e $2 = (snd_mixer_elem_t *) 0xbfc9d8b8 (gdb)
try a few more of: n n n n n n at the end... I wonder where it bails out...
also in line 359, print b and e again please (the numbers before the code parts in the gdb output are line numbers)
unaffiliated lib # gdb ./test_vc GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) break vc_alsa.c:346 Breakpoint 1 at 0x804a03a: file vc_alsa.c, line 346. (gdb) break vc_alsa.c:356 Breakpoint 2 at 0x804a056: file vc_alsa.c, line 356. (gdb) run Starting program: /tmp/xfce4-mixer/trunk/lib/test_vc [Thread debugging using libthread_db enabled] [New Thread -1209276752 (LWP 29640)] Device: default [Switching to Thread -1209276752 (LWP 29640)] Breakpoint 1, vc_get_control_list () at vc_alsa.c:346 346 g = NULL; (gdb) n 352 if (!handle) { (gdb) print b $1 = (snd_mixer_elem_t *) 0xffffffff (gdb) n 353 return NULL; (gdb) print e $2 = (snd_mixer_elem_t *) 0xbfcd9238 (gdb) n 399 } (gdb) n vc_get_control_list () at vc.c:217 217 } (gdb) n main () at test_vc.c:28 28 control_item = controls; (gdb) n 29 while (control_item != NULL) { (gdb) n 40 device_item = g_list_next (device_item); (gdb) n 20 while (device_item != NULL) { (gdb) n 21 device_name = (gchar const*) device_item->data; (gdb) n 23 printf(" Device: %s\n", device_name); (gdb) n Device: #0: CA0106 25 vc_set_device (device_name); (gdb) n 27 controls = vc_get_control_list (); (gdb) n Breakpoint 1, vc_get_control_list () at vc_alsa.c:346 346 g = NULL; (gdb) n 352 if (!handle) { (gdb) n 353 return NULL; (gdb) n 399 } (gdb) n vc_get_control_list () at vc.c:217 217 } (gdb) n main () at test_vc.c:28 28 control_item = controls; (gdb) n 29 while (control_item != NULL) { (gdb) n 40 device_item = g_list_next (device_item); (gdb) n 20 while (device_item != NULL) { (gdb) n 43 vc_free_device_list (devices); (gdb) n 46 return 0; (gdb) n 47 } (gdb) n 0x49519f1b in __libc_start_main () from /lib/libc.so.6 (gdb) n Single stepping until exit from function __libc_start_main, which has no line number information. Program exited normally. Couldn't get registers: No such process. (gdb)
as a short rundown of gdb so you know what you are doing: :) "break" puts a breakpoint that the debugger will stop the program on, if they are reached, no matter what. "n" stops at the next statement, whereas a function call counts as a command. "s" stops at the next statement, whereas a function call will cause it to stop at the first statement _in_ the called function (most of the time annoying, but useful at times)
um, in line 353, handle is NULL ? print handle please in line 353
also, break in vc_alsa.c:93, because that's where handle is set... then the n n n n thing :) Thanks
(btw: it might seem obvious that in line 353 handle must be NULL - because otherwise the "if" branch would not have been entered -, but I've seen compilers optimize in strange ways so it's always better to make sure :))
reakpoint 1, vc_get_control_list () at vc_alsa.c:346 346 g = NULL; (gdb) n 352 if (!handle) { (gdb) n 353 return NULL; (gdb) print handle $3 = (snd_mixer_t *) 0x0 (gdb) n 399 } --- cut --- cut --- (gdb) break vc_alsa.c:93 Breakpoint 1 at 0x8049913: file vc_alsa.c, line 93. (gdb) n The program is not being run. (gdb) run Starting program: /tmp/xfce4-mixer/trunk/lib/test_vc [Thread debugging using libthread_db enabled] [New Thread -1209792848 (LWP 31547)] [Switching to Thread -1209792848 (LWP 31547)] Breakpoint 1, find_master () at vc_alsa.c:93 93 if ((err = snd_mixer_open(&handle, 0)) < 0 || !handle) { (gdb) n 98 if ((err = snd_mixer_attach(handle, card)) < 0) { (gdb) n 105 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { (gdb) n 113 err = snd_mixer_load(handle); (gdb) n 114 if (err < 0) { (gdb) n 122 elem = snd_mixer_find_selem(handle, sid); (gdb) n 123 if (!elem) { (gdb) n 124 elem = snd_mixer_find_selem(handle, sid2); (gdb) n 125 if (!elem) { (gdb) n 130 snd_mixer_close(handle); (gdb) n 131 handle = NULL; (gdb) n 135 } (gdb) n init () at vc_alsa.c:164 164 return USE_THAT; (gdb) n 165 } (gdb) n 0x0804a6bd in register_alsa () at vc_alsa.c:628 628 REGISTER_VC_PLUGIN(alsa); (gdb) n register_vcs () at vcs.c:40 40 } (gdb) n main () at test_vc.c:17 17 devices = vc_get_device_list (); (gdb) n 18 if (devices != NULL) { (gdb) n 19 device_item = devices; (gdb) n 20 while (device_item != NULL) { (gdb) n 21 device_name = (gchar const*) device_item->data; (gdb) n 23 printf(" Device: %s\n", device_name); (gdb) n Device: default 25 vc_set_device (device_name); (gdb) n Breakpoint 1, find_master () at vc_alsa.c:93 93 if ((err = snd_mixer_open(&handle, 0)) < 0 || !handle) { (gdb) n 98 if ((err = snd_mixer_attach(handle, card)) < 0) { (gdb) n 105 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { (gdb) n 113 err = snd_mixer_load(handle); (gdb) n 114 if (err < 0) { (gdb) n 122 elem = snd_mixer_find_selem(handle, sid); (gdb) n 123 if (!elem) { (gdb) n 124 elem = snd_mixer_find_selem(handle, sid2); (gdb) n 125 if (!elem) { (gdb) n 130 snd_mixer_close(handle); (gdb) n 131 handle = NULL; (gdb) n 135 } (gdb) n vc_reinit_device () at vc_alsa.c:156 156 if (!elem) return -1; (gdb) n 159 } (gdb) n vc_set_device (which=0x804d0c8 "default") at vc.c:108 108 } (gdb) n main () at test_vc.c:27 27 controls = vc_get_control_list (); (gdb) n 28 control_item = controls; (gdb) n 29 while (control_item != NULL) { (gdb) n 40 device_item = g_list_next (device_item); (gdb) n 20 while (device_item != NULL) { (gdb) n 21 device_name = (gchar const*) device_item->data; (gdb) n 23 printf(" Device: %s\n", device_name); (gdb) n Device: #0: CA0106 25 vc_set_device (device_name); (gdb) n Breakpoint 1, find_master () at vc_alsa.c:93 93 if ((err = snd_mixer_open(&handle, 0)) < 0 || !handle) { (gdb) n 98 if ((err = snd_mixer_attach(handle, card)) < 0) { (gdb) n 105 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { (gdb) n 113 err = snd_mixer_load(handle); (gdb) n 114 if (err < 0) { (gdb) n 122 elem = snd_mixer_find_selem(handle, sid); (gdb) n 123 if (!elem) { (gdb) n 124 elem = snd_mixer_find_selem(handle, sid2); (gdb) n 125 if (!elem) { (gdb) n 130 snd_mixer_close(handle); (gdb) n 131 handle = NULL; (gdb) n 135 } (gdb) n vc_set_device (name=0x804d0a0 "#0: CA0106") at vc_alsa.c:140 140 if (name && name[0] == '#') { (gdb) n 151 } (gdb) n vc_set_device (which=0x804d0a0 "#0: CA0106") at vc.c:103 103 if (s->vc_reinit_device) { (gdb) n 104 (*s->vc_reinit_device) (); (gdb) n Breakpoint 1, find_master () at vc_alsa.c:93 93 if ((err = snd_mixer_open(&handle, 0)) < 0 || !handle) { (gdb) n 98 if ((err = snd_mixer_attach(handle, card)) < 0) { (gdb) n 105 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { (gdb) n 113 err = snd_mixer_load(handle); (gdb) n 114 if (err < 0) { (gdb) n 122 elem = snd_mixer_find_selem(handle, sid); (gdb) n 123 if (!elem) { (gdb) n 124 elem = snd_mixer_find_selem(handle, sid2); (gdb) n 125 if (!elem) { (gdb) n 130 snd_mixer_close(handle); (gdb) n 131 handle = NULL; (gdb) n 135 } (gdb) n vc_reinit_device () at vc_alsa.c:156 156 if (!elem) return -1; (gdb) n 159 } (gdb) n vc_set_device (which=0x804d0a0 "#0: CA0106") at vc.c:108 108 } (gdb) n main () at test_vc.c:27 27 controls = vc_get_control_list (); (gdb) n 28 control_item = controls; (gdb) n 29 while (control_item != NULL) { (gdb) n 40 device_item = g_list_next (device_item); (gdb) n 20 while (device_item != NULL) { (gdb) n 43 vc_free_device_list (devices); (gdb) n 46 return 0; (gdb) n 47 } (gdb) n 0x49519f1b in __libc_start_main () from /lib/libc.so.6 (gdb) n Single stepping until exit from function __libc_start_main, which has no line number information. Program exited normally. Couldn't get registers: No such process. (gdb) --- cut --- cut ---
I didn't see line 359 for print b and print e ? Heh. I hope my output was.. umm.. correct ;-) Sure you explained this to me but man i'm lost lol
(gdb) print handle $3 = (snd_mixer_t *) 0x0 0x0 looks bad to me? :P
yeah, line 359 is not reached because handle is 0. line 131 set it to 0 because neither a control named "Master" nor a control named "PCM" was found. What *are* the controls called? Check in alsamixer or something...
I use for output "Analog Front", that is the only active control i'm needing. No PCM, no Master. There is also: Mic/Line in Capture [Mic in] Analog Center/LFE Analog Rear Analog Side SPDIF Center/LFE SPDIF Front SPDIF Out [Off] SPDIF Rear SPDIF Unknown CAPTURE feedback Maybe this helps: http://hideout.unk.fi/~drac/CA0106.conf from /usr/share/alsa/cards media-libs/alsa-lib-1.0.11_rc3 media-libs/alsa-oss-1.0.11_rc3 media-sound/alsa-headers-1.0.11_rc3 media-sound/alsa-tools-1.0.11_rc3 media-sound/alsa-utils-1.0.11_rc2
drac@unaffiliated ~ $ amixer scontrols Simple mixer control 'Mic/Line in Capture',0 Simple mixer control 'AC97 in',0 Simple mixer control 'Analog Center/LFE',0 Simple mixer control 'Analog Front',0 Simple mixer control 'Analog Rear',0 Simple mixer control 'Analog Side',0 Simple mixer control 'CAPTURE feedback',0 Simple mixer control 'SPDIF Center/LFE',0 Simple mixer control 'SPDIF Front',0 Simple mixer control 'SPDIF Out',0 Simple mixer control 'SPDIF Rear',0 Simple mixer control 'SPDIF Unknown',0 Simple mixer control 'SPDIF in',0 Simple mixer control 'SPDIF out',0 Simple mixer control 'SRC out',0 Simple mixer control 'i2s in',0 Simple mixer control 'i2s mixer out',0 drac@unaffiliated ~ $
added "Analog Front" to svn, try now (best just "svn up", then recompile test_vc)
MAN. YOU FIXED IT. http://hideout.unk.fi/~drac/xfce4-mixer4.png :-)
now there is only minor cosmetic issue with panel plugin, since there is only 1 slider active.. it looks a bit big: http://hideout.unk.fi/~drac/xfce4-mixer5.png but I don't mind :) thanks again for fixing it.
very good :) now about the slider size, I don't know... it really depends on the theme... one of those days I'm going to get it right :)
A debian user reported the same bug (but different name). His mixer is called "Front". (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=382274) Should I reopen the bug or open a new one? Regards, -- Yves-Alexis