aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/Kconfig4
-rw-r--r--sound/aoa/codecs/snd-aoa-codec-tas.c13
-rw-r--r--sound/core/init.c8
-rw-r--r--sound/core/oss/pcm_oss.c3
-rw-r--r--sound/core/pcm.c7
-rw-r--r--sound/core/pcm_native.c6
-rw-r--r--sound/core/rtctimer.c20
-rw-r--r--sound/core/sound.c22
-rw-r--r--sound/oss/cs46xx.c6
-rw-r--r--sound/oss/soundcard.c16
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c1
-rw-r--r--sound/pci/hda/patch_realtek.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c14
-rw-r--r--sound/sound_core.c6
-rw-r--r--sound/usb/usbaudio.c3
-rw-r--r--sound/usb/usbmidi.c2
-rw-r--r--sound/usb/usbmixer.c9
17 files changed, 81 insertions, 61 deletions
diff --git a/sound/Kconfig b/sound/Kconfig
index e0d791a98452..95949b6806ac 100644
--- a/sound/Kconfig
+++ b/sound/Kconfig
@@ -64,11 +64,11 @@ source "sound/arm/Kconfig"
64 64
65source "sound/mips/Kconfig" 65source "sound/mips/Kconfig"
66 66
67# the following will depenend on the order of config. 67# the following will depend on the order of config.
68# here assuming USB is defined before ALSA 68# here assuming USB is defined before ALSA
69source "sound/usb/Kconfig" 69source "sound/usb/Kconfig"
70 70
71# the following will depenend on the order of config. 71# the following will depend on the order of config.
72# here assuming PCMCIA is defined before ALSA 72# here assuming PCMCIA is defined before ALSA
73source "sound/pcmcia/Kconfig" 73source "sound/pcmcia/Kconfig"
74 74
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2ef55a17917c..9de8485ba3f5 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -514,9 +514,15 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol,
514 mutex_lock(&tas->mtx); 514 mutex_lock(&tas->mtx);
515 oldacr = tas->acr; 515 oldacr = tas->acr;
516 516
517 tas->acr &= ~TAS_ACR_INPUT_B; 517 /*
518 * Despite what the data sheet says in one place, the
519 * TAS_ACR_B_MONAUREAL bit forces mono output even when
520 * input A (line in) is selected.
521 */
522 tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL);
518 if (ucontrol->value.enumerated.item[0]) 523 if (ucontrol->value.enumerated.item[0])
519 tas->acr |= TAS_ACR_INPUT_B; 524 tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL |
525 TAS_ACR_B_MON_SEL_RIGHT;
520 if (oldacr == tas->acr) { 526 if (oldacr == tas->acr) {
521 mutex_unlock(&tas->mtx); 527 mutex_unlock(&tas->mtx);
522 return 0; 528 return 0;
@@ -686,8 +692,7 @@ static int tas_reset_init(struct tas *tas)
686 if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) 692 if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp))
687 goto outerr; 693 goto outerr;
688 694
689 tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL | 695 tas->acr |= TAS_ACR_ANALOG_PDOWN;
690 TAS_ACR_B_MON_SEL_RIGHT;
691 if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) 696 if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr))
692 goto outerr; 697 goto outerr;
693 698
diff --git a/sound/core/init.c b/sound/core/init.c
index 3058d626a90a..6152a7554dfd 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -361,6 +361,8 @@ static int snd_card_do_free(struct snd_card *card)
361 snd_printk(KERN_WARNING "unable to free card info\n"); 361 snd_printk(KERN_WARNING "unable to free card info\n");
362 /* Not fatal error */ 362 /* Not fatal error */
363 } 363 }
364 if (card->dev)
365 device_unregister(card->dev);
364 kfree(card); 366 kfree(card);
365 return 0; 367 return 0;
366} 368}
@@ -495,6 +497,12 @@ int snd_card_register(struct snd_card *card)
495 int err; 497 int err;
496 498
497 snd_assert(card != NULL, return -EINVAL); 499 snd_assert(card != NULL, return -EINVAL);
500 if (!card->dev) {
501 card->dev = device_create(sound_class, card->parent, 0,
502 "card%i", card->number);
503 if (IS_ERR(card->dev))
504 card->dev = NULL;
505 }
498 if ((err = snd_device_register_all(card)) < 0) 506 if ((err = snd_device_register_all(card)) < 0)
499 return err; 507 return err;
500 mutex_lock(&snd_card_mutex); 508 mutex_lock(&snd_card_mutex);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 505b23ec4058..e0821eb3d851 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file)
2359 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; 2359 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2360 snd_assert(substream != NULL, return -ENXIO); 2360 snd_assert(substream != NULL, return -ENXIO);
2361 pcm = substream->pcm; 2361 pcm = substream->pcm;
2362 snd_pcm_oss_sync(pcm_oss_file); 2362 if (!pcm->card->shutdown)
2363 snd_pcm_oss_sync(pcm_oss_file);
2363 mutex_lock(&pcm->open_mutex); 2364 mutex_lock(&pcm->open_mutex);
2364 snd_pcm_oss_release_file(pcm_oss_file); 2365 snd_pcm_oss_release_file(pcm_oss_file);
2365 mutex_unlock(&pcm->open_mutex); 2366 mutex_unlock(&pcm->open_mutex);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index fbbbcd20c4cc..5ac6e19ccb41 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -910,7 +910,8 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
910 substream->pstr->substream_opened--; 910 substream->pstr->substream_opened--;
911} 911}
912 912
913static ssize_t show_pcm_class(struct class_device *class_device, char *buf) 913static ssize_t show_pcm_class(struct device *dev,
914 struct device_attribute *attr, char *buf)
914{ 915{
915 struct snd_pcm *pcm; 916 struct snd_pcm *pcm;
916 const char *str; 917 const char *str;
@@ -921,7 +922,7 @@ static ssize_t show_pcm_class(struct class_device *class_device, char *buf)
921 [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer", 922 [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer",
922 }; 923 };
923 924
924 if (! (pcm = class_get_devdata(class_device)) || 925 if (! (pcm = dev_get_drvdata(dev)) ||
925 pcm->dev_class > SNDRV_PCM_CLASS_LAST) 926 pcm->dev_class > SNDRV_PCM_CLASS_LAST)
926 str = "none"; 927 str = "none";
927 else 928 else
@@ -929,7 +930,7 @@ static ssize_t show_pcm_class(struct class_device *class_device, char *buf)
929 return snprintf(buf, PAGE_SIZE, "%s\n", str); 930 return snprintf(buf, PAGE_SIZE, "%s\n", str);
930} 931}
931 932
932static struct class_device_attribute pcm_attrs = 933static struct device_attribute pcm_attrs =
933 __ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL); 934 __ATTR(pcm_class, S_IRUGO, show_pcm_class, NULL);
934 935
935static int snd_pcm_dev_register(struct snd_device *device) 936static int snd_pcm_dev_register(struct snd_device *device)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 37b4b10850ae..66e24b5da469 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1310,7 +1310,8 @@ static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream,
1310 int f_flags) 1310 int f_flags)
1311{ 1311{
1312 struct snd_pcm_runtime *runtime = substream->runtime; 1312 struct snd_pcm_runtime *runtime = substream->runtime;
1313 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 1313 if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
1314 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
1314 return -EBADFD; 1315 return -EBADFD;
1315 if (snd_pcm_running(substream)) 1316 if (snd_pcm_running(substream))
1316 return -EBUSY; 1317 return -EBUSY;
@@ -1568,7 +1569,8 @@ static int snd_pcm_drop(struct snd_pcm_substream *substream)
1568 runtime = substream->runtime; 1569 runtime = substream->runtime;
1569 card = substream->pcm->card; 1570 card = substream->pcm->card;
1570 1571
1571 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 1572 if (runtime->status->state == SNDRV_PCM_STATE_OPEN ||
1573 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED)
1572 return -EBADFD; 1574 return -EBADFD;
1573 1575
1574 snd_power_lock(card); 1576 snd_power_lock(card);
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c
index 412dd62b654e..9f7b32e1ccde 100644
--- a/sound/core/rtctimer.c
+++ b/sound/core/rtctimer.c
@@ -22,13 +22,10 @@
22 22
23#include <sound/driver.h> 23#include <sound/driver.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/time.h>
26#include <linux/threads.h>
27#include <linux/interrupt.h> 25#include <linux/interrupt.h>
28#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
29#include <sound/core.h> 27#include <sound/core.h>
30#include <sound/timer.h> 28#include <sound/timer.h>
31#include <sound/info.h>
32 29
33#if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE) 30#if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE)
34 31
@@ -50,7 +47,9 @@ static int rtctimer_stop(struct snd_timer *t);
50 * The hardware dependent description for this timer. 47 * The hardware dependent description for this timer.
51 */ 48 */
52static struct snd_timer_hardware rtc_hw = { 49static struct snd_timer_hardware rtc_hw = {
53 .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, 50 .flags = SNDRV_TIMER_HW_AUTO |
51 SNDRV_TIMER_HW_FIRST |
52 SNDRV_TIMER_HW_TASKLET,
54 .ticks = 100000000L, /* FIXME: XXX */ 53 .ticks = 100000000L, /* FIXME: XXX */
55 .open = rtctimer_open, 54 .open = rtctimer_open,
56 .close = rtctimer_close, 55 .close = rtctimer_close,
@@ -60,6 +59,7 @@ static struct snd_timer_hardware rtc_hw = {
60 59
61static int rtctimer_freq = RTC_FREQ; /* frequency */ 60static int rtctimer_freq = RTC_FREQ; /* frequency */
62static struct snd_timer *rtctimer; 61static struct snd_timer *rtctimer;
62static struct tasklet_struct rtc_tasklet;
63static rtc_task_t rtc_task; 63static rtc_task_t rtc_task;
64 64
65 65
@@ -81,6 +81,7 @@ rtctimer_close(struct snd_timer *t)
81 rtc_task_t *rtc = t->private_data; 81 rtc_task_t *rtc = t->private_data;
82 if (rtc) { 82 if (rtc) {
83 rtc_unregister(rtc); 83 rtc_unregister(rtc);
84 tasklet_kill(&rtc_tasklet);
84 t->private_data = NULL; 85 t->private_data = NULL;
85 } 86 }
86 return 0; 87 return 0;
@@ -105,12 +106,17 @@ rtctimer_stop(struct snd_timer *timer)
105 return 0; 106 return 0;
106} 107}
107 108
109static void rtctimer_tasklet(unsigned long data)
110{
111 snd_timer_interrupt((struct snd_timer *)data, 1);
112}
113
108/* 114/*
109 * interrupt 115 * interrupt
110 */ 116 */
111static void rtctimer_interrupt(void *private_data) 117static void rtctimer_interrupt(void *private_data)
112{ 118{
113 snd_timer_interrupt(private_data, 1); 119 tasklet_hi_schedule(private_data);
114} 120}
115 121
116 122
@@ -139,9 +145,11 @@ static int __init rtctimer_init(void)
139 timer->hw = rtc_hw; 145 timer->hw = rtc_hw;
140 timer->hw.resolution = NANO_SEC / rtctimer_freq; 146 timer->hw.resolution = NANO_SEC / rtctimer_freq;
141 147
148 tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer);
149
142 /* set up RTC callback */ 150 /* set up RTC callback */
143 rtc_task.func = rtctimer_interrupt; 151 rtc_task.func = rtctimer_interrupt;
144 rtc_task.private_data = timer; 152 rtc_task.private_data = &rtc_tasklet;
145 153
146 err = snd_timer_global_register(timer); 154 err = snd_timer_global_register(timer);
147 if (err < 0) { 155 if (err < 0) {
diff --git a/sound/core/sound.c b/sound/core/sound.c
index efa476c5210a..282742022de6 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -61,9 +61,6 @@ EXPORT_SYMBOL(snd_ecards_limit);
61static struct snd_minor *snd_minors[SNDRV_OS_MINORS]; 61static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
62static DEFINE_MUTEX(sound_mutex); 62static DEFINE_MUTEX(sound_mutex);
63 63
64extern struct class *sound_class;
65
66
67#ifdef CONFIG_KMOD 64#ifdef CONFIG_KMOD
68 65
69/** 66/**
@@ -268,11 +265,10 @@ int snd_register_device(int type, struct snd_card *card, int dev,
268 snd_minors[minor] = preg; 265 snd_minors[minor] = preg;
269 if (card) 266 if (card)
270 device = card->dev; 267 device = card->dev;
271 preg->class_dev = class_device_create(sound_class, NULL, 268 preg->dev = device_create(sound_class, device, MKDEV(major, minor),
272 MKDEV(major, minor), 269 "%s", name);
273 device, "%s", name); 270 if (preg->dev)
274 if (preg->class_dev) 271 dev_set_drvdata(preg->dev, private_data);
275 class_set_devdata(preg->class_dev, private_data);
276 272
277 mutex_unlock(&sound_mutex); 273 mutex_unlock(&sound_mutex);
278 return 0; 274 return 0;
@@ -320,7 +316,7 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
320 return -EINVAL; 316 return -EINVAL;
321 } 317 }
322 318
323 class_device_destroy(sound_class, MKDEV(major, minor)); 319 device_destroy(sound_class, MKDEV(major, minor));
324 320
325 kfree(snd_minors[minor]); 321 kfree(snd_minors[minor]);
326 snd_minors[minor] = NULL; 322 snd_minors[minor] = NULL;
@@ -331,15 +327,15 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
331EXPORT_SYMBOL(snd_unregister_device); 327EXPORT_SYMBOL(snd_unregister_device);
332 328
333int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, 329int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
334 const struct class_device_attribute *attr) 330 struct device_attribute *attr)
335{ 331{
336 int minor, ret = -EINVAL; 332 int minor, ret = -EINVAL;
337 struct class_device *cdev; 333 struct device *d;
338 334
339 mutex_lock(&sound_mutex); 335 mutex_lock(&sound_mutex);
340 minor = find_snd_minor(type, card, dev); 336 minor = find_snd_minor(type, card, dev);
341 if (minor >= 0 && (cdev = snd_minors[minor]->class_dev) != NULL) 337 if (minor >= 0 && (d = snd_minors[minor]->dev) != NULL)
342 ret = class_device_create_file(cdev, attr); 338 ret = device_create_file(d, attr);
343 mutex_unlock(&sound_mutex); 339 mutex_unlock(&sound_mutex);
344 return ret; 340 return ret;
345 341
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
index 6e3c41f530e6..b1c5d8286e40 100644
--- a/sound/oss/cs46xx.c
+++ b/sound/oss/cs46xx.c
@@ -779,7 +779,7 @@ static unsigned int cs_set_adc_rate(struct cs_state *state, unsigned int rate)
779 rate = 48000 / 9; 779 rate = 48000 / 9;
780 780
781 /* 781 /*
782 * We can not capture at at rate greater than the Input Rate (48000). 782 * We cannot capture at at rate greater than the Input Rate (48000).
783 * Return an error if an attempt is made to stray outside that limit. 783 * Return an error if an attempt is made to stray outside that limit.
784 */ 784 */
785 if (rate > 48000) 785 if (rate > 48000)
@@ -4754,8 +4754,8 @@ static int cs_hardware_init(struct cs_card *card)
4754 mdelay(5 * cs_laptop_wait); /* Shouldnt be needed ?? */ 4754 mdelay(5 * cs_laptop_wait); /* Shouldnt be needed ?? */
4755 4755
4756/* 4756/*
4757* If we are resuming under 2.2.x then we can not schedule a timeout. 4757* If we are resuming under 2.2.x then we cannot schedule a timeout,
4758* so, just spin the CPU. 4758* so just spin the CPU.
4759*/ 4759*/
4760 if (card->pm.flags & CS46XX_PM_IDLE) { 4760 if (card->pm.flags & CS46XX_PM_IDLE) {
4761 /* 4761 /*
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index 2344d09c7114..75c5e745705f 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -557,17 +557,17 @@ static int __init oss_init(void)
557 sound_dmap_flag = (dmabuf > 0 ? 1 : 0); 557 sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
558 558
559 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { 559 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
560 class_device_create(sound_class, NULL, 560 device_create(sound_class, NULL,
561 MKDEV(SOUND_MAJOR, dev_list[i].minor), 561 MKDEV(SOUND_MAJOR, dev_list[i].minor),
562 NULL, "%s", dev_list[i].name); 562 "%s", dev_list[i].name);
563 563
564 if (!dev_list[i].num) 564 if (!dev_list[i].num)
565 continue; 565 continue;
566 566
567 for (j = 1; j < *dev_list[i].num; j++) 567 for (j = 1; j < *dev_list[i].num; j++)
568 class_device_create(sound_class, NULL, 568 device_create(sound_class, NULL,
569 MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), 569 MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)),
570 NULL, "%s%d", dev_list[i].name, j); 570 "%s%d", dev_list[i].name, j);
571 } 571 }
572 572
573 if (sound_nblocks >= 1024) 573 if (sound_nblocks >= 1024)
@@ -581,11 +581,11 @@ static void __exit oss_cleanup(void)
581 int i, j; 581 int i, j;
582 582
583 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { 583 for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) {
584 class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); 584 device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
585 if (!dev_list[i].num) 585 if (!dev_list[i].num)
586 continue; 586 continue;
587 for (j = 1; j < *dev_list[i].num; j++) 587 for (j = 1; j < *dev_list[i].num; j++)
588 class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10))); 588 device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
589 } 589 }
590 590
591 unregister_sound_special(1); 591 unregister_sound_special(1);
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 8058059c56e9..8bc4ffa6220d 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -956,6 +956,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
956 .ca0151_chip = 1, 956 .ca0151_chip = 1,
957 .spk71 = 1, 957 .spk71 = 1,
958 .spdif_bug = 1, 958 .spdif_bug = 1,
959 .adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */
959 .ac97_chip = 1} , 960 .ac97_chip = 1} ,
960 {.vendor = 0x1102, .device = 0x0004, .revision = 0x04, 961 {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
961 .driver = "Audigy2", .name = "Audigy 2 [Unknown]", 962 .driver = "Audigy2", .name = "Audigy 2 [Unknown]",
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0d728c6f697c..fb961448db19 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5870,7 +5870,7 @@ static struct hda_board_config alc262_cfg_tbl[] = {
5870 { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, 5870 { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397,
5871 .config = ALC262_FUJITSU }, 5871 .config = ALC262_FUJITSU },
5872 { .modelname = "hp-bpc", .config = ALC262_HP_BPC }, 5872 { .modelname = "hp-bpc", .config = ALC262_HP_BPC },
5873 { .pci_subvendor = 0x103c, .pci_subdevice = 0x208c, 5873 { .pci_subvendor = 0x103c, .pci_subdevice = 0x280c,
5874 .config = ALC262_HP_BPC }, /* xw4400 */ 5874 .config = ALC262_HP_BPC }, /* xw4400 */
5875 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, 5875 { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014,
5876 .config = ALC262_HP_BPC }, /* xw6400 */ 5876 .config = ALC262_HP_BPC }, /* xw6400 */
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 731b7b97ee71..fe51ef3e49d2 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -336,6 +336,13 @@ static struct hda_board_config stac9200_cfg_tbl[] = {
336 .pci_subvendor = PCI_VENDOR_ID_INTEL, 336 .pci_subvendor = PCI_VENDOR_ID_INTEL,
337 .pci_subdevice = 0x2668, /* DFI LanParty */ 337 .pci_subdevice = 0x2668, /* DFI LanParty */
338 .config = STAC_REF }, 338 .config = STAC_REF },
339 /* Dell laptops have BIOS problem */
340 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5,
341 .config = STAC_REF }, /* Dell Inspiron 630m */
342 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2,
343 .config = STAC_REF }, /* Dell Latitude D620 */
344 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb,
345 .config = STAC_REF }, /* Dell Latitude 120L */
339 {} /* terminator */ 346 {} /* terminator */
340}; 347};
341 348
@@ -591,13 +598,6 @@ static struct hda_board_config stac9205_cfg_tbl[] = {
591 .pci_subvendor = PCI_VENDOR_ID_INTEL, 598 .pci_subvendor = PCI_VENDOR_ID_INTEL,
592 .pci_subdevice = 0x2668, /* DFI LanParty */ 599 .pci_subdevice = 0x2668, /* DFI LanParty */
593 .config = STAC_REF }, /* SigmaTel reference board */ 600 .config = STAC_REF }, /* SigmaTel reference board */
594 /* Dell laptops have BIOS problem */
595 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5,
596 .config = STAC_REF }, /* Dell Inspiron 630m */
597 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2,
598 .config = STAC_REF }, /* Dell Latitude D620 */
599 { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb,
600 .config = STAC_REF }, /* Dell Latitude 120L */
601 {} /* terminator */ 601 {} /* terminator */
602}; 602};
603 603
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 5322c50c9617..8f1ced4ab34c 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -170,8 +170,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati
170 else 170 else
171 sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); 171 sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);
172 172
173 class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, s->unit_minor), 173 device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
174 dev, s->name+6); 174 s->name+6);
175 return r; 175 return r;
176 176
177 fail: 177 fail:
@@ -193,7 +193,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit)
193 p = __sound_remove_unit(list, unit); 193 p = __sound_remove_unit(list, unit);
194 spin_unlock(&sound_loader_lock); 194 spin_unlock(&sound_loader_lock);
195 if (p) { 195 if (p) {
196 class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); 196 device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor));
197 kfree(p); 197 kfree(p);
198 } 198 }
199} 199}
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c82b01c7ad3a..67202b9eeb77 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -1469,7 +1469,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream)
1469 subs->cur_audiofmt = NULL; 1469 subs->cur_audiofmt = NULL;
1470 subs->cur_rate = 0; 1470 subs->cur_rate = 0;
1471 subs->period_bytes = 0; 1471 subs->period_bytes = 0;
1472 release_substream_urbs(subs, 0); 1472 if (!subs->stream->chip->shutdown)
1473 release_substream_urbs(subs, 0);
1473 return snd_pcm_free_vmalloc_buffer(substream); 1474 return snd_pcm_free_vmalloc_buffer(substream);
1474} 1475}
1475 1476
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index b7c5e59b2299..24f5a26c5f0c 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -981,7 +981,7 @@ void snd_usbmidi_disconnect(struct list_head* p)
981 if (umidi->usb_protocol_ops->finish_out_endpoint) 981 if (umidi->usb_protocol_ops->finish_out_endpoint)
982 umidi->usb_protocol_ops->finish_out_endpoint(ep->out); 982 umidi->usb_protocol_ops->finish_out_endpoint(ep->out);
983 } 983 }
984 if (ep->in && ep->in->urb) 984 if (ep->in)
985 usb_kill_urb(ep->in->urb); 985 usb_kill_urb(ep->in->urb);
986 } 986 }
987} 987}
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 1024c178f5c0..e74eb1bc8d87 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -1620,8 +1620,7 @@ static void snd_usb_mixer_free(struct usb_mixer_interface *mixer)
1620 kfree(mixer->urb->transfer_buffer); 1620 kfree(mixer->urb->transfer_buffer);
1621 usb_free_urb(mixer->urb); 1621 usb_free_urb(mixer->urb);
1622 } 1622 }
1623 if (mixer->rc_urb) 1623 usb_free_urb(mixer->rc_urb);
1624 usb_free_urb(mixer->rc_urb);
1625 kfree(mixer->rc_setup_packet); 1624 kfree(mixer->rc_setup_packet);
1626 kfree(mixer); 1625 kfree(mixer);
1627} 1626}
@@ -2056,8 +2055,6 @@ void snd_usb_mixer_disconnect(struct list_head *p)
2056 struct usb_mixer_interface *mixer; 2055 struct usb_mixer_interface *mixer;
2057 2056
2058 mixer = list_entry(p, struct usb_mixer_interface, list); 2057 mixer = list_entry(p, struct usb_mixer_interface, list);
2059 if (mixer->urb) 2058 usb_kill_urb(mixer->urb);
2060 usb_kill_urb(mixer->urb); 2059 usb_kill_urb(mixer->rc_urb);
2061 if (mixer->rc_urb)
2062 usb_kill_urb(mixer->rc_urb);
2063} 2060}