Skip to content

Commit

Permalink
ALSA: hiface: return correct XRUN indication
Browse files Browse the repository at this point in the history
Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of
SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer
function of hiface, as expected by snd_pcm_update_hw_ptr0().

Caught by sparse.

Cc: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eldad Zack authored and Takashi Iwai committed Jul 24, 2013
1 parent be2f93a commit fee4b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/hiface/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub)
snd_pcm_uframes_t dma_offset;

if (rt->panic || !sub)
return SNDRV_PCM_STATE_XRUN;
return SNDRV_PCM_POS_XRUN;

spin_lock_irqsave(&sub->lock, flags);
dma_offset = sub->dma_off;
Expand Down

0 comments on commit fee4b70

Please sign in to comment.