summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidyakumar Athota <vathota@codeaurora.org>2015-10-26 12:52:58 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:11:02 -0700
commit2e4fca555edf98f414b87a731709220e033de745 (patch)
treedb6efeb7c619ecace91b676f45d54db8e293ddaa
parentfef4c4cb854e5a841c88de7621a51fadf5ec0cb3 (diff)
ALSA: pcm: add support for 384KHz sample rate
Currenlty HW params fails to set 384KHz sample rate due to unsupported sample rate. Change to add 384KHz sample rate support to ALSA. Change-Id: I381f7cdcc69e6cf9339cec53aab3fa295760c17c Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
-rw-r--r--include/sound/pcm.h1
-rw-r--r--sound/core/pcm_native.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index d27aed5c6f4e..6e98f4f08541 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -138,6 +138,7 @@ struct snd_pcm_ops {
#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */
#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */
+#define SNDRV_PCM_RATE_384000 (1<<13) /* 384000Hz */
#define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */
#define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 8c5e520e6970..e9bdd18bc5f2 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2004,7 +2004,8 @@ static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params,
#endif
static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
- 48000, 64000, 88200, 96000, 176400, 192000 };
+ 48000, 64000, 88200, 96000, 176400, 192000,
+ 384000 };
const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
.count = ARRAY_SIZE(rates),