salsa error message setting hwparams
Hi everyone,
I am running out of ideas of why I am getting the error "operation not permitted" when I try setting hw parameters with one of my audio cards. I have a custom linux system based on uclibc with salsa for audio and use the default device for playback. This sytem works fine on a via C7 based pc with via audio. When I try an exact copy of the system on an athlon64 based system with a HDPS9632 I get this error message. The card works fine with other linux systems. I tested several (recent) kernels with my system, all the same result. Any ideas why I might be getting this message?
Maarten
Quoted 3 lines · maarten van es
This sytem works fine on a via C7 based pc with via audio. When I try an exact copy of the system on an athlon64 based system with a HDPS9632 I get this error message.
It's probably that the HDSP does not support the sample format or rate that you're tryint to use. Try this tool:
http://article.gmane.org/gmane.linux.alsa.user/32525
HTH
Clemens
A message that is not in the archive (sent off-list or not yet received): [email protected]
(please don't top-post)
Quoted 2 lines · maarten van es
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · maarten van es
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.
Quoted 18 lines
Thanks
MaartenQuoted 13 lines · Clemens Ladisch
(please don't top-post)
Quoted 2 lines · maarten van es
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