diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 3 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
-rw-r--r-- | sound/pci/cs5535audio/Makefile | 2 | ||||
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio.c | 1 | ||||
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio.h | 4 | ||||
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio_olpc.c | 26 | ||||
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/twl4030.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/wm8350.c | 25 | ||||
-rw-r--r-- | sound/soc/codecs/wm8900.c | 2 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx_simtec.c | 2 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c24xx_simtec.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 2 |
18 files changed, 67 insertions, 38 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index b4b48afb6de6..5d9411839cd7 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -159,7 +159,7 @@ static int pxa2xx_ac97_resume(struct device *dev) | |||
159 | return ret; | 159 | return ret; |
160 | } | 160 | } |
161 | 161 | ||
162 | static struct dev_pm_ops pxa2xx_ac97_pm_ops = { | 162 | static const struct dev_pm_ops pxa2xx_ac97_pm_ops = { |
163 | .suspend = pxa2xx_ac97_suspend, | 163 | .suspend = pxa2xx_ac97_suspend, |
164 | .resume = pxa2xx_ac97_resume, | 164 | .resume = pxa2xx_ac97_resume, |
165 | }; | 165 | }; |
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index 661205c4dcea..af888a022fc0 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c | |||
@@ -127,7 +127,8 @@ static struct snd_gf1_mem_block *snd_gf1_mem_share(struct snd_gf1_mem * alloc, | |||
127 | !share_id[2] && !share_id[3]) | 127 | !share_id[2] && !share_id[3]) |
128 | return NULL; | 128 | return NULL; |
129 | for (block = alloc->first; block; block = block->next) | 129 | for (block = alloc->first; block; block = block->next) |
130 | if (!memcmp(share_id, block->share_id, sizeof(share_id))) | 130 | if (!memcmp(share_id, block->share_id, |
131 | sizeof(block->share_id))) | ||
131 | return block; | 132 | return block; |
132 | return NULL; | 133 | return NULL; |
133 | } | 134 | } |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 20cb60afb200..c11920623009 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -2122,7 +2122,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, | |||
2122 | } | 2122 | } |
2123 | /* nothing should be in powerdown mode */ | 2123 | /* nothing should be in powerdown mode */ |
2124 | snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0); | 2124 | snd_ac97_write_cache(ac97, AC97_GENERAL_PURPOSE, 0); |
2125 | end_time = jiffies + msecs_to_jiffies(120); | 2125 | end_time = jiffies + msecs_to_jiffies(5000); |
2126 | do { | 2126 | do { |
2127 | if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f) | 2127 | if ((snd_ac97_read(ac97, AC97_POWERDOWN) & 0x0f) == 0x0f) |
2128 | goto __ready_ok; | 2128 | goto __ready_ok; |
diff --git a/sound/pci/cs5535audio/Makefile b/sound/pci/cs5535audio/Makefile index fda7a94c992f..ccc642269b9e 100644 --- a/sound/pci/cs5535audio/Makefile +++ b/sound/pci/cs5535audio/Makefile | |||
@@ -4,9 +4,7 @@ | |||
4 | 4 | ||
5 | snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o | 5 | snd-cs5535audio-y := cs5535audio.o cs5535audio_pcm.o |
6 | snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o | 6 | snd-cs5535audio-$(CONFIG_PM) += cs5535audio_pm.o |
7 | ifdef CONFIG_MGEODE_LX | ||
8 | snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o | 7 | snd-cs5535audio-$(CONFIG_OLPC) += cs5535audio_olpc.o |
9 | endif | ||
10 | 8 | ||
11 | # Toplevel Module Dependency | 9 | # Toplevel Module Dependency |
12 | obj-$(CONFIG_SND_CS5535AUDIO) += snd-cs5535audio.o | 10 | obj-$(CONFIG_SND_CS5535AUDIO) += snd-cs5535audio.o |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 05f56e04849b..91e7faf69bbb 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -389,6 +389,7 @@ probefail_out: | |||
389 | 389 | ||
390 | static void __devexit snd_cs5535audio_remove(struct pci_dev *pci) | 390 | static void __devexit snd_cs5535audio_remove(struct pci_dev *pci) |
391 | { | 391 | { |
392 | olpc_quirks_cleanup(); | ||
392 | snd_card_free(pci_get_drvdata(pci)); | 393 | snd_card_free(pci_get_drvdata(pci)); |
393 | pci_set_drvdata(pci, NULL); | 394 | pci_set_drvdata(pci, NULL); |
394 | } | 395 | } |
diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h index 7a298ac662e3..51966d782a3c 100644 --- a/sound/pci/cs5535audio/cs5535audio.h +++ b/sound/pci/cs5535audio/cs5535audio.h | |||
@@ -99,10 +99,11 @@ int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state); | |||
99 | int snd_cs5535audio_resume(struct pci_dev *pci); | 99 | int snd_cs5535audio_resume(struct pci_dev *pci); |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX) | 102 | #ifdef CONFIG_OLPC |
103 | void __devinit olpc_prequirks(struct snd_card *card, | 103 | void __devinit olpc_prequirks(struct snd_card *card, |
104 | struct snd_ac97_template *ac97); | 104 | struct snd_ac97_template *ac97); |
105 | int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97); | 105 | int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97); |
106 | void __devexit olpc_quirks_cleanup(void); | ||
106 | void olpc_analog_input(struct snd_ac97 *ac97, int on); | 107 | void olpc_analog_input(struct snd_ac97 *ac97, int on); |
107 | void olpc_mic_bias(struct snd_ac97 *ac97, int on); | 108 | void olpc_mic_bias(struct snd_ac97 *ac97, int on); |
108 | 109 | ||
@@ -128,6 +129,7 @@ static inline int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) | |||
128 | { | 129 | { |
129 | return 0; | 130 | return 0; |
130 | } | 131 | } |
132 | static inline void olpc_quirks_cleanup(void) { } | ||
131 | static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { } | 133 | static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { } |
132 | static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { } | 134 | static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { } |
133 | static inline void olpc_capture_open(struct snd_ac97 *ac97) { } | 135 | static inline void olpc_capture_open(struct snd_ac97 *ac97) { } |
diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c index 5c6814335cd7..50da49be9ae5 100644 --- a/sound/pci/cs5535audio/cs5535audio_olpc.c +++ b/sound/pci/cs5535audio/cs5535audio_olpc.c | |||
@@ -13,10 +13,13 @@ | |||
13 | #include <sound/info.h> | 13 | #include <sound/info.h> |
14 | #include <sound/control.h> | 14 | #include <sound/control.h> |
15 | #include <sound/ac97_codec.h> | 15 | #include <sound/ac97_codec.h> |
16 | #include <linux/gpio.h> | ||
16 | 17 | ||
17 | #include <asm/olpc.h> | 18 | #include <asm/olpc.h> |
18 | #include "cs5535audio.h" | 19 | #include "cs5535audio.h" |
19 | 20 | ||
21 | #define DRV_NAME "cs5535audio-olpc" | ||
22 | |||
20 | /* | 23 | /* |
21 | * OLPC has an additional feature on top of the regular AD1888 codec features. | 24 | * OLPC has an additional feature on top of the regular AD1888 codec features. |
22 | * It has an Analog Input mode that is switched into (after disabling the | 25 | * It has an Analog Input mode that is switched into (after disabling the |
@@ -38,10 +41,7 @@ void olpc_analog_input(struct snd_ac97 *ac97, int on) | |||
38 | } | 41 | } |
39 | 42 | ||
40 | /* set Analog Input through GPIO */ | 43 | /* set Analog Input through GPIO */ |
41 | if (on) | 44 | gpio_set_value(OLPC_GPIO_MIC_AC, on); |
42 | geode_gpio_set(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); | ||
43 | else | ||
44 | geode_gpio_clear(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); | ||
45 | } | 45 | } |
46 | 46 | ||
47 | /* | 47 | /* |
@@ -73,8 +73,7 @@ static int olpc_dc_info(struct snd_kcontrol *kctl, | |||
73 | 73 | ||
74 | static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v) | 74 | static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v) |
75 | { | 75 | { |
76 | v->value.integer.value[0] = geode_gpio_isset(OLPC_GPIO_MIC_AC, | 76 | v->value.integer.value[0] = gpio_get_value(OLPC_GPIO_MIC_AC); |
77 | GPIO_OUTPUT_VAL); | ||
78 | return 0; | 77 | return 0; |
79 | } | 78 | } |
80 | 79 | ||
@@ -153,6 +152,12 @@ int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) | |||
153 | if (!machine_is_olpc()) | 152 | if (!machine_is_olpc()) |
154 | return 0; | 153 | return 0; |
155 | 154 | ||
155 | if (gpio_request(OLPC_GPIO_MIC_AC, DRV_NAME)) { | ||
156 | printk(KERN_ERR DRV_NAME ": unable to allocate MIC GPIO\n"); | ||
157 | return -EIO; | ||
158 | } | ||
159 | gpio_direction_output(OLPC_GPIO_MIC_AC, 0); | ||
160 | |||
156 | /* drop the original AD1888 HPF control */ | 161 | /* drop the original AD1888 HPF control */ |
157 | memset(&elem, 0, sizeof(elem)); | 162 | memset(&elem, 0, sizeof(elem)); |
158 | elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 163 | elem.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
@@ -169,11 +174,18 @@ int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97) | |||
169 | for (i = 0; i < ARRAY_SIZE(olpc_cs5535audio_ctls); i++) { | 174 | for (i = 0; i < ARRAY_SIZE(olpc_cs5535audio_ctls); i++) { |
170 | err = snd_ctl_add(card, snd_ctl_new1(&olpc_cs5535audio_ctls[i], | 175 | err = snd_ctl_add(card, snd_ctl_new1(&olpc_cs5535audio_ctls[i], |
171 | ac97->private_data)); | 176 | ac97->private_data)); |
172 | if (err < 0) | 177 | if (err < 0) { |
178 | gpio_free(OLPC_GPIO_MIC_AC); | ||
173 | return err; | 179 | return err; |
180 | } | ||
174 | } | 181 | } |
175 | 182 | ||
176 | /* turn off the mic by default */ | 183 | /* turn off the mic by default */ |
177 | olpc_mic_bias(ac97, 0); | 184 | olpc_mic_bias(ac97, 0); |
178 | return 0; | 185 | return 0; |
179 | } | 186 | } |
187 | |||
188 | void __devexit olpc_quirks_cleanup(void) | ||
189 | { | ||
190 | gpio_free(OLPC_GPIO_MIC_AC); | ||
191 | } | ||
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index d24328661c6a..40ccb419b6e9 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/compat.h> | 24 | #include <linux/compat.h> |
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/string.h> | ||
27 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include "hda_codec.h" | 30 | #include "hda_codec.h" |
@@ -428,8 +429,7 @@ static int parse_hints(struct hda_codec *codec, const char *buf) | |||
428 | char *key, *val; | 429 | char *key, *val; |
429 | struct hda_hint *hint; | 430 | struct hda_hint *hint; |
430 | 431 | ||
431 | while (isspace(*buf)) | 432 | buf = skip_spaces(buf); |
432 | buf++; | ||
433 | if (!*buf || *buf == '#' || *buf == '\n') | 433 | if (!*buf || *buf == '#' || *buf == '\n') |
434 | return 0; | 434 | return 0; |
435 | if (*buf == '=') | 435 | if (*buf == '=') |
@@ -444,8 +444,7 @@ static int parse_hints(struct hda_codec *codec, const char *buf) | |||
444 | return -EINVAL; | 444 | return -EINVAL; |
445 | } | 445 | } |
446 | *val++ = 0; | 446 | *val++ = 0; |
447 | while (isspace(*val)) | 447 | val = skip_spaces(val); |
448 | val++; | ||
449 | remove_trail_spaces(key); | 448 | remove_trail_spaces(key); |
450 | remove_trail_spaces(val); | 449 | remove_trail_spaces(val); |
451 | hint = get_hint(codec, key); | 450 | hint = get_hint(codec, key); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index e54420e691ae..9b56f937913e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2713,6 +2713,9 @@ static struct pci_device_id azx_ids[] = { | |||
2713 | { PCI_DEVICE(0x10de, 0x0ac1), .driver_data = AZX_DRIVER_NVIDIA }, | 2713 | { PCI_DEVICE(0x10de, 0x0ac1), .driver_data = AZX_DRIVER_NVIDIA }, |
2714 | { PCI_DEVICE(0x10de, 0x0ac2), .driver_data = AZX_DRIVER_NVIDIA }, | 2714 | { PCI_DEVICE(0x10de, 0x0ac2), .driver_data = AZX_DRIVER_NVIDIA }, |
2715 | { PCI_DEVICE(0x10de, 0x0ac3), .driver_data = AZX_DRIVER_NVIDIA }, | 2715 | { PCI_DEVICE(0x10de, 0x0ac3), .driver_data = AZX_DRIVER_NVIDIA }, |
2716 | { PCI_DEVICE(0x10de, 0x0be2), .driver_data = AZX_DRIVER_NVIDIA }, | ||
2717 | { PCI_DEVICE(0x10de, 0x0be3), .driver_data = AZX_DRIVER_NVIDIA }, | ||
2718 | { PCI_DEVICE(0x10de, 0x0be4), .driver_data = AZX_DRIVER_NVIDIA }, | ||
2716 | { PCI_DEVICE(0x10de, 0x0d94), .driver_data = AZX_DRIVER_NVIDIA }, | 2719 | { PCI_DEVICE(0x10de, 0x0d94), .driver_data = AZX_DRIVER_NVIDIA }, |
2717 | { PCI_DEVICE(0x10de, 0x0d95), .driver_data = AZX_DRIVER_NVIDIA }, | 2720 | { PCI_DEVICE(0x10de, 0x0d95), .driver_data = AZX_DRIVER_NVIDIA }, |
2718 | { PCI_DEVICE(0x10de, 0x0d96), .driver_data = AZX_DRIVER_NVIDIA }, | 2721 | { PCI_DEVICE(0x10de, 0x0d96), .driver_data = AZX_DRIVER_NVIDIA }, |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 447eda1f6770..1a36137e13ec 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1789,6 +1789,14 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1789 | 1789 | ||
1790 | codec->patch_ops.init = ad1981_hp_init; | 1790 | codec->patch_ops.init = ad1981_hp_init; |
1791 | codec->patch_ops.unsol_event = ad1981_hp_unsol_event; | 1791 | codec->patch_ops.unsol_event = ad1981_hp_unsol_event; |
1792 | /* set the upper-limit for mixer amp to 0dB for avoiding the | ||
1793 | * possible damage by overloading | ||
1794 | */ | ||
1795 | snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT, | ||
1796 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1797 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1798 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1799 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1792 | break; | 1800 | break; |
1793 | case AD1981_THINKPAD: | 1801 | case AD1981_THINKPAD: |
1794 | spec->mixers[0] = ad1981_thinkpad_mixers; | 1802 | spec->mixers[0] = ad1981_thinkpad_mixers; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 888b6313eeca..aeed4cc5aa79 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -6248,6 +6248,7 @@ static const char *alc260_models[ALC260_MODEL_LAST] = { | |||
6248 | 6248 | ||
6249 | static struct snd_pci_quirk alc260_cfg_tbl[] = { | 6249 | static struct snd_pci_quirk alc260_cfg_tbl[] = { |
6250 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), | 6250 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), |
6251 | SND_PCI_QUIRK(0x1025, 0x007f, "Acer", ALC260_WILL), | ||
6251 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 6252 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
6252 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), | 6253 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), |
6253 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), | 6254 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 7717e01fc071..edaa729126bb 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -143,7 +143,8 @@ static int snd_pdacf_probe(struct pcmcia_device *link) | |||
143 | link->io.NumPorts1 = 16; | 143 | link->io.NumPorts1 = 16; |
144 | 144 | ||
145 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE; | 145 | link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE; |
146 | // link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 146 | /* FIXME: This driver should be updated to allow for dynamic IRQ sharing */ |
147 | /* link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FORCED_PULSE; */ | ||
147 | 148 | ||
148 | link->irq.Handler = pdacf_interrupt; | 149 | link->irq.Handler = pdacf_interrupt; |
149 | link->conf.Attributes = CONF_ENABLE_IRQ; | 150 | link->conf.Attributes = CONF_ENABLE_IRQ; |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 5f1681f6ca76..2a27f7b56726 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl4030.h> | 29 | #include <linux/i2c/twl.h> |
30 | #include <sound/core.h> | 30 | #include <sound/core.h> |
31 | #include <sound/pcm.h> | 31 | #include <sound/pcm.h> |
32 | #include <sound/pcm_params.h> | 32 | #include <sound/pcm_params.h> |
@@ -175,7 +175,7 @@ static int twl4030_write(struct snd_soc_codec *codec, | |||
175 | { | 175 | { |
176 | twl4030_write_reg_cache(codec, reg, value); | 176 | twl4030_write_reg_cache(codec, reg, value); |
177 | if (likely(reg < TWL4030_REG_SW_SHADOW)) | 177 | if (likely(reg < TWL4030_REG_SW_SHADOW)) |
178 | return twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, | 178 | return twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, |
179 | reg); | 179 | reg); |
180 | else | 180 | else |
181 | return 0; | 181 | return 0; |
@@ -261,7 +261,7 @@ static void twl4030_power_up(struct snd_soc_codec *codec) | |||
261 | do { | 261 | do { |
262 | /* this takes a little while, so don't slam i2c */ | 262 | /* this takes a little while, so don't slam i2c */ |
263 | udelay(2000); | 263 | udelay(2000); |
264 | twl4030_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, | 264 | twl_i2c_read_u8(TWL4030_MODULE_AUDIO_VOICE, &byte, |
265 | TWL4030_REG_ANAMICL); | 265 | TWL4030_REG_ANAMICL); |
266 | } while ((i++ < 100) && | 266 | } while ((i++ < 100) && |
267 | ((byte & TWL4030_CNCL_OFFSET_START) == | 267 | ((byte & TWL4030_CNCL_OFFSET_START) == |
@@ -542,7 +542,7 @@ static int pin_name##pga_event(struct snd_soc_dapm_widget *w, \ | |||
542 | break; \ | 542 | break; \ |
543 | case SND_SOC_DAPM_POST_PMD: \ | 543 | case SND_SOC_DAPM_POST_PMD: \ |
544 | reg_val = twl4030_read_reg_cache(w->codec, reg); \ | 544 | reg_val = twl4030_read_reg_cache(w->codec, reg); \ |
545 | twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, \ | 545 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, \ |
546 | reg_val & (~mask), \ | 546 | reg_val & (~mask), \ |
547 | reg); \ | 547 | reg); \ |
548 | break; \ | 548 | break; \ |
@@ -679,7 +679,7 @@ static void headset_ramp(struct snd_soc_codec *codec, int ramp) | |||
679 | mdelay((ramp_base[(hs_pop & TWL4030_RAMP_DELAY) >> 2] / | 679 | mdelay((ramp_base[(hs_pop & TWL4030_RAMP_DELAY) >> 2] / |
680 | twl4030->sysclk) + 1); | 680 | twl4030->sysclk) + 1); |
681 | /* Bypass the reg_cache to mute the headset */ | 681 | /* Bypass the reg_cache to mute the headset */ |
682 | twl4030_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, | 682 | twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, |
683 | hs_gain & (~0x0f), | 683 | hs_gain & (~0x0f), |
684 | TWL4030_REG_HS_GAIN_SET); | 684 | TWL4030_REG_HS_GAIN_SET); |
685 | 685 | ||
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index f82125d9e85a..ebbf11b653a4 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -1340,9 +1340,10 @@ static int wm8350_resume(struct platform_device *pdev) | |||
1340 | return 0; | 1340 | return 0; |
1341 | } | 1341 | } |
1342 | 1342 | ||
1343 | static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | 1343 | static irqreturn_t wm8350_hp_jack_handler(int irq, void *data) |
1344 | { | 1344 | { |
1345 | struct wm8350_data *priv = data; | 1345 | struct wm8350_data *priv = data; |
1346 | struct wm8350 *wm8350 = priv->codec.control_data; | ||
1346 | u16 reg; | 1347 | u16 reg; |
1347 | int report; | 1348 | int report; |
1348 | int mask; | 1349 | int mask; |
@@ -1365,7 +1366,7 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | |||
1365 | 1366 | ||
1366 | if (!jack->jack) { | 1367 | if (!jack->jack) { |
1367 | dev_warn(wm8350->dev, "Jack interrupt called with no jack\n"); | 1368 | dev_warn(wm8350->dev, "Jack interrupt called with no jack\n"); |
1368 | return; | 1369 | return IRQ_NONE; |
1369 | } | 1370 | } |
1370 | 1371 | ||
1371 | /* Debounce */ | 1372 | /* Debounce */ |
@@ -1378,6 +1379,8 @@ static void wm8350_hp_jack_handler(struct wm8350 *wm8350, int irq, void *data) | |||
1378 | report = 0; | 1379 | report = 0; |
1379 | 1380 | ||
1380 | snd_soc_jack_report(jack->jack, report, jack->report); | 1381 | snd_soc_jack_report(jack->jack, report, jack->report); |
1382 | |||
1383 | return IRQ_HANDLED; | ||
1381 | } | 1384 | } |
1382 | 1385 | ||
1383 | /** | 1386 | /** |
@@ -1421,9 +1424,7 @@ int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, | |||
1421 | wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); | 1424 | wm8350_set_bits(wm8350, WM8350_JACK_DETECT, ena); |
1422 | 1425 | ||
1423 | /* Sync status */ | 1426 | /* Sync status */ |
1424 | wm8350_hp_jack_handler(wm8350, irq, priv); | 1427 | wm8350_hp_jack_handler(irq, priv); |
1425 | |||
1426 | wm8350_unmask_irq(wm8350, irq); | ||
1427 | 1428 | ||
1428 | return 0; | 1429 | return 0; |
1429 | } | 1430 | } |
@@ -1482,12 +1483,16 @@ static int wm8350_probe(struct platform_device *pdev) | |||
1482 | wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME, | 1483 | wm8350_set_bits(wm8350, WM8350_ROUT2_VOLUME, |
1483 | WM8350_OUT2_VU | WM8350_OUT2R_MUTE); | 1484 | WM8350_OUT2_VU | WM8350_OUT2R_MUTE); |
1484 | 1485 | ||
1485 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); | 1486 | /* Make sure jack detect is disabled to start off with */ |
1486 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); | 1487 | wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, |
1488 | WM8350_JDL_ENA | WM8350_JDR_ENA); | ||
1489 | |||
1487 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, | 1490 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L, |
1488 | wm8350_hp_jack_handler, priv); | 1491 | wm8350_hp_jack_handler, 0, "Left jack detect", |
1492 | priv); | ||
1489 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, | 1493 | wm8350_register_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R, |
1490 | wm8350_hp_jack_handler, priv); | 1494 | wm8350_hp_jack_handler, 0, "Right jack detect", |
1495 | priv); | ||
1491 | 1496 | ||
1492 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 1497 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
1493 | if (ret < 0) { | 1498 | if (ret < 0) { |
@@ -1516,8 +1521,6 @@ static int wm8350_remove(struct platform_device *pdev) | |||
1516 | WM8350_JDL_ENA | WM8350_JDR_ENA); | 1521 | WM8350_JDL_ENA | WM8350_JDR_ENA); |
1517 | wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA); | 1522 | wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_4, WM8350_TOCLK_ENA); |
1518 | 1523 | ||
1519 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); | ||
1520 | wm8350_mask_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); | ||
1521 | wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); | 1524 | wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_L); |
1522 | wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); | 1525 | wm8350_free_irq(wm8350, WM8350_IRQ_CODEC_JCK_DET_R); |
1523 | 1526 | ||
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index c9438dd62df3..dbc368c08263 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -199,7 +199,7 @@ static void wm8900_reset(struct snd_soc_codec *codec) | |||
199 | snd_soc_write(codec, WM8900_REG_RESET, 0); | 199 | snd_soc_write(codec, WM8900_REG_RESET, 0); |
200 | 200 | ||
201 | memcpy(codec->reg_cache, wm8900_reg_defaults, | 201 | memcpy(codec->reg_cache, wm8900_reg_defaults, |
202 | sizeof(codec->reg_cache)); | 202 | sizeof(wm8900_reg_defaults)); |
203 | } | 203 | } |
204 | 204 | ||
205 | static int wm8900_hp_event(struct snd_soc_dapm_widget *w, | 205 | static int wm8900_hp_event(struct snd_soc_dapm_widget *w, |
diff --git a/sound/soc/s3c24xx/s3c24xx_simtec.c b/sound/soc/s3c24xx/s3c24xx_simtec.c index d441c3b64631..4984754f3298 100644 --- a/sound/soc/s3c24xx/s3c24xx_simtec.c +++ b/sound/soc/s3c24xx/s3c24xx_simtec.c | |||
@@ -312,7 +312,7 @@ int simtec_audio_resume(struct device *dev) | |||
312 | return 0; | 312 | return 0; |
313 | } | 313 | } |
314 | 314 | ||
315 | struct dev_pm_ops simtec_audio_pmops = { | 315 | const struct dev_pm_ops simtec_audio_pmops = { |
316 | .resume = simtec_audio_resume, | 316 | .resume = simtec_audio_resume, |
317 | }; | 317 | }; |
318 | EXPORT_SYMBOL_GPL(simtec_audio_pmops); | 318 | EXPORT_SYMBOL_GPL(simtec_audio_pmops); |
diff --git a/sound/soc/s3c24xx/s3c24xx_simtec.h b/sound/soc/s3c24xx/s3c24xx_simtec.h index 2714203af161..e18faee30cce 100644 --- a/sound/soc/s3c24xx/s3c24xx_simtec.h +++ b/sound/soc/s3c24xx/s3c24xx_simtec.h | |||
@@ -15,7 +15,7 @@ extern int simtec_audio_core_probe(struct platform_device *pdev, | |||
15 | extern int simtec_audio_remove(struct platform_device *pdev); | 15 | extern int simtec_audio_remove(struct platform_device *pdev); |
16 | 16 | ||
17 | #ifdef CONFIG_PM | 17 | #ifdef CONFIG_PM |
18 | extern struct dev_pm_ops simtec_audio_pmops; | 18 | extern const struct dev_pm_ops simtec_audio_pmops; |
19 | #define simtec_audio_pm &simtec_audio_pmops | 19 | #define simtec_audio_pm &simtec_audio_pmops |
20 | #else | 20 | #else |
21 | #define simtec_audio_pm NULL | 21 | #define simtec_audio_pm NULL |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ef8f28284cb9..0a6440c6f54a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1236,7 +1236,7 @@ static int soc_poweroff(struct device *dev) | |||
1236 | return 0; | 1236 | return 0; |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | static struct dev_pm_ops soc_pm_ops = { | 1239 | static const struct dev_pm_ops soc_pm_ops = { |
1240 | .suspend = soc_suspend, | 1240 | .suspend = soc_suspend, |
1241 | .resume = soc_resume, | 1241 | .resume = soc_resume, |
1242 | .poweroff = soc_poweroff, | 1242 | .poweroff = soc_poweroff, |