[Bug 494223] [NEW] jack alsa driver unable to initialize capture-only mode

TraumFlug raumtrug at gmx.de
Tue Dec 8 21:47:38 UTC 2009


Public bug reported:

I came along this trying to make my usb mic (capture only device, has no
outputs) working as "master" device, while piping output with alsa_out
(jack) or jack_load audioadapter (jack2) via resampling to a soundcard.
using the soundcard as output device in straight jack configuration
"works", but gives xruns unless latency is too high for monitoring.

symptomatic: jackd reports "impossible sample width (1) discovered!" and
stops initialization, whenever no output device is specified (also with
the "capture only" command line parameter for jackd). not only for
devices that have no playback channels, but also for duplex devices when
output is to be ommitted. I noticed this since ubuntu 9.04, with 8.10 it
was still working.

I've also already found a "fix" for this problem that can be applied in
the alsa driver sources...please forgive me for not just posting a diff,
I'm new to linux and have still lot's to learn. the same sollution
applies for both jack and jack2, as they share the same alsa driver
code.

in file drivers/alsa/alsa_driver.c, line 234, is the function
"alsa_driver_setup_io_function_pointers". it seems to register the
dithering/memcopy routines for the driver; however, when trying to setup
one for playback, and the sample width is neither 2,3 or 4 (seems to be
initialized to 1 when no output is specified) it "exits" whole jackd
with the error message above.

my sollution was to encompass the whole "switch
(driver->playback_sample_bytes)" construction with an "if
(driver->playback_handle) { ...switch statement here... }", and also the
next switch statement similliarly with "if (driver->capture_handle)
{...}" for consistency. this is done in the whole rest of the code, I
think, and I guess it was just forgotten in that routine when the driver
code was refactured... ;)

I'm not sure if this is foolproof - I don't know the overall code well,
but "patched" jack 116 as well as jack2 ran fine in capture-only mode
after being compiled by me.

** Affects: jack-audio-connection-kit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
jack alsa driver unable to initialize capture-only mode
https://bugs.launchpad.net/bugs/494223
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list