ALSA: mips: Deliver indirect-PCM transfer error
authorTakashi Iwai <tiwai@suse.de>
Fri, 19 May 2017 16:41:45 +0000 (18:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 25 May 2017 21:34:46 +0000 (23:34 +0200)
Now that the indirect-PCM transfer helper gives back an error, we
should return the error from ack callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/mips/hal2.c

index 00fc9241d2669604e0cd43fa6924758aa8996ed3..684dc4ddef4131389352e5c1bd3aa8b0ead1644b 100644 (file)
@@ -616,10 +616,9 @@ static int hal2_playback_ack(struct snd_pcm_substream *substream)
        struct hal2_codec *dac = &hal2->dac;
 
        dac->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
-       snd_pcm_indirect_playback_transfer(substream,
-                                          &dac->pcm_indirect,
-                                          hal2_playback_transfer);
-       return 0;
+       return snd_pcm_indirect_playback_transfer(substream,
+                                                 &dac->pcm_indirect,
+                                                 hal2_playback_transfer);
 }
 
 static int hal2_capture_open(struct snd_pcm_substream *substream)
@@ -707,10 +706,9 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream)
        struct snd_hal2 *hal2 = snd_pcm_substream_chip(substream);
        struct hal2_codec *adc = &hal2->adc;
 
-       snd_pcm_indirect_capture_transfer(substream,
-                                         &adc->pcm_indirect,
-                                         hal2_capture_transfer);
-       return 0;
+       return snd_pcm_indirect_capture_transfer(substream,
+                                                &adc->pcm_indirect,
+                                                hal2_capture_transfer);
 }
 
 static struct snd_pcm_ops hal2_playback_ops = {