generic-2.6: add kernel 2.6.35 preliminary support (patches)
[openwrt.git] / target / linux / xburst / patches-2.6.32 / 105-sound.patch
1 From bc6998405cdff2c189ad6e3e18be695087c30909 Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Mon, 11 Jan 2010 04:29:46 +0100
4 Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/105-sound.patch
5
6 ---
7 include/sound/pcm.h | 26 +++++++++++++-------------
8 sound/core/pcm_native.c | 7 ++++---
9 sound/soc/Kconfig | 1 +
10 sound/soc/Makefile | 1 +
11 sound/soc/codecs/Kconfig | 7 +++++++
12 sound/soc/codecs/Makefile | 2 ++
13 6 files changed, 28 insertions(+), 16 deletions(-)
14
15 --- a/include/sound/pcm.h
16 +++ b/include/sound/pcm.h
17 @@ -113,23 +113,23 @@ struct snd_pcm_ops {
18 #define SNDRV_PCM_RATE_5512 (1<<0) /* 5512Hz */
19 #define SNDRV_PCM_RATE_8000 (1<<1) /* 8000Hz */
20 #define SNDRV_PCM_RATE_11025 (1<<2) /* 11025Hz */
21 -#define SNDRV_PCM_RATE_16000 (1<<3) /* 16000Hz */
22 -#define SNDRV_PCM_RATE_22050 (1<<4) /* 22050Hz */
23 -#define SNDRV_PCM_RATE_32000 (1<<5) /* 32000Hz */
24 -#define SNDRV_PCM_RATE_44100 (1<<6) /* 44100Hz */
25 -#define SNDRV_PCM_RATE_48000 (1<<7) /* 48000Hz */
26 -#define SNDRV_PCM_RATE_64000 (1<<8) /* 64000Hz */
27 -#define SNDRV_PCM_RATE_88200 (1<<9) /* 88200Hz */
28 -#define SNDRV_PCM_RATE_96000 (1<<10) /* 96000Hz */
29 -#define SNDRV_PCM_RATE_176400 (1<<11) /* 176400Hz */
30 -#define SNDRV_PCM_RATE_192000 (1<<12) /* 192000Hz */
31 +#define SNDRV_PCM_RATE_12000 (1<<3) /* 12000Hz */
32 +#define SNDRV_PCM_RATE_16000 (1<<4) /* 16000Hz */
33 +#define SNDRV_PCM_RATE_22050 (1<<5) /* 22050Hz */
34 +#define SNDRV_PCM_RATE_24000 (1<<6) /* 24000Hz */
35 +#define SNDRV_PCM_RATE_32000 (1<<7) /* 32000Hz */
36 +#define SNDRV_PCM_RATE_44100 (1<<8) /* 44100Hz */
37 +#define SNDRV_PCM_RATE_48000 (1<<9) /* 48000Hz */
38 +#define SNDRV_PCM_RATE_64000 (1<<10) /* 64000Hz */
39 +#define SNDRV_PCM_RATE_88200 (1<<11) /* 88200Hz */
40 +#define SNDRV_PCM_RATE_96000 (1<<12) /* 96000Hz */
41 +#define SNDRV_PCM_RATE_176400 (1<<13) /* 176400Hz */
42 +#define SNDRV_PCM_RATE_192000 (1<<14) /* 192000Hz */
43
44 #define SNDRV_PCM_RATE_CONTINUOUS (1<<30) /* continuous range */
45 #define SNDRV_PCM_RATE_KNOT (1<<31) /* supports more non-continuos rates */
46
47 -#define SNDRV_PCM_RATE_8000_44100 (SNDRV_PCM_RATE_8000|SNDRV_PCM_RATE_11025|\
48 - SNDRV_PCM_RATE_16000|SNDRV_PCM_RATE_22050|\
49 - SNDRV_PCM_RATE_32000|SNDRV_PCM_RATE_44100)
50 +#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)
51 #define SNDRV_PCM_RATE_8000_48000 (SNDRV_PCM_RATE_8000_44100|SNDRV_PCM_RATE_48000)
52 #define SNDRV_PCM_RATE_8000_96000 (SNDRV_PCM_RATE_8000_48000|SNDRV_PCM_RATE_64000|\
53 SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000)
54 --- a/sound/core/pcm_native.c
55 +++ b/sound/core/pcm_native.c
56 @@ -1721,12 +1721,13 @@ static int snd_pcm_hw_rule_sample_bits(s
57 return snd_interval_refine(hw_param_interval(params, rule->var), &t);
58 }
59
60 -#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 12
61 +#if SNDRV_PCM_RATE_5512 != 1 << 0 || SNDRV_PCM_RATE_192000 != 1 << 14
62 #error "Change this table"
63 #endif
64
65 -static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
66 - 48000, 64000, 88200, 96000, 176400, 192000 };
67 +static unsigned int rates[] = { 5512, 8000, 11025, 12000, 16000, 22050, 24000,
68 + 32000, 44100, 48000, 64000, 88200, 96000,
69 + 176400, 192000 };
70
71 const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
72 .count = ARRAY_SIZE(rates),
73 --- a/sound/soc/Kconfig
74 +++ b/sound/soc/Kconfig
75 @@ -36,6 +36,7 @@ source "sound/soc/s3c24xx/Kconfig"
76 source "sound/soc/s6000/Kconfig"
77 source "sound/soc/sh/Kconfig"
78 source "sound/soc/txx9/Kconfig"
79 +source "sound/soc/jz4740/Kconfig"
80
81 # Supported codecs
82 source "sound/soc/codecs/Kconfig"
83 --- a/sound/soc/Makefile
84 +++ b/sound/soc/Makefile
85 @@ -14,3 +14,4 @@ obj-$(CONFIG_SND_SOC) += s3c24xx/
86 obj-$(CONFIG_SND_SOC) += s6000/
87 obj-$(CONFIG_SND_SOC) += sh/
88 obj-$(CONFIG_SND_SOC) += txx9/
89 +obj-$(CONFIG_SND_SOC) += jz4740/
90 --- a/sound/soc/codecs/Kconfig
91 +++ b/sound/soc/codecs/Kconfig
92 @@ -217,6 +217,13 @@ config SND_SOC_WM9712
93 config SND_SOC_WM9713
94 tristate
95
96 +config SND_SOC_JZCODEC
97 + tristate "JZ4720/JZ4740 SoC internal codec"
98 + depends on SND_SOC && SOC_JZ4740
99 + help
100 + Say Y if you want to use internal codec on Ingenic JZ4720/JZ4740 based
101 + boards.
102 +
103 # Amp
104 config SND_SOC_MAX9877
105 tristate
106 --- a/sound/soc/codecs/Makefile
107 +++ b/sound/soc/codecs/Makefile
108 @@ -44,6 +44,7 @@ snd-soc-wm9705-objs := wm9705.o
109 snd-soc-wm9712-objs := wm9712.o
110 snd-soc-wm9713-objs := wm9713.o
111 snd-soc-wm-hubs-objs := wm_hubs.o
112 +snd-soc-jzcodec-objs := jzcodec.o
113
114 # Amp
115 snd-soc-max9877-objs := max9877.o
116 @@ -94,6 +95,7 @@ obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-
117 obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o
118 obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o
119 obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o
120 +obj-$(CONFIG_SND_SOC_JZCODEC) += snd-soc-jzcodec.o
121
122 # Amp
123 obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o
This page took 0.048186 seconds and 5 git commands to generate.