I believe this is a bug: the loop in plug_alloc doesn't iterate completely through the plugin linked list. The problem with this, is that snd_pcm_plugin_alloc won't get called for every plugin in the list, and vital components of those plugins won't be initialized.I see the "read return 0" problem sometimes with the intel8x0, but for me the problem appeared with arecord, and seemed to depend on some mixer settings.
The solution would be to replace the while (plugin->next/prev) lines with while (plugin), to move lines: plugin = plugin->next/prev to the spot just after if (err < 0) return err;
I found that the aformentioned changes fixed a problem I was having with reading from /dev/dsp. Unless I set the rate to 48000, then read() would always return 0. This was because when read_transfer iterated through the plugins, the "rate conversion" plugin, which had not been initialized, had the value 0 in dst_channels[0].frames. This caused the entire read call to return 0.
BTW, I'm using the intel8x0 driver, and the latest 0.9.6 release of alsa-drivers.
Anyone else agree that this is a bug? Or am I missing something, that requires that plug_alloc to NOT iterate completely through the list?
Thanks, -Nick
Cheers
James
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel