Skip to content

Commit fc4cf42

Browse files
committed
ALSA: x86: Use standard mmap helper for Intel HDMI LPE audio
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/20220305083308.15718-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent d460975 commit fc4cf42

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

sound/x86/intel_hdmi_audio.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,18 +1253,6 @@ static snd_pcm_uframes_t had_pcm_pointer(struct snd_pcm_substream *substream)
12531253
return len;
12541254
}
12551255

1256-
/*
1257-
* ALSA PCM mmap callback
1258-
*/
1259-
static int had_pcm_mmap(struct snd_pcm_substream *substream,
1260-
struct vm_area_struct *vma)
1261-
{
1262-
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
1263-
return remap_pfn_range(vma, vma->vm_start,
1264-
substream->runtime->dma_addr >> PAGE_SHIFT,
1265-
vma->vm_end - vma->vm_start, vma->vm_page_prot);
1266-
}
1267-
12681256
/*
12691257
* ALSA PCM ops
12701258
*/
@@ -1276,7 +1264,6 @@ static const struct snd_pcm_ops had_pcm_ops = {
12761264
.trigger = had_pcm_trigger,
12771265
.sync_stop = had_pcm_sync_stop,
12781266
.pointer = had_pcm_pointer,
1279-
.mmap = had_pcm_mmap,
12801267
};
12811268

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

0 commit comments

Comments
 (0)