Skip to content

Commit

Permalink
ALSA: mips: Deliver indirect-PCM transfer error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed May 25, 2017
1 parent 9629581 commit 0f21e57
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sound/mips/hal2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 0f21e57

Please sign in to comment.