mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[ALSA] Handle the error correctly in SNDCTL_DSP_SETFMT ioctl
Handle the error returned from snd_pcm_oss_get_formats() correctly in SNDCTL_DSP_SETFMT ioctl handler of PCM OSS emulation. Signed-off-by: Steven Finney <sfinney@healthhero.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bc56eff127
commit
5c59e09d7e
1 changed files with 2 additions and 0 deletions
|
@ -1242,6 +1242,8 @@ static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int for
|
|||
|
||||
if (format != AFMT_QUERY) {
|
||||
formats = snd_pcm_oss_get_formats(pcm_oss_file);
|
||||
if (formats < 0)
|
||||
return formats;
|
||||
if (!(formats & format))
|
||||
format = AFMT_U8;
|
||||
for (idx = 1; idx >= 0; --idx) {
|
||||
|
|
Loading…
Reference in a new issue