diff options
Diffstat (limited to 'sound/x86/intel_hdmi_audio.c')
-rw-r--r-- | sound/x86/intel_hdmi_audio.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index 11ee4dddc5dd..8506a3dc0298 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -238,17 +238,15 @@ static void had_enable_audio(struct snd_pcm_substream *substream, had_write_register(intelhaddata, AUD_CONFIG, val); } -/* enable / disable the audio interface */ -static void had_enable_audio_int(struct snd_intelhad *ctx, bool enable) +/* forcibly ACKs to both BUFFER_DONE and BUFFER_UNDERRUN interrupts */ +static void had_ack_irqs(struct snd_intelhad *ctx) { u32 status_reg; - if (enable) { - had_read_register(ctx, AUD_HDMI_STATUS, &status_reg); - status_reg |= HDMI_AUDIO_BUFFER_DONE | HDMI_AUDIO_UNDERRUN; - had_write_register(ctx, AUD_HDMI_STATUS, status_reg); - had_read_register(ctx, AUD_HDMI_STATUS, &status_reg); - } + had_read_register(ctx, AUD_HDMI_STATUS, &status_reg); + status_reg |= HDMI_AUDIO_BUFFER_DONE | HDMI_AUDIO_UNDERRUN; + had_write_register(ctx, AUD_HDMI_STATUS, status_reg); + had_read_register(ctx, AUD_HDMI_STATUS, &status_reg); } /* Reset buffer pointers */ @@ -1169,7 +1167,7 @@ static int had_pcm_trigger(struct snd_pcm_substream *substream, int cmd) intelhaddata->stream_info.running = true; /* Enable Audio */ - had_enable_audio_int(intelhaddata, true); + had_ack_irqs(intelhaddata); /* FIXME: do we need this? */ had_enable_audio(substream, intelhaddata, true); break; @@ -1183,11 +1181,9 @@ static int had_pcm_trigger(struct snd_pcm_substream *substream, int cmd) intelhaddata->stream_info.running = false; spin_unlock(&intelhaddata->had_spinlock); /* Disable Audio */ - had_enable_audio_int(intelhaddata, false); had_enable_audio(substream, intelhaddata, false); /* Reset buffer pointers */ had_reset_audio(intelhaddata); - had_enable_audio_int(intelhaddata, false); break; default: @@ -1392,7 +1388,6 @@ static void had_process_hot_unplug(struct snd_intelhad *intelhaddata) } /* Disable Audio */ - had_enable_audio_int(intelhaddata, false); had_enable_audio(substream, intelhaddata, false); intelhaddata->connected = false; @@ -1802,8 +1797,6 @@ static int hdmi_lpe_audio_remove(struct platform_device *pdev) { struct snd_intelhad *ctx = platform_get_drvdata(pdev); - if (ctx->connected) - had_enable_audio_int(ctx, false); snd_card_free(ctx->card); return 0; } |