Skip to content

Commit

Permalink
ALSA: x86: Allow no-period-wakeup setup
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tiwai committed Feb 10, 2017
1 parent 8d48c01 commit e8de985
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ static const struct channel_map_table map_tables[] = {
static const struct snd_pcm_hardware had_pcm_hardware = {
.info = (SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID),
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_NO_PERIOD_WAKEUP),
.formats = SNDRV_PCM_FMTBIT_S24,
.rates = SNDRV_PCM_RATE_32000 |
SNDRV_PCM_RATE_44100 |
Expand Down Expand Up @@ -840,7 +841,9 @@ static void had_prog_bd(struct snd_pcm_substream *substream,
int ofs = intelhaddata->pcmbuf_filled * intelhaddata->period_bytes;
u32 addr = substream->runtime->dma_addr + ofs;

addr |= AUD_BUF_VALID | AUD_BUF_INTR_EN;
addr |= AUD_BUF_VALID;
if (!substream->runtime->no_period_wakeup)
addr |= AUD_BUF_INTR_EN;
had_write_register(intelhaddata, AUD_BUF_ADDR(idx), addr);
had_write_register(intelhaddata, AUD_BUF_LEN(idx),
intelhaddata->period_bytes);
Expand Down

0 comments on commit e8de985

Please sign in to comment.