Skip to content

Commit 49045d3

Browse files
cladischJaroslav Kysela
authored andcommitted
[ALSA] usb-audio: add SNDRV_PCM_INFO_BATCH flag
USB generic driver Add the SNDRV_PCM_INFO_BATCH flag to the PCM hardware information to indicate that the driver uses double buffering. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
1 parent 025cd2f commit 49045d3

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎sound/usb/usbaudio.c‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,11 @@ static int snd_usb_pcm_prepare(snd_pcm_substream_t *substream)
14391439

14401440
static snd_pcm_hardware_t snd_usb_playback =
14411441
{
1442-
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
1443-
SNDRV_PCM_INFO_BLOCK_TRANSFER |
1444-
SNDRV_PCM_INFO_MMAP_VALID),
1442+
.info = SNDRV_PCM_INFO_MMAP |
1443+
SNDRV_PCM_INFO_MMAP_VALID |
1444+
SNDRV_PCM_INFO_BATCH |
1445+
SNDRV_PCM_INFO_INTERLEAVED |
1446+
SNDRV_PCM_INFO_BLOCK_TRANSFER,
14451447
.buffer_bytes_max = (256*1024),
14461448
.period_bytes_min = 64,
14471449
.period_bytes_max = (128*1024),
@@ -1451,9 +1453,11 @@ static snd_pcm_hardware_t snd_usb_playback =
14511453

14521454
static snd_pcm_hardware_t snd_usb_capture =
14531455
{
1454-
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
1455-
SNDRV_PCM_INFO_BLOCK_TRANSFER |
1456-
SNDRV_PCM_INFO_MMAP_VALID),
1456+
.info = SNDRV_PCM_INFO_MMAP |
1457+
SNDRV_PCM_INFO_MMAP_VALID |
1458+
SNDRV_PCM_INFO_BATCH |
1459+
SNDRV_PCM_INFO_INTERLEAVED |
1460+
SNDRV_PCM_INFO_BLOCK_TRANSFER,
14571461
.buffer_bytes_max = (256*1024),
14581462
.period_bytes_min = 64,
14591463
.period_bytes_max = (128*1024),

0 commit comments

Comments
 (0)