5 Jul
2015
5 Jul
'15
8:20 p.m.
Azizul Hakim wrote:
What is the best way to set the *runtime->hw* parameter in ALSA driver.
Set it to the capabilities of your hardware.
From sample ALSA driver tutorial I understand we have to declare a *structure snd_pcm_hardware* where we define all sound parameters like *STEREO/MONO, RATES* etc. Now at run time we can play sound files of different parameters. How ALSA behaves if the audio file parameters doesn't match with the *structure_snd_pcm_hardware* parameters?
Applications are not able to set unsupported parameter values.
However, alsa-lib can automatically convert rates/formats.
If we want our driver to play any sound file
Your driver is supposed to driver your hardware. What would you do with an unsupported format?
Regards, Clemens