mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-29 01:26:15 +02:00
116 lines
4.9 KiB
Diff
116 lines
4.9 KiB
Diff
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
|
|
index 2389352..24dcb18 100644
|
|
--- a/include/sound/pcm.h
|
|
+++ b/include/sound/pcm.h
|
|
@@ -113,23 +113,23 @@ struct snd_pcm_ops {
|
|
#define SNDRV_PCM_RATE_5512 (1<<0) /* 5512Hz */
|
|
#define SNDRV_PCM_RATE_8000 (1<<1) /* 8000Hz */
|
|
#define SNDRV_PCM_RATE_11025 (1<<2) /* 11025Hz */
|
|
-#define SNDRV_PCM_RATE_16000 (1<<3) /* 16000Hz */
|
|
-#define SNDRV_PCM_RATE_22050 (1<<4) /* 22050Hz */
|
|
-#define SNDRV_PCM_RATE_32000 (1<<5) /* 32000Hz */
|
|
-#define SNDRV_PCM_RATE_44100 (1<<6) /* 44100Hz */
|
|
-#define SNDRV_PCM_RATE_48000 (1<<7) /* 48000Hz */
|
|
-#define SNDRV_PCM_RATE_64000 (1<<8) /* 64000Hz */
|
|
-#define SNDRV_PCM_RATE_88200 (1<<9) /* 88200Hz */
|
|
-#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_12000 (1<<3) /* 12000Hz */
|
|
+#define SNDRV_PCM_RATE_16000 (1<<4) /* 16000Hz */
|
|
+#define SNDRV_PCM_RATE_22050 (1<<5) /* 22050Hz */
|
|
+#define SNDRV_PCM_RATE_24000 (1<<6) /* 24000Hz */
|
|
+#define SNDRV_PCM_RATE_32000 (1<<7) /* 32000Hz */
|
|
+#define SNDRV_PCM_RATE_44100 (1<<8) /* 44100Hz */
|
|
+#define SNDRV_PCM_RATE_48000 (1<<9) /* 48000Hz */
|
|
+#define SNDRV_PCM_RATE_64000 (1<<10) /* 64000Hz */
|
|
+#define SNDRV_PCM_RATE_88200 (1<<11) /* 88200Hz */
|
|
+#define SNDRV_PCM_RATE_96000 (1<<12) /* 96000Hz */
|
|
+#define SNDRV_PCM_RATE_176400 (1<<13) /* 176400Hz */
|
|
+#define SNDRV_PCM_RATE_192000 (1<<14) /* 192000Hz */
|
|
|
|
#define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */
|
|
#define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */
|
|
|
|
-#define SNDRV_PCM_RATE_8000_44100 (SNDRV_PCM_RATE_8000|SNDRV_PCM_RATE_11025|\
|
|
- SNDRV_PCM_RATE_16000|SNDRV_PCM_RATE_22050|\
|
|
- SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100)
|
|
+#define SNDRV_PCM_RATE_8000_44100 (SNDRV_PCM_RATE_8000|SNDRV_PCM_RATE_11025|SNDRV_PCM_RATE_12000|SNDRV_PCM_RATE_16000|SNDRV_PCM_RATE_22050|SNDRV_PCM_RATE_24000|SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100)
|
|
#define SNDRV_PCM_RATE_8000_48000 (SNDRV_PCM_RATE_8000_44100|SNDRV_PCM_RATE_48000)
|
|
#define SNDRV_PCM_RATE_8000_96000 (SNDRV_PCM_RATE_8000_48000|SNDRV_PCM_RATE_64000|\
|
|
SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000)
|
|
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
|
|
index ac2150e..3b3183f 100644
|
|
--- a/sound/core/pcm_native.c
|
|
+++ b/sound/core/pcm_native.c
|
|
@@ -1748,12 +1748,13 @@ static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params,
|
|
return snd_interval_refine(hw_param_interval(params, rule->var), &t);
|
|
}
|
|
|
|
-#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 12
|
|
+#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 14
|
|
#error "Change this table"
|
|
#endif
|
|
|
|
-static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
|
|
- 48000, 64000, 88200, 96000, 176400, 192000 };
|
|
+static unsigned int rates[] = { 5512, 8000, 11025, 12000, 16000, 22050, 24000,
|
|
+ 32000, 44100, 48000, 64000, 88200, 96000,
|
|
+ 176400, 192000 };
|
|
|
|
const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
|
|
.count = ARRAY_SIZE(rates),
|
|
diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
|
|
index d3e786a..a5335f4 100644
|
|
--- a/sound/soc/Kconfig
|
|
+++ b/sound/soc/Kconfig
|
|
@@ -35,6 +35,7 @@ source "sound/soc/s3c24xx/Kconfig"
|
|
source "sound/soc/s6000/Kconfig"
|
|
source "sound/soc/sh/Kconfig"
|
|
source "sound/soc/txx9/Kconfig"
|
|
+source "sound/soc/jz4740/Kconfig"
|
|
|
|
# Supported codecs
|
|
source "sound/soc/codecs/Kconfig"
|
|
diff --git a/sound/soc/Makefile b/sound/soc/Makefile
|
|
index 6f1e28d..132772d 100644
|
|
--- a/sound/soc/Makefile
|
|
+++ b/sound/soc/Makefile
|
|
@@ -13,3 +13,4 @@ obj-$(CONFIG_SND_SOC) += s3c24xx/
|
|
obj-$(CONFIG_SND_SOC) += s6000/
|
|
obj-$(CONFIG_SND_SOC) += sh/
|
|
obj-$(CONFIG_SND_SOC) += txx9/
|
|
+obj-$(CONFIG_SND_SOC) += jz4740/
|
|
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
|
|
index bbc97fd..f28a1a4 100644
|
|
--- a/sound/soc/codecs/Kconfig
|
|
+++ b/sound/soc/codecs/Kconfig
|
|
@@ -176,3 +176,10 @@ config SND_SOC_WM9712
|
|
|
|
config SND_SOC_WM9713
|
|
tristate
|
|
+
|
|
+config SND_SOC_JZCODEC
|
|
+ tristate "JZ4720/JZ4740 SoC internal codec"
|
|
+ depends on SND_SOC && SOC_JZ4740
|
|
+ help
|
|
+ Say Y if you want to use internal codec on Ingenic JZ4720/JZ4740 based
|
|
+ boards.
|
|
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
|
|
index 8b75305..d7bd0a4 100644
|
|
--- a/sound/soc/codecs/Makefile
|
|
+++ b/sound/soc/codecs/Makefile
|
|
@@ -34,6 +34,7 @@ snd-soc-wm9081-objs := wm9081.o
|
|
snd-soc-wm9705-objs := wm9705.o
|
|
snd-soc-wm9712-objs := wm9712.o
|
|
snd-soc-wm9713-objs := wm9713.o
|
|
+snd-soc-jzcodec-objs := jzcodec.o
|
|
|
|
obj-$(CONFIG_SND_SOC_AC97_CODEC) += snd-soc-ac97.o
|
|
obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o
|
|
@@ -71,3 +72,4 @@ obj-$(CONFIG_SND_SOC_WM9081) += snd-soc-wm9081.o
|
|
obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o
|
|
obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o
|
|
obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o
|
|
+obj-$(CONFIG_SND_SOC_JZCODEC) += snd-soc-jzcodec.o
|