summaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorPavel Hofman <pavel.hofman@ivitera.com>2024-04-16 14:17:25 +0200
committerTakashi Iwai <tiwai@suse.de>2024-04-18 09:30:34 +0200
commitad88ea67b135f74a9f32dc5404a35c773b2a3925 (patch)
tree285ab4036c40ef2a9423f66613d8484a2165c2ce /include/sound/pcm.h
parent93d7d38fa61d1f22ab5a882d89d94c077ec8bb01 (diff)
downloadlinux-stable-ad88ea67b135f74a9f32dc5404a35c773b2a3925.tar.gz
linux-stable-ad88ea67b135f74a9f32dc5404a35c773b2a3925.tar.bz2
linux-stable-ad88ea67b135f74a9f32dc5404a35c773b2a3925.zip
ALSA: pcm: add support for 705.6kHz and 768kHz sample rates
Many modern codecs support 705.6kHz and 768kHz sample rates. Current HW params fail to set 705.6kHz and 768kHz sample rates as these are not in the known-rates list. Add these new rates to the known-rates list to allow them. Also add defines in pcm.h so that drivers can use it. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <20240416121726.628679-3-pavel.hofman@ivitera.com>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 210096f124ee..61c6054618c8 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -120,6 +120,8 @@ struct snd_pcm_ops {
#define SNDRV_PCM_RATE_192000 (1U<<12) /* 192000Hz */
#define SNDRV_PCM_RATE_352800 (1U<<13) /* 352800Hz */
#define SNDRV_PCM_RATE_384000 (1U<<14) /* 384000Hz */
+#define SNDRV_PCM_RATE_705600 (1U<<15) /* 705600Hz */
+#define SNDRV_PCM_RATE_768000 (1U<<16) /* 768000Hz */
#define SNDRV_PCM_RATE_CONTINUOUS (1U<<30) /* continuous range */
#define SNDRV_PCM_RATE_KNOT (1U<<31) /* supports more non-continuos rates */
@@ -135,6 +137,9 @@ struct snd_pcm_ops {
#define SNDRV_PCM_RATE_8000_384000 (SNDRV_PCM_RATE_8000_192000|\
SNDRV_PCM_RATE_352800|\
SNDRV_PCM_RATE_384000)
+#define SNDRV_PCM_RATE_8000_768000 (SNDRV_PCM_RATE_8000_384000|\
+ SNDRV_PCM_RATE_705600|\
+ SNDRV_PCM_RATE_768000)
#define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt)
#define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8)
#define SNDRV_PCM_FMTBIT_U8 _SNDRV_PCM_FMTBIT(U8)