sound: usb: Treat find format failure as error

This allows to check if requested format is supported by
usb audio headset by looking at dmesg log.

Change-Id: I3051dd49a1289e4ab46bb59b3537c664a37c3ee5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2016-08-16 15:17:08 -07:00 committed by Mayank Rana
parent 6801c4daf3
commit 65f7cb5788

View File

@ -587,7 +587,7 @@ int snd_usb_enable_audio_stream(struct snd_usb_substream *subs,
snd_usb_autoresume(subs->stream->chip);
fmt = find_format(subs);
if (!fmt) {
dev_dbg(&subs->dev->dev,
dev_err(&subs->dev->dev,
"cannot set format: format = %#x, rate = %d, channels = %d\n",
subs->pcm_format, subs->cur_rate, subs->channels);
return -EINVAL;