At Wed, 18 Apr 2012 19:51:18 -0400, Jeremy Torres wrote:
Hello,
I have updated pcm.h in the linux kernel to allow for new sample rates.
No, don't do that unless rates are commonly used by many drivers. Use snd_pcm_hw_constraint_list() instead.
For example, I have added 128000 and 144000 sample rates. Per the documentation in pcm.h, I also updated pcm_native.c (the rates table). However when I try and use the "default" device for the sample rates:
- For 128000: plug conversion occurs for 128K, but the slave is
configured to 96K; 2. For 144000: plug conversion is attempted at the 176400 rate;
If the problem still happens even with the explicit rate list, it's easier to debug when you give the patch.
Takashi
Note that: a) I have snd_pcm_hw_resample set to FALSE in my application; however, I've been using aplay/arecord to test as well with repeatable results. b) I do not have an asoundrc setup for plug conversion, etc. I only have the default /usr/share/alsa/alsa.conf; c) When I try the the device "hw:0,0", I get a (proper) warning that the sample rate requested is not being honored (i.e., 96K instead of 128K).
I have placed debug in pcm_lib.c, and pcm_native.c and my sample rate constraints are set. My understanding is if I define a specific rate and it can be matched in the "rates" table, it should be honored.
Environment Info: ALSA lib/driver version 1.0.20 SOC Driver
Any help would be greatly appreciated!
Regards, Jeremy _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel