summaryrefslogtreecommitdiffstats
path: root/sound/x86
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-02-07 02:09:12 -0500
committerTakashi Iwai <tiwai@suse.de>2017-02-10 04:21:44 -0500
commite8de9859e4e834a74da824e13070aa992c32de10 (patch)
treec59e26788ebfa25745382c22161031d87c0abf98 /sound/x86
parent8d48c0163d1ab0f56a18ebe9898a34ebcfdfaa1a (diff)
ALSA: x86: Allow no-period-wakeup setup
In the current implementation, the driver may update the BDs even at PCM pointer callback. This allows us to skip the period interrupt effectively. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r--sound/x86/intel_hdmi_audio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index d2136498defe..80b1ab9b1c57 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -133,7 +133,8 @@ static const struct channel_map_table map_tables[] = {
133static const struct snd_pcm_hardware had_pcm_hardware = { 133static const struct snd_pcm_hardware had_pcm_hardware = {
134 .info = (SNDRV_PCM_INFO_INTERLEAVED | 134 .info = (SNDRV_PCM_INFO_INTERLEAVED |
135 SNDRV_PCM_INFO_MMAP | 135 SNDRV_PCM_INFO_MMAP |
136 SNDRV_PCM_INFO_MMAP_VALID), 136 SNDRV_PCM_INFO_MMAP_VALID |
137 SNDRV_PCM_INFO_NO_PERIOD_WAKEUP),
137 .formats = SNDRV_PCM_FMTBIT_S24, 138 .formats = SNDRV_PCM_FMTBIT_S24,
138 .rates = SNDRV_PCM_RATE_32000 | 139 .rates = SNDRV_PCM_RATE_32000 |
139 SNDRV_PCM_RATE_44100 | 140 SNDRV_PCM_RATE_44100 |
@@ -840,7 +841,9 @@ static void had_prog_bd(struct snd_pcm_substream *substream,
840 int ofs = intelhaddata->pcmbuf_filled * intelhaddata->period_bytes; 841 int ofs = intelhaddata->pcmbuf_filled * intelhaddata->period_bytes;
841 u32 addr = substream->runtime->dma_addr + ofs; 842 u32 addr = substream->runtime->dma_addr + ofs;
842 843
843 addr |= AUD_BUF_VALID | AUD_BUF_INTR_EN; 844 addr |= AUD_BUF_VALID;
845 if (!substream->runtime->no_period_wakeup)
846 addr |= AUD_BUF_INTR_EN;
844 had_write_register(intelhaddata, AUD_BUF_ADDR(idx), addr); 847 had_write_register(intelhaddata, AUD_BUF_ADDR(idx), addr);
845 had_write_register(intelhaddata, AUD_BUF_LEN(idx), 848 had_write_register(intelhaddata, AUD_BUF_LEN(idx),
846 intelhaddata->period_bytes); 849 intelhaddata->period_bytes);