! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
No sliders in xfce4-mixer with ALSA card CA0601, SB Live! 24bit
Status:
RESOLVED: FIXED
Product:
Xfce4-mixer
Component:
General

Comments

Description Samuli Suominen 2006-02-21 18:49:39 CET
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.
Comment 1 Samuli Suominen 2006-02-21 18:55:21 CET
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 :-)
Comment 2 dannym editbugs 2006-02-21 18:59:23 CET
I see...

what does View > Manage say?
Comment 3 Samuli Suominen 2006-02-21 19:13:37 CET
It doesn't say anything, literally. Picture tells more that words:
http://hideout.unk.fi/~drac/xfce4-mixer2.png
Comment 4 dannym editbugs 2006-02-21 19:20:41 CET
and when you hit "+" ?
Comment 5 Samuli Suominen 2006-02-21 19:24:08 CET
Nada.. http://hideout.unk.fi/~drac/xfce4-mixer3.png
No option to select something..

Thanks for fixing PANELDESKTOPDATA dir thingie btw :-)
Comment 6 Samuli Suominen 2006-02-21 19:26:16 CET
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 ~ $

Comment 7 dannym editbugs 2006-02-21 19:38:23 CET
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 :)

Comment 8 Samuli Suominen 2006-02-21 19:59:27 CET
Okay, here is output:

unaffiliated lib # ./test_vc
 Device: default
 Device: #0: CA0106
unaffiliated lib #

No sound came out of speakers.
Comment 9 Samuli Suominen 2006-02-21 20:00:44 CET
And.. no volumes changed in alsamixer (checked afterwards)
Comment 10 dannym editbugs 2006-02-21 20:13:15 CET
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...

Comment 11 Samuli Suominen 2006-02-21 20:37:38 CET
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.
Comment 12 dannym editbugs 2006-02-21 20:47:47 CET
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
Comment 13 Samuli Suominen 2006-02-21 20:52:20 CET
(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)
Comment 14 dannym editbugs 2006-02-21 21:06:12 CET
try a few more of:

n
n
n
n
n
n

at the end... I wonder where it bails out...
Comment 15 dannym editbugs 2006-02-21 21:09:48 CET
also in line 359, print b and e again please (the numbers before the code parts 
in the gdb output are line numbers)
Comment 16 Samuli Suominen 2006-02-21 21:13:26 CET
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)

Comment 17 dannym editbugs 2006-02-21 21:14:31 CET
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)

Comment 18 dannym editbugs 2006-02-21 21:15:21 CET
um, in line 353, handle is NULL ?

print handle please in line 353
Comment 19 dannym editbugs 2006-02-21 21:16:12 CET
also, break in vc_alsa.c:93, because that's where handle is set... then the n n 
n n thing :)

Thanks
Comment 20 dannym editbugs 2006-02-21 21:21:40 CET
(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 :))
Comment 21 Samuli Suominen 2006-02-21 21:29:32 CET
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 ---
Comment 22 Samuli Suominen 2006-02-21 21:30:48 CET
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
Comment 23 Samuli Suominen 2006-02-21 21:34:32 CET
(gdb) print handle
$3 = (snd_mixer_t *) 0x0


0x0 looks bad to me? :P
Comment 24 dannym editbugs 2006-02-21 21:38:54 CET
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...

Comment 25 Samuli Suominen 2006-02-21 21:46:10 CET
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
Comment 26 Samuli Suominen 2006-02-21 21:59:31 CET
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 ~ $
Comment 27 dannym editbugs 2006-02-21 22:03:38 CET
added "Analog Front" to svn, try now (best just "svn up", then recompile 
test_vc)
Comment 28 Samuli Suominen 2006-02-21 22:13:12 CET
MAN. YOU FIXED IT.

http://hideout.unk.fi/~drac/xfce4-mixer4.png

:-)
Comment 29 Samuli Suominen 2006-02-21 22:21:22 CET
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.
Comment 30 dannym editbugs 2006-02-21 22:27:26 CET
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 :)

Comment 31 Yves-Alexis Perez editbugs 2007-05-26 15:23:03 CEST
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

Bug #1489

Reported by:
Samuli Suominen
Reported on: 2006-02-21
Last modified on: 2009-07-14

People

CC List:
1 user

Version

Attachments

Additional information