Skip to content

Commit

Permalink
ALSA: x86: Use standard mmap helper for Intel HDMI LPE audio
Browse files Browse the repository at this point in the history
Intel HDMI LPE audio driver has its own mmap callback that mimics with
the noncached page attributes, but this is rather superfluous and can
be replaced with the standard helper, as the device is only for
playback and the write-cache should suffice.

This patch drops the own code and just uses the standard helper.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Mar 5, 2022
1 parent d460975 commit fc4cf42
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions sound/x86/intel_hdmi_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,18 +1253,6 @@ static snd_pcm_uframes_t had_pcm_pointer(struct snd_pcm_substream *substream)
return len;
}

/*
* ALSA PCM mmap callback
*/
static int had_pcm_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *vma)
{
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return remap_pfn_range(vma, vma->vm_start,
substream->runtime->dma_addr >> PAGE_SHIFT,
vma->vm_end - vma->vm_start, vma->vm_page_prot);
}

/*
* ALSA PCM ops
*/
Expand All @@ -1276,7 +1264,6 @@ static const struct snd_pcm_ops had_pcm_ops = {
.trigger = had_pcm_trigger,
.sync_stop = had_pcm_sync_stop,
.pointer = had_pcm_pointer,
.mmap = had_pcm_mmap,
};

/* process mode change of the running stream; called in mutex */
Expand Down

0 comments on commit fc4cf42

Please sign in to comment.