5 Jul
2015
5 Jul
'15
9:42 a.m.
What is the best way to set the *runtime->hw* parameter in ALSA driver.
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? So if we set MONO in our structure, but play a audio file with STEREO data, does ALSA automatically configure the data according to its structure or we're going to get some kind of disruption?
If we want our driver to play any sound file, what should be the appropriate *structure snd_pcm_hardware *parameters?
Thanks -Azizul Hakim