Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: oxygen: set fifo_size

Allow the driver to report the hardware FIFO size.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Clemens Ladisch and committed by
Takashi Iwai
4e9c58cb 5ae0095d

+10
+10
sound/pci/oxygen/oxygen_pcm.c
··· 29 29 /* the multichannel DMA channel has a 24-bit counter */ 30 30 #define BUFFER_BYTES_MAX_MULTICH ((1 << 24) * 4) 31 31 32 + #define FIFO_BYTES 256 33 + #define FIFO_BYTES_MULTICH 1024 34 + 32 35 #define PERIOD_BYTES_MIN 64 33 36 34 37 #define DEFAULT_BUFFER_BYTES (BUFFER_BYTES_MAX / 2) ··· 63 60 .period_bytes_max = BUFFER_BYTES_MAX, 64 61 .periods_min = 1, 65 62 .periods_max = BUFFER_BYTES_MAX / PERIOD_BYTES_MIN, 63 + .fifo_size = FIFO_BYTES, 66 64 }; 67 65 static const struct snd_pcm_hardware oxygen_multichannel_hardware = { 68 66 .info = SNDRV_PCM_INFO_MMAP | ··· 91 87 .period_bytes_max = BUFFER_BYTES_MAX_MULTICH, 92 88 .periods_min = 1, 93 89 .periods_max = BUFFER_BYTES_MAX_MULTICH / PERIOD_BYTES_MIN, 90 + .fifo_size = FIFO_BYTES_MULTICH, 94 91 }; 95 92 static const struct snd_pcm_hardware oxygen_ac97_hardware = { 96 93 .info = SNDRV_PCM_INFO_MMAP | ··· 111 106 .period_bytes_max = BUFFER_BYTES_MAX, 112 107 .periods_min = 1, 113 108 .periods_max = BUFFER_BYTES_MAX / PERIOD_BYTES_MIN, 109 + .fifo_size = FIFO_BYTES, 114 110 }; 115 111 116 112 static const struct snd_pcm_hardware *const oxygen_hardware[PCM_COUNT] = { ··· 147 141 runtime->hw.rates &= ~(SNDRV_PCM_RATE_32000 | 148 142 SNDRV_PCM_RATE_64000); 149 143 runtime->hw.rate_min = 44100; 144 + /* fall through */ 145 + case PCM_A: 146 + case PCM_B: 147 + runtime->hw.fifo_size = 0; 150 148 break; 151 149 case PCM_MULTICH: 152 150 runtime->hw.channels_max = chip->model.dac_channels_pcm;