[alsa-devel] Getting pcm_usb_stream plugin to know its limits.
Michaël Cadilhac
michael at cadilhac.name
Thu Dec 31 05:15:07 CET 2009
michael at cadilhac.name (Michaël Cadilhac) writes:
> Next, Audacity stopped segfaulting but still didn't work: it couldn't
> manage to configure the plugin properly.
My second idea was to allow usb_stream to fix its own rate and
period_size, as in:
pcm.!usb_stream {
type usb_stream
period_size 128
rate 44100
card "1"
}
This would be great because it would prevent PortAudio from doing lots
of test (which are pretty slow). This is what I thought would work:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allow.patch
Type: text/x-patch
Size: 3482 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20091230/304d7cc2/attachment.patch
-------------- next part --------------
Basically, I tweaked the argument parsing to accept "rate" and
"period_size", stored them in the snd_pcm_us_t, and used them in
us_set_hw_constraint. It looks to work great with the rate, but when I
set the period_size, aplay can't find a valid configuration (indeed,
snd_pcm_hw_params_any(handle, params); returns an error).
Any help appreciated again!
--
Michaël `Micha' Cadilhac (LITQ, U. de Montréal) -- http://michael.cadilhac.name
|| Free jazz is the Vegemite of the the musical world.
|| It's an aquired taste.
|| -- Marten, QC
More information about the Alsa-devel
mailing list