pcm: Don't assert in _snd_pcm_hw_params_internal()

It's no fatal error from sw params, and it's really bad habit to use
assert() and abort the operation as a system library.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2015-06-01 13:45:01 +02:00
parent 8551fe2587
commit a5e5e3cd3c

View file

@ -2361,7 +2361,8 @@ int _snd_pcm_hw_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
memset(&sw, 0, sizeof(sw));
snd_pcm_sw_params_default(pcm, &sw);
err = snd_pcm_sw_params(pcm, &sw);
assert(err >= 0);
if (err < 0)
return err;
if (pcm->mmap_rw ||
pcm->access == SND_PCM_ACCESS_MMAP_INTERLEAVED ||