Skip to content

Commit

Permalink
ALSA: usb: Remove superfluous snd_dma_continuous_data()
Browse files Browse the repository at this point in the history
The recent change (commit 08422d2: "ALSA: memalloc: Allow NULL
device for SNDRV_DMA_TYPE_CONTINUOUS type") made the PCM preallocation
helper accepting NULL as the device pointer for the default usage.
Drop the snd_dma_continuous_data() usage that became superfluous from
the callers.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Nov 6, 2019
1 parent 0382e4e commit 0af0a4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions sound/usb/line6/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ static int snd_line6_new_pcm(struct usb_line6 *line6, struct snd_pcm **pcm_ret)

/* pre-allocation of buffers */
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data
(GFP_KERNEL), 64 * 1024,
128 * 1024);
NULL, 64 * 1024, 128 * 1024);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions sound/usb/usx2y/usbusx2yaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,13 +970,13 @@ static int usX2Y_audio_stream_new(struct snd_card *card, int playback_endpoint,
if (playback_endpoint) {
snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
NULL,
64*1024, 128*1024);
}

snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
NULL,
64*1024, 128*1024);
usX2Y(card)->pcm_devs++;

Expand Down
4 changes: 2 additions & 2 deletions sound/usb/usx2y/usx2yhwdeppcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,11 @@ int usX2Y_hwdep_pcm_new(struct snd_card *card)
sprintf(pcm->name, NAME_ALLCAPS" hwdep Audio");
snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
NULL,
64*1024, 128*1024);
snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
NULL,
64*1024, 128*1024);

return 0;
Expand Down

0 comments on commit 0af0a4f

Please sign in to comment.