aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/rawmidi.c42
-rw-r--r--sound/drivers/dummy.c2
-rw-r--r--sound/oss/dmasound/dmasound_core.c4
-rw-r--r--sound/oss/sb_common.c4
-rw-r--r--sound/oss/sb_ess.c2
-rw-r--r--sound/pci/hda/hda_intel.c13
-rw-r--r--sound/pci/hda/patch_conexant.c1
-rw-r--r--sound/pci/hda/patch_realtek.c7
-rw-r--r--sound/pci/hda/patch_sigmatel.c68
-rw-r--r--sound/pci/ice1712/prodigy_hifi.c2
-rw-r--r--sound/pci/intel8x0.c6
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c21
-rw-r--r--sound/pcmcia/vx/vxpocket.c21
-rw-r--r--sound/ppc/Kconfig2
-rw-r--r--sound/sh/aica.c1
-rw-r--r--sound/soc/omap/Kconfig13
-rw-r--r--sound/soc/omap/omap-pcm.c8
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c17
-rw-r--r--sound/soc/s3c24xx/s3c64xx-i2s.c2
-rw-r--r--sound/soc/soc-core.c11
-rw-r--r--sound/soc/soc-dapm.c2
-rw-r--r--sound/usb/usbaudio.h2
22 files changed, 188 insertions, 63 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index c0adc14c91f0..70d6f25ba526 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -248,7 +248,8 @@ static int assign_substream(struct snd_rawmidi *rmidi, int subdevice,
248 list_for_each_entry(substream, &s->substreams, list) { 248 list_for_each_entry(substream, &s->substreams, list) {
249 if (substream->opened) { 249 if (substream->opened) {
250 if (stream == SNDRV_RAWMIDI_STREAM_INPUT || 250 if (stream == SNDRV_RAWMIDI_STREAM_INPUT ||
251 !(mode & SNDRV_RAWMIDI_LFLG_APPEND)) 251 !(mode & SNDRV_RAWMIDI_LFLG_APPEND) ||
252 !substream->append)
252 continue; 253 continue;
253 } 254 }
254 if (subdevice < 0 || subdevice == substream->number) { 255 if (subdevice < 0 || subdevice == substream->number) {
@@ -266,17 +267,21 @@ static int open_substream(struct snd_rawmidi *rmidi,
266{ 267{
267 int err; 268 int err;
268 269
269 err = snd_rawmidi_runtime_create(substream); 270 if (substream->use_count == 0) {
270 if (err < 0) 271 err = snd_rawmidi_runtime_create(substream);
271 return err; 272 if (err < 0)
272 err = substream->ops->open(substream); 273 return err;
273 if (err < 0) 274 err = substream->ops->open(substream);
274 return err; 275 if (err < 0) {
275 substream->opened = 1; 276 snd_rawmidi_runtime_free(substream);
276 if (substream->use_count++ == 0) 277 return err;
278 }
279 substream->opened = 1;
277 substream->active_sensing = 0; 280 substream->active_sensing = 0;
278 if (mode & SNDRV_RAWMIDI_LFLG_APPEND) 281 if (mode & SNDRV_RAWMIDI_LFLG_APPEND)
279 substream->append = 1; 282 substream->append = 1;
283 }
284 substream->use_count++;
280 rmidi->streams[substream->stream].substream_opened++; 285 rmidi->streams[substream->stream].substream_opened++;
281 return 0; 286 return 0;
282} 287}
@@ -297,27 +302,27 @@ static int rawmidi_open_priv(struct snd_rawmidi *rmidi, int subdevice, int mode,
297 SNDRV_RAWMIDI_STREAM_INPUT, 302 SNDRV_RAWMIDI_STREAM_INPUT,
298 mode, &sinput); 303 mode, &sinput);
299 if (err < 0) 304 if (err < 0)
300 goto __error; 305 return err;
301 } 306 }
302 if (mode & SNDRV_RAWMIDI_LFLG_OUTPUT) { 307 if (mode & SNDRV_RAWMIDI_LFLG_OUTPUT) {
303 err = assign_substream(rmidi, subdevice, 308 err = assign_substream(rmidi, subdevice,
304 SNDRV_RAWMIDI_STREAM_OUTPUT, 309 SNDRV_RAWMIDI_STREAM_OUTPUT,
305 mode, &soutput); 310 mode, &soutput);
306 if (err < 0) 311 if (err < 0)
307 goto __error; 312 return err;
308 } 313 }
309 314
310 if (sinput) { 315 if (sinput) {
311 err = open_substream(rmidi, sinput, mode); 316 err = open_substream(rmidi, sinput, mode);
312 if (err < 0) 317 if (err < 0)
313 goto __error; 318 return err;
314 } 319 }
315 if (soutput) { 320 if (soutput) {
316 err = open_substream(rmidi, soutput, mode); 321 err = open_substream(rmidi, soutput, mode);
317 if (err < 0) { 322 if (err < 0) {
318 if (sinput) 323 if (sinput)
319 close_substream(rmidi, sinput, 0); 324 close_substream(rmidi, sinput, 0);
320 goto __error; 325 return err;
321 } 326 }
322 } 327 }
323 328
@@ -325,13 +330,6 @@ static int rawmidi_open_priv(struct snd_rawmidi *rmidi, int subdevice, int mode,
325 rfile->input = sinput; 330 rfile->input = sinput;
326 rfile->output = soutput; 331 rfile->output = soutput;
327 return 0; 332 return 0;
328
329 __error:
330 if (sinput && sinput->runtime)
331 snd_rawmidi_runtime_free(sinput);
332 if (soutput && soutput->runtime)
333 snd_rawmidi_runtime_free(soutput);
334 return err;
335} 333}
336 334
337/* called from sound/core/seq/seq_midi.c */ 335/* called from sound/core/seq/seq_midi.c */
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 146ef00f94a3..252e04ce602f 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -165,7 +165,7 @@ MODULE_PARM_DESC(enable, "Enable this dummy soundcard.");
165module_param_array(pcm_devs, int, NULL, 0444); 165module_param_array(pcm_devs, int, NULL, 0444);
166MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for dummy driver."); 166MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for dummy driver.");
167module_param_array(pcm_substreams, int, NULL, 0444); 167module_param_array(pcm_substreams, int, NULL, 0444);
168MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-16) for dummy driver."); 168MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-128) for dummy driver.");
169//module_param_array(midi_devs, int, NULL, 0444); 169//module_param_array(midi_devs, int, NULL, 0444);
170//MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver."); 170//MODULE_PARM_DESC(midi_devs, "MIDI devices # (0-2) for dummy driver.");
171module_param(fake_buffer, bool, 0444); 171module_param(fake_buffer, bool, 0444);
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index 793b7f478433..3f3c3f71db4b 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -219,7 +219,9 @@ static int shared_resources_initialised;
219 * Mid level stuff 219 * Mid level stuff
220 */ 220 */
221 221
222struct sound_settings dmasound = { .lock = SPIN_LOCK_UNLOCKED }; 222struct sound_settings dmasound = {
223 .lock = __SPIN_LOCK_UNLOCKED(dmasound.lock)
224};
223 225
224static inline void sound_silence(void) 226static inline void sound_silence(void)
225{ 227{
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c
index 77d0e5efda76..ce4db49291f7 100644
--- a/sound/oss/sb_common.c
+++ b/sound/oss/sb_common.c
@@ -157,7 +157,7 @@ static void sb_intr (sb_devc *devc)
157 break; 157 break;
158 158
159 default: 159 default:
160 /* printk(KERN_WARN "Sound Blaster: Unexpected interrupt\n"); */ 160 /* printk(KERN_WARNING "Sound Blaster: Unexpected interrupt\n"); */
161 ; 161 ;
162 } 162 }
163 } 163 }
@@ -177,7 +177,7 @@ static void sb_intr (sb_devc *devc)
177 break; 177 break;
178 178
179 default: 179 default:
180 /* printk(KERN_WARN "Sound Blaster: Unexpected interrupt\n"); */ 180 /* printk(KERN_WARNING "Sound Blaster: Unexpected interrupt\n"); */
181 ; 181 ;
182 } 182 }
183 } 183 }
diff --git a/sound/oss/sb_ess.c b/sound/oss/sb_ess.c
index 180e95c87e3e..51a3d381a59e 100644
--- a/sound/oss/sb_ess.c
+++ b/sound/oss/sb_ess.c
@@ -782,7 +782,7 @@ printk(KERN_INFO "FKS: ess_handle_channel %s irq_mode=%d\n", channel, irq_mode);
782 break; 782 break;
783 783
784 default:; 784 default:;
785 /* printk(KERN_WARN "ESS: Unexpected interrupt\n"); */ 785 /* printk(KERN_WARNING "ESS: Unexpected interrupt\n"); */
786 } 786 }
787} 787}
788 788
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index c9ad182e1b4b..6517f589d01d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -722,9 +722,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
722 chip->last_cmd[addr]); 722 chip->last_cmd[addr]);
723 chip->single_cmd = 1; 723 chip->single_cmd = 1;
724 bus->response_reset = 0; 724 bus->response_reset = 0;
725 /* re-initialize CORB/RIRB */ 725 /* release CORB/RIRB */
726 azx_free_cmd_io(chip); 726 azx_free_cmd_io(chip);
727 azx_init_cmd_io(chip); 727 /* disable unsolicited responses */
728 azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_UNSOL);
728 return -1; 729 return -1;
729} 730}
730 731
@@ -865,7 +866,9 @@ static int azx_reset(struct azx *chip)
865 } 866 }
866 867
867 /* Accept unsolicited responses */ 868 /* Accept unsolicited responses */
868 azx_writel(chip, GCTL, azx_readl(chip, GCTL) | ICH6_GCTL_UNSOL); 869 if (!chip->single_cmd)
870 azx_writel(chip, GCTL, azx_readl(chip, GCTL) |
871 ICH6_GCTL_UNSOL);
869 872
870 /* detect codecs */ 873 /* detect codecs */
871 if (!chip->codec_mask) { 874 if (!chip->codec_mask) {
@@ -980,7 +983,8 @@ static void azx_init_chip(struct azx *chip)
980 azx_int_enable(chip); 983 azx_int_enable(chip);
981 984
982 /* initialize the codec command I/O */ 985 /* initialize the codec command I/O */
983 azx_init_cmd_io(chip); 986 if (!chip->single_cmd)
987 azx_init_cmd_io(chip);
984 988
985 /* program the position buffer */ 989 /* program the position buffer */
986 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr); 990 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
@@ -2674,6 +2678,7 @@ static struct pci_device_id azx_ids[] = {
2674 { PCI_DEVICE(0x10de, 0x044b), .driver_data = AZX_DRIVER_NVIDIA }, 2678 { PCI_DEVICE(0x10de, 0x044b), .driver_data = AZX_DRIVER_NVIDIA },
2675 { PCI_DEVICE(0x10de, 0x055c), .driver_data = AZX_DRIVER_NVIDIA }, 2679 { PCI_DEVICE(0x10de, 0x055c), .driver_data = AZX_DRIVER_NVIDIA },
2676 { PCI_DEVICE(0x10de, 0x055d), .driver_data = AZX_DRIVER_NVIDIA }, 2680 { PCI_DEVICE(0x10de, 0x055d), .driver_data = AZX_DRIVER_NVIDIA },
2681 { PCI_DEVICE(0x10de, 0x0590), .driver_data = AZX_DRIVER_NVIDIA },
2677 { PCI_DEVICE(0x10de, 0x0774), .driver_data = AZX_DRIVER_NVIDIA }, 2682 { PCI_DEVICE(0x10de, 0x0774), .driver_data = AZX_DRIVER_NVIDIA },
2678 { PCI_DEVICE(0x10de, 0x0775), .driver_data = AZX_DRIVER_NVIDIA }, 2683 { PCI_DEVICE(0x10de, 0x0775), .driver_data = AZX_DRIVER_NVIDIA },
2679 { PCI_DEVICE(0x10de, 0x0776), .driver_data = AZX_DRIVER_NVIDIA }, 2684 { PCI_DEVICE(0x10de, 0x0776), .driver_data = AZX_DRIVER_NVIDIA },
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 3fbbc8c01e70..6479e65858d3 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2325,6 +2325,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2325 CXT5066_LAPTOP), 2325 CXT5066_LAPTOP),
2326 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell", 2326 SND_PCI_QUIRK(0x1028, 0x02f5, "Dell",
2327 CXT5066_DELL_LAPTOP), 2327 CXT5066_DELL_LAPTOP),
2328 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5),
2328 {} 2329 {}
2329}; 2330};
2330 2331
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c08ca660daba..ff20048504b6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -965,6 +965,8 @@ static void alc_automute_pin(struct hda_codec *codec)
965 unsigned int nid = spec->autocfg.hp_pins[0]; 965 unsigned int nid = spec->autocfg.hp_pins[0];
966 int i; 966 int i;
967 967
968 if (!nid)
969 return;
968 pincap = snd_hda_query_pin_caps(codec, nid); 970 pincap = snd_hda_query_pin_caps(codec, nid);
969 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ 971 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
970 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); 972 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
@@ -12602,7 +12604,8 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {
12602 SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", 12604 SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One",
12603 ALC268_ACER_ASPIRE_ONE), 12605 ALC268_ACER_ASPIRE_ONE),
12604 SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), 12606 SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL),
12605 SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), 12607 SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0,
12608 "Dell Inspiron Mini9/Vostro A90", ALC268_DELL),
12606 /* almost compatible with toshiba but with optional digital outs; 12609 /* almost compatible with toshiba but with optional digital outs;
12607 * auto-probing seems working fine 12610 * auto-probing seems working fine
12608 */ 12611 */
@@ -17374,7 +17377,7 @@ static int alc662_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin,
17374 17377
17375/* create playback/capture controls for input pins */ 17378/* create playback/capture controls for input pins */
17376#define alc662_auto_create_input_ctls \ 17379#define alc662_auto_create_input_ctls \
17377 alc880_auto_create_input_ctls 17380 alc882_auto_create_input_ctls
17378 17381
17379static void alc662_auto_set_output_and_unmute(struct hda_codec *codec, 17382static void alc662_auto_set_output_and_unmute(struct hda_codec *codec,
17380 hda_nid_t nid, int pin_type, 17383 hda_nid_t nid, int pin_type,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 66c0876bf734..8eb6508cd991 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -28,6 +28,7 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/pci.h> 30#include <linux/pci.h>
31#include <linux/dmi.h>
31#include <sound/core.h> 32#include <sound/core.h>
32#include <sound/asoundef.h> 33#include <sound/asoundef.h>
33#include <sound/jack.h> 34#include <sound/jack.h>
@@ -1693,6 +1694,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1693 "DFI LanParty", STAC_92HD71BXX_REF), 1694 "DFI LanParty", STAC_92HD71BXX_REF),
1694 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fb, 1695 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fb,
1695 "HP dv4-1222nr", STAC_HP_DV4_1222NR), 1696 "HP dv4-1222nr", STAC_HP_DV4_1222NR),
1697 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x1720,
1698 "HP", STAC_HP_DV5),
1696 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080, 1699 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080,
1697 "HP", STAC_HP_DV5), 1700 "HP", STAC_HP_DV5),
1698 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0, 1701 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0,
@@ -4665,6 +4668,26 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
4665 } 4668 }
4666} 4669}
4667 4670
4671static int hp_bseries_system(u32 subsystem_id)
4672{
4673 switch (subsystem_id) {
4674 case 0x103c307e:
4675 case 0x103c307f:
4676 case 0x103c3080:
4677 case 0x103c3081:
4678 case 0x103c1722:
4679 case 0x103c1723:
4680 case 0x103c1724:
4681 case 0x103c1725:
4682 case 0x103c1726:
4683 case 0x103c1727:
4684 case 0x103c1728:
4685 case 0x103c1729:
4686 return 1;
4687 }
4688 return 0;
4689}
4690
4668#ifdef CONFIG_PROC_FS 4691#ifdef CONFIG_PROC_FS
4669static void stac92hd_proc_hook(struct snd_info_buffer *buffer, 4692static void stac92hd_proc_hook(struct snd_info_buffer *buffer,
4670 struct hda_codec *codec, hda_nid_t nid) 4693 struct hda_codec *codec, hda_nid_t nid)
@@ -4754,6 +4777,11 @@ static int stac92xx_hp_check_power_status(struct hda_codec *codec,
4754 else 4777 else
4755 spec->gpio_data |= spec->gpio_led; /* white */ 4778 spec->gpio_data |= spec->gpio_led; /* white */
4756 4779
4780 if (hp_bseries_system(codec->subsystem_id)) {
4781 /* LED state is inverted on these systems */
4782 spec->gpio_data ^= spec->gpio_led;
4783 }
4784
4757 stac_gpio_set(codec, spec->gpio_mask, 4785 stac_gpio_set(codec, spec->gpio_mask,
4758 spec->gpio_dir, 4786 spec->gpio_dir,
4759 spec->gpio_data); 4787 spec->gpio_data);
@@ -5243,6 +5271,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
5243{ 5271{
5244 struct sigmatel_spec *spec; 5272 struct sigmatel_spec *spec;
5245 struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init; 5273 struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
5274 unsigned int pin_cfg;
5246 int err = 0; 5275 int err = 0;
5247 5276
5248 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 5277 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -5426,6 +5455,45 @@ again:
5426 break; 5455 break;
5427 } 5456 }
5428 5457
5458 if (hp_bseries_system(codec->subsystem_id)) {
5459 pin_cfg = snd_hda_codec_get_pincfg(codec, 0x0f);
5460 if (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT ||
5461 get_defcfg_device(pin_cfg) == AC_JACK_SPEAKER ||
5462 get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT) {
5463 /* It was changed in the BIOS to just satisfy MS DTM.
5464 * Lets turn it back into slaved HP
5465 */
5466 pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE))
5467 | (AC_JACK_HP_OUT <<
5468 AC_DEFCFG_DEVICE_SHIFT);
5469 pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC
5470 | AC_DEFCFG_SEQUENCE)))
5471 | 0x1f;
5472 snd_hda_codec_set_pincfg(codec, 0x0f, pin_cfg);
5473 }
5474 }
5475
5476 if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) {
5477 const struct dmi_device *dev = NULL;
5478 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
5479 NULL, dev))) {
5480 if (strcmp(dev->name, "HP_Mute_LED_1")) {
5481 switch (codec->vendor_id) {
5482 case 0x111d7608:
5483 spec->gpio_led = 0x01;
5484 break;
5485 case 0x111d7600:
5486 case 0x111d7601:
5487 case 0x111d7602:
5488 case 0x111d7603:
5489 spec->gpio_led = 0x08;
5490 break;
5491 }
5492 break;
5493 }
5494 }
5495 }
5496
5429#ifdef CONFIG_SND_HDA_POWER_SAVE 5497#ifdef CONFIG_SND_HDA_POWER_SAVE
5430 if (spec->gpio_led) { 5498 if (spec->gpio_led) {
5431 spec->gpio_mask |= spec->gpio_led; 5499 spec->gpio_mask |= spec->gpio_led;
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c
index c75515f5be6f..6a9fee3ee78f 100644
--- a/sound/pci/ice1712/prodigy_hifi.c
+++ b/sound/pci/ice1712/prodigy_hifi.c
@@ -1100,7 +1100,7 @@ static void ak4396_init(struct snd_ice1712 *ice)
1100} 1100}
1101 1101
1102#ifdef CONFIG_PM 1102#ifdef CONFIG_PM
1103static int __devinit prodigy_hd2_resume(struct snd_ice1712 *ice) 1103static int prodigy_hd2_resume(struct snd_ice1712 *ice)
1104{ 1104{
1105 /* initialize ak4396 codec and restore previous mixer volumes */ 1105 /* initialize ak4396 codec and restore previous mixer volumes */
1106 struct prodigy_hifi_spec *spec = ice->spec; 1106 struct prodigy_hifi_spec *spec = ice->spec;
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 754867ed4785..aac20fb4aad2 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1950,6 +1950,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1950 }, 1950 },
1951 { 1951 {
1952 .subvendor = 0x104d, 1952 .subvendor = 0x104d,
1953 .subdevice = 0x8144,
1954 .name = "Sony",
1955 .type = AC97_TUNE_INV_EAPD
1956 },
1957 {
1958 .subvendor = 0x104d,
1953 .subdevice = 0x8197, 1959 .subdevice = 0x8197,
1954 .name = "Sony S1XP", 1960 .name = "Sony S1XP",
1955 .type = AC97_TUNE_INV_EAPD 1961 .type = AC97_TUNE_INV_EAPD
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 7dea74b71cf1..64b859925c0b 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -217,20 +217,25 @@ static void snd_pdacf_detach(struct pcmcia_device *link)
217 * configuration callback 217 * configuration callback
218 */ 218 */
219 219
220#define CS_CHECK(fn, ret) \
221do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
222
223static int pdacf_config(struct pcmcia_device *link) 220static int pdacf_config(struct pcmcia_device *link)
224{ 221{
225 struct snd_pdacf *pdacf = link->priv; 222 struct snd_pdacf *pdacf = link->priv;
226 int last_fn, last_ret; 223 int ret;
227 224
228 snd_printdd(KERN_DEBUG "pdacf_config called\n"); 225 snd_printdd(KERN_DEBUG "pdacf_config called\n");
229 link->conf.ConfigIndex = 0x5; 226 link->conf.ConfigIndex = 0x5;
230 227
231 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); 228 ret = pcmcia_request_io(link, &link->io);
232 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); 229 if (ret)
233 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); 230 goto failed;
231
232 ret = pcmcia_request_irq(link, &link->irq);
233 if (ret)
234 goto failed;
235
236 ret = pcmcia_request_configuration(link, &link->conf);
237 if (ret)
238 goto failed;
234 239
235 if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) 240 if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0)
236 goto failed; 241 goto failed;
@@ -238,8 +243,6 @@ static int pdacf_config(struct pcmcia_device *link)
238 link->dev_node = &pdacf->node; 243 link->dev_node = &pdacf->node;
239 return 0; 244 return 0;
240 245
241cs_failed:
242 cs_error(link, last_fn, last_ret);
243failed: 246failed:
244 pcmcia_disable_device(link); 247 pcmcia_disable_device(link);
245 return -ENODEV; 248 return -ENODEV;
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 7445cc8a47d3..1492744ad67f 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -213,14 +213,11 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq
213 * configuration callback 213 * configuration callback
214 */ 214 */
215 215
216#define CS_CHECK(fn, ret) \
217do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
218
219static int vxpocket_config(struct pcmcia_device *link) 216static int vxpocket_config(struct pcmcia_device *link)
220{ 217{
221 struct vx_core *chip = link->priv; 218 struct vx_core *chip = link->priv;
222 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 219 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
223 int last_fn, last_ret; 220 int ret;
224 221
225 snd_printdd(KERN_DEBUG "vxpocket_config called\n"); 222 snd_printdd(KERN_DEBUG "vxpocket_config called\n");
226 223
@@ -235,9 +232,17 @@ static int vxpocket_config(struct pcmcia_device *link)
235 strcpy(chip->card->driver, vxp440_hw.name); 232 strcpy(chip->card->driver, vxp440_hw.name);
236 } 233 }
237 234
238 CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); 235 ret = pcmcia_request_io(link, &link->io);
239 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); 236 if (ret)
240 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); 237 goto failed;
238
239 ret = pcmcia_request_irq(link, &link->irq);
240 if (ret)
241 goto failed;
242
243 ret = pcmcia_request_configuration(link, &link->conf);
244 if (ret)
245 goto failed;
241 246
242 chip->dev = &handle_to_dev(link); 247 chip->dev = &handle_to_dev(link);
243 snd_card_set_dev(chip->card, chip->dev); 248 snd_card_set_dev(chip->card, chip->dev);
@@ -248,8 +253,6 @@ static int vxpocket_config(struct pcmcia_device *link)
248 link->dev_node = &vxp->node; 253 link->dev_node = &vxp->node;
249 return 0; 254 return 0;
250 255
251cs_failed:
252 cs_error(link, last_fn, last_ret);
253failed: 256failed:
254 pcmcia_disable_device(link); 257 pcmcia_disable_device(link);
255 return -ENODEV; 258 return -ENODEV;
diff --git a/sound/ppc/Kconfig b/sound/ppc/Kconfig
index bd2338ab2ced..0519c60f5be1 100644
--- a/sound/ppc/Kconfig
+++ b/sound/ppc/Kconfig
@@ -2,7 +2,7 @@
2 2
3menuconfig SND_PPC 3menuconfig SND_PPC
4 bool "PowerPC sound devices" 4 bool "PowerPC sound devices"
5 depends on PPC64 || PPC32 5 depends on PPC
6 default y 6 default y
7 help 7 help
8 Support for sound devices specific to PowerPC architectures. 8 Support for sound devices specific to PowerPC architectures.
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 583a3693df75..a0df401ebb9f 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -49,6 +49,7 @@ MODULE_AUTHOR("Adrian McMenamin <adrian@mcmen.demon.co.uk>");
49MODULE_DESCRIPTION("Dreamcast AICA sound (pcm) driver"); 49MODULE_DESCRIPTION("Dreamcast AICA sound (pcm) driver");
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51MODULE_SUPPORTED_DEVICE("{{Yamaha/SEGA, AICA}}"); 51MODULE_SUPPORTED_DEVICE("{{Yamaha/SEGA, AICA}}");
52MODULE_FIRMWARE("aica_firmware.bin");
52 53
53/* module parameters */ 54/* module parameters */
54#define CARD_NAME "AICA" 55#define CARD_NAME "AICA"
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 2dee9839be86..653a362425df 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -21,7 +21,18 @@ config SND_OMAP_SOC_AMS_DELTA
21 select SND_OMAP_SOC_MCBSP 21 select SND_OMAP_SOC_MCBSP
22 select SND_SOC_CX20442 22 select SND_SOC_CX20442
23 help 23 help
24 Say Y if you want to add support for SoC audio on Amstrad Delta. 24 Say Y if you want to add support for SoC audio device connected to
25 a handset and a speakerphone found on Amstrad E3 (Delta) videophone.
26
27 Note that in order to get those devices fully supported, you have to
28 build the kernel with standard serial port driver included and
29 configured for at least 4 ports. Then, from userspace, you must load
30 a line discipline #19 on the modem (ttyS3) serial line. The simplest
31 way to achieve this is to install util-linux-ng and use the included
32 ldattach utility. This can be started automatically from udev,
33 a simple rule like this one should do the trick (it does for me):
34 ACTION=="add", KERNEL=="controlC0", \
35 RUN+="/usr/sbin/ldattach 19 /dev/ttyS3"
25 36
26config SND_OMAP_SOC_OSK5912 37config SND_OMAP_SOC_OSK5912
27 tristate "SoC Audio support for omap osk5912" 38 tristate "SoC Audio support for omap osk5912"
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 5735945788bf..6a829eef2a4f 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -195,8 +195,12 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
195 else 195 else
196 omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ); 196 omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ);
197 197
198 omap_set_dma_src_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16); 198 if (!(cpu_class_is_omap1())) {
199 omap_set_dma_dest_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16); 199 omap_set_dma_src_burst_mode(prtd->dma_ch,
200 OMAP_DMA_DATA_BURST_16);
201 omap_set_dma_dest_burst_mode(prtd->dma_ch,
202 OMAP_DMA_DATA_BURST_16);
203 }
200 204
201 return 0; 205 return 0;
202} 206}
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 5cbbdc80fde3..1f35c6fcf5fd 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -75,11 +75,19 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
75{ 75{
76 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 76 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
77 dma_addr_t pos = prtd->dma_pos; 77 dma_addr_t pos = prtd->dma_pos;
78 unsigned int limit;
78 int ret; 79 int ret;
79 80
80 pr_debug("Entered %s\n", __func__); 81 pr_debug("Entered %s\n", __func__);
81 82
82 while (prtd->dma_loaded < prtd->dma_limit) { 83 if (s3c_dma_has_circular()) {
84 limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period;
85 } else
86 limit = prtd->dma_limit;
87
88 pr_debug("%s: loaded %d, limit %d\n", __func__, prtd->dma_loaded, limit);
89
90 while (prtd->dma_loaded < limit) {
83 unsigned long len = prtd->dma_period; 91 unsigned long len = prtd->dma_period;
84 92
85 pr_debug("dma_loaded: %d\n", prtd->dma_loaded); 93 pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
@@ -123,7 +131,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
123 snd_pcm_period_elapsed(substream); 131 snd_pcm_period_elapsed(substream);
124 132
125 spin_lock(&prtd->lock); 133 spin_lock(&prtd->lock);
126 if (prtd->state & ST_RUNNING) { 134 if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) {
127 prtd->dma_loaded--; 135 prtd->dma_loaded--;
128 s3c24xx_pcm_enqueue(substream); 136 s3c24xx_pcm_enqueue(substream);
129 } 137 }
@@ -164,6 +172,11 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
164 printk(KERN_ERR "failed to get dma channel\n"); 172 printk(KERN_ERR "failed to get dma channel\n");
165 return ret; 173 return ret;
166 } 174 }
175
176 /* use the circular buffering if we have it available. */
177 if (s3c_dma_has_circular())
178 s3c2410_dma_setflags(prtd->params->channel,
179 S3C2410_DMAF_CIRCULAR);
167 } 180 }
168 181
169 s3c2410_dma_set_buffdone_fn(prtd->params->channel, 182 s3c2410_dma_set_buffdone_fn(prtd->params->channel,
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 3c06c401d0fb..105a77eeded0 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -220,6 +220,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev)
220 goto err; 220 goto err;
221 } 221 }
222 222
223 clk_enable(i2s->iis_cclk);
224
223 ret = s3c_i2sv2_probe(pdev, dai, i2s, 0); 225 ret = s3c_i2sv2_probe(pdev, dai, i2s, 0);
224 if (ret) 226 if (ret)
225 goto err_clk; 227 goto err_clk;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 7ff04ad2a97e..0a1b2f64bbee 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -834,6 +834,9 @@ EXPORT_SYMBOL_GPL(snd_soc_resume_device);
834#define soc_resume NULL 834#define soc_resume NULL
835#endif 835#endif
836 836
837static struct snd_soc_dai_ops null_dai_ops = {
838};
839
837static void snd_soc_instantiate_card(struct snd_soc_card *card) 840static void snd_soc_instantiate_card(struct snd_soc_card *card)
838{ 841{
839 struct platform_device *pdev = container_of(card->dev, 842 struct platform_device *pdev = container_of(card->dev,
@@ -877,6 +880,11 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
877 ac97 = 1; 880 ac97 = 1;
878 } 881 }
879 882
883 for (i = 0; i < card->num_links; i++) {
884 if (!card->dai_link[i].codec_dai->ops)
885 card->dai_link[i].codec_dai->ops = &null_dai_ops;
886 }
887
880 /* If we have AC97 in the system then don't wait for the 888 /* If we have AC97 in the system then don't wait for the
881 * codec. This will need revisiting if we have to handle 889 * codec. This will need revisiting if we have to handle
882 * systems with mixed AC97 and non-AC97 parts. Only check for 890 * systems with mixed AC97 and non-AC97 parts. Only check for
@@ -2329,9 +2337,6 @@ static int snd_soc_unregister_card(struct snd_soc_card *card)
2329 return 0; 2337 return 0;
2330} 2338}
2331 2339
2332static struct snd_soc_dai_ops null_dai_ops = {
2333};
2334
2335/** 2340/**
2336 * snd_soc_register_dai - Register a DAI with the ASoC core 2341 * snd_soc_register_dai - Register a DAI with the ASoC core
2337 * 2342 *
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8de6f9dec4a2..d89f6dc00908 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2072,9 +2072,9 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec,
2072 } 2072 }
2073 } 2073 }
2074 } 2074 }
2075 mutex_unlock(&codec->mutex);
2076 2075
2077 dapm_power_widgets(codec, event); 2076 dapm_power_widgets(codec, event);
2077 mutex_unlock(&codec->mutex);
2078 dump_dapm(codec, __func__); 2078 dump_dapm(codec, __func__);
2079 return 0; 2079 return 0;
2080} 2080}
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 8e7f78941ba6..e9a3a9dca15c 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -210,7 +210,7 @@ struct snd_usb_midi_endpoint_info {
210/* 210/*
211 */ 211 */
212 212
213#define combine_word(s) ((*s) | ((unsigned int)(s)[1] << 8)) 213#define combine_word(s) ((*(s)) | ((unsigned int)(s)[1] << 8))
214#define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16)) 214#define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16))
215#define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24)) 215#define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24))
216 216