On Fri, Apr 24, 2009 at 10:30 AM, maarten van es maarten.h.van.es@gmail.com wrote:
Hi
Right now I don't have the machine at hand as I'm at work, but I don't think the sample format is the problem. Like I said, my program works fine with the hdsp on glibc / alsa. On uclibc / salsa I get the error setting any hw param, starting with setting the access method to rw_interleaved, and including setting the sample rate while I switched the card already to the correct rate with amixer. Furthermore, if the problem is an unsupported format I wouldn't expect the error to be "operation not permitted". I'll try that program anyway when I'm back home to see what it tells me.
Thanks Maarten
On Fri, Apr 24, 2009 at 10:03 AM, Clemens Ladisch clemens@ladisch.de wrote:
(please don't top-post)
maarten van es wrote:
Thanks, but that's not it. I make sure I set the correct sample rate with amixer first.
And what about the sample format? I looked at the drivers; the two sound cards do not have a common sample format.
Best regards, Clemens
Thanks, the problem was indeed that I was setting hwparams that are not supported by the card. I do think salsa lib could return a more relevant error than "operation not permitted" and I'll see if I can come up with something for that. Right now though I am trying to figure out what snd_pcm_writen needs for its second parameter, void** bufs. I get the error "bad address" when passing in an array of pointers to a malloc-ed space big enough to hold a channels' worth of data. Sorry if I am missing obvious documentation about this, but what should I pass for this parameter?
Regards Maarten