aboutsummaryrefslogtreecommitdiffstats
path: root/sound/x86/intel_hdmi_audio.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-02-01 17:37:36 +0100
committerTakashi Iwai <tiwai@suse.de>2017-02-03 17:35:17 +0100
commitd0e9b1a23ca3dbe24e88c6671218b9031e37db96 (patch)
treed712e5ebe938e37afeda664dd09163a5b4712b8c /sound/x86/intel_hdmi_audio.c
parentALSA: x86: Fix racy access to chmap (diff)
downloadlinux-dev-d0e9b1a23ca3dbe24e88c6671218b9031e37db96.tar.xz
linux-dev-d0e9b1a23ca3dbe24e88c6671218b9031e37db96.zip
ALSA: x86: Drop flag_underrun field
The flag_underrun flag is used to indicate to escalate the XRUN reporting at the next position inquiry, but there is a much simpler method to achieve it: just call snd_pcm_stop_xrun(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_audio.c')
-rw-r--r--sound/x86/intel_hdmi_audio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index c0cb59e6a89b..9ecdd9ad0199 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1297,11 +1297,6 @@ static snd_pcm_uframes_t snd_intelhad_pcm_pointer(
if (intelhaddata->drv_status == HAD_DRV_DISCONNECTED)
return SNDRV_PCM_POS_XRUN;
- if (intelhaddata->flag_underrun) {
- intelhaddata->flag_underrun = false;
- return SNDRV_PCM_POS_XRUN;
- }
-
/* Use a hw register to calculate sub-period position reports.
* This makes PulseAudio happier.
*/
@@ -1642,8 +1637,7 @@ static int had_process_buffer_underrun(struct snd_intelhad *intelhaddata)
if (stream_type == HAD_RUNNING_STREAM) {
/* Report UNDERRUN error to above layers */
- intelhaddata->flag_underrun = true;
- had_period_elapsed(stream->had_substream);
+ snd_pcm_stop_xrun(stream->had_substream);
}
return 0;
@@ -1965,7 +1959,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
ctx->drv_status = HAD_DRV_DISCONNECTED;
ctx->dev = &pdev->dev;
ctx->card = card;
- ctx->flag_underrun = false;
ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF;
strcpy(card->driver, INTEL_HAD);
strcpy(card->shortname, INTEL_HAD);