NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: nbmix - curses mixer using audio(4)
On Thu, Feb 18, 2010 at 09:53:50AM -0700, Patrick Mahoney wrote:
> On Tue, Feb 16, 2010 at 11:44:20PM +0100, Rhialto wrote:
> > On Mon 15 Feb 2010 at 23:04:11 -0700, Patrick Mahoney wrote:
> > > > nbmix - http://polycrystal.org/nbmix
> > >
> > > I updated (v0.2) to fix the obvious segfault and to support
> > > 'enum' controls, but now there are more untested code paths.
> >
> > I've discovered one :-) Writing to the mixer can give a "device busy"
> > error on my hardware for some settings (if audio is currently playing;
> > with the azalia driver), in which case nbmix currently exists. If it
> > just shows the error (and doesn't retry or exit) it would be fine.
>
> Thanks for testing. It's true, at the moment I treat all
> errors equally and simply exit, which is not useful in your
> case.
>
> Question:
>
> Neither ioctl(2) nor audio(4) document a possible error of
> EBUSY (which is what I assume is the azalia error return;
> azalia_codec.c:generic_mixer_set has a couple EBUSY possible
> returns).
>
> Is it expected that syscalls document all possible error
> returns? (Is a simple documentation patch for ioctl(2) in
> order?).
>
> Or, should an EBUSY return be documented in audio(4) and not
> ioctl(2)?
>
> Or, should one expect that any syscall might return any
> valid errno?
>
> Thanks.
>
> --
> Patrick Mahoney <pat%polycrystal.org@localhost>
Still segfaulting here.. I attached the backtrace.
--
Demelier David
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
(gdb) run
Starting program: /usr/home/markand/devel/nbmix/bin/nbmix
Program received signal SIGSEGV, Segmentation fault.
0x0804917e in mixer_dev_cmp (a=0xbb90b0a0, b=0x14) at src/nbmix.c:93
93 int i2 = *((int *) b);
(gdb) bt full
#0 0x0804917e in mixer_dev_cmp (a=0xbb90b0a0, b=0x14) at src/nbmix.c:93
i1 = 16
i2 = -1145082583
m1 = (mixer_devinfo_t *) 0x80488a5
m2 = (mixer_devinfo_t *) 0x78a694
#1 0x080492fc in mixer_dev_cmp (a=0xbb90b0a0, b=0xbb90b0b4) at src/nbmix.c:111
i1 = 16
i2 = 21
m1 = (mixer_devinfo_t *) 0xbb9052c0
m2 = (mixer_devinfo_t *) 0xbb90629c
#2 0xbbb7fa45 in qsort () from /usr/lib/libc.so.12
No symbol table info available.
#3 0x080498c6 in init_controls () at src/nbmix.c:277
i = 42
ret = 0
tmp = {index = 42, label = {name = "enable\000\000\000s\000\000\000\000\000",
msg_id = 8}, type = 1, mixer_class = 40, next = -1, prev = -1, un = {e =
{num_mem = 2, member = {{label = {name = "off", '\0' <repeats 12 times>, msg_id
= 0}, ord = 0}, {label = {
name = "on", '\0' <repeats 13 times>, msg_id = 0}, ord = 1}, {label
= {name = '\0' <repeats 15 times>, msg_id = 0}, ord = 0} <repeats 30 times>}},
s = {num_mem = 2, member = {{label = {name = "off", '\0' <repeats 12 times>,
msg_id = 0}, mask = 0}, {label = {
name = "on", '\0' <repeats 13 times>, msg_id = 0}, mask = 1},
{label = {name = '\0' <repeats 15 times>, msg_id = 0}, mask = 0} <repeats 30
times>}}, v = {units = {name =
"\002\000\000\000off\000\000\000\000\000\000\000\000", msg_id = 0},
num_channels = 0,
delta = 0}}}
controls = (list_t *) 0xbb901040
prev_ctrl = (ctrl_t *) 0x0
#4 0x08049ded in main (argc=0, argv=0xbfbfec3c) at src/nbmix.c:448
ret = 0
ch = -1
mixer_file = 0x804c099 "/dev/mixer"
ad = {name = "SB Live!\000\000\000\000\000\000\000", version = "0x0a", '\0'
<repeats 11 times>, config = "emuxki\000\000\000\000\000\000\000\000\000"}
label =
"ÃïÂÃ\r\000\000`ÂÂÂë\206JÂÂk\t\000\000\000ÄÂDë\001\000\000\000\001\000\000\000z\001ÂÂ\000ÄÂ\000ÄÂÃ!ÂÂt?ÂÂ\000\000\000\000ÃGÂÂ\000ÄÂh\027\000\000@=ÂÂt?ÂÂ\000ÂÂÂ\202\002\000\000Ã!ÂÂÂëÃ\000ÂÂt?ÂÂ8ìÃGÂÂ\000ÂÂÂÂ\021\000\000Ã!ÂÂ"
header = {lb_item = {type = 28189852, get_width = 0xbbae78ac
<environ+3014239056>, get_height = 0xbbae8483 <environ+3014242087>, paint =
0xbbbf6fb3 <_rtld_find_symdef+143>, handle_key = 0xbbaedcb1
<environ+3014264661>, has_focus = 64971124},
lb_text = 0xbbbec400 "zÂPÃ\001"}
doc = {lb_item = {type = 128680363, get_width = 0xbbbec400, get_height =
0xbfbfeb10, paint = 0x1, handle_key = 0x6e, has_focus = -1145125888}, lb_text =
0xbbbf6f30 "[\201Ã\200"}
controls = (list_t *) 0x804befe
controls_iter = {cur = 0xbbbf6fb3, next = 0xbbae8483}
last_update = {tv_sec = -1146190717, tv_usec = -1145125888}
Home |
Main Index |
Thread Index |
Old Index