diff options
-rw-r--r-- | include/sound/core.h | 10 | ||||
-rw-r--r-- | sound/isa/Kconfig | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 27 |
6 files changed, 35 insertions, 9 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 35424a971b7a..1508c4ec1ba9 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -385,9 +385,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
385 | 385 | ||
386 | #else /* !CONFIG_SND_DEBUG */ | 386 | #else /* !CONFIG_SND_DEBUG */ |
387 | 387 | ||
388 | #define snd_printd(fmt, args...) /* nothing */ | 388 | #define snd_printd(fmt, args...) do { } while (0) |
389 | #define snd_BUG() /* nothing */ | 389 | #define snd_BUG() do { } while (0) |
390 | #define snd_BUG_ON(cond) ({/*(void)(cond);*/ 0;}) /* always false */ | 390 | static inline int __snd_bug_on(void) |
391 | { | ||
392 | return 0; | ||
393 | } | ||
394 | #define snd_BUG_ON(cond) __snd_bug_on() /* always false */ | ||
391 | 395 | ||
392 | #endif /* CONFIG_SND_DEBUG */ | 396 | #endif /* CONFIG_SND_DEBUG */ |
393 | 397 | ||
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index 660beb41f767..ce0aa044e274 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig | |||
@@ -211,7 +211,7 @@ config SND_GUSCLASSIC | |||
211 | 211 | ||
212 | config SND_GUSEXTREME | 212 | config SND_GUSEXTREME |
213 | tristate "Gravis UltraSound Extreme" | 213 | tristate "Gravis UltraSound Extreme" |
214 | select SND_HWDEP | 214 | select SND_OPL3_LIB |
215 | select SND_MPU401_UART | 215 | select SND_MPU401_UART |
216 | select SND_PCM | 216 | select SND_PCM |
217 | help | 217 | help |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 743d77922bce..c39af986bff1 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -483,6 +483,8 @@ static void print_gpio(struct snd_info_buffer *buffer, | |||
483 | (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0, | 483 | (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0, |
484 | (gpio & AC_GPIO_WAKE) ? 1 : 0); | 484 | (gpio & AC_GPIO_WAKE) ? 1 : 0); |
485 | max = gpio & AC_GPIO_IO_COUNT; | 485 | max = gpio & AC_GPIO_IO_COUNT; |
486 | if (!max || max > 8) | ||
487 | return; | ||
486 | enable = snd_hda_codec_read(codec, nid, 0, | 488 | enable = snd_hda_codec_read(codec, nid, 0, |
487 | AC_VERB_GET_GPIO_MASK, 0); | 489 | AC_VERB_GET_GPIO_MASK, 0); |
488 | direction = snd_hda_codec_read(codec, nid, 0, | 490 | direction = snd_hda_codec_read(codec, nid, 0, |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index d3fd432cb3ea..686c77491dea 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3861,6 +3861,8 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | 3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), |
3864 | SND_PCI_QUIRK(0x103c, 0x30e7, "HP EliteBook 8530p", AD1884A_LAPTOP), | ||
3865 | SND_PCI_QUIRK(0x103c, 0x3614, "HP 6730s", AD1884A_LAPTOP), | ||
3864 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 3866 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
3865 | {} | 3867 | {} |
3866 | }; | 3868 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a4666c96a44f..a378c0145125 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -8469,6 +8469,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8469 | SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), | 8469 | SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), |
8470 | SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY), | 8470 | SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY), |
8471 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), | 8471 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), |
8472 | SND_PCI_QUIRK(0x17c0, 0x4085, "MEDION MD96630", ALC888_LENOVO_MS7195_DIG), | ||
8472 | SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), | 8473 | SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), |
8473 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), | 8474 | SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), |
8474 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), | 8475 | SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index d723543beadd..736246f98acc 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -4548,11 +4548,20 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne | |||
4548 | { | 4548 | { |
4549 | struct hdsp *hdsp = (struct hdsp *)hw->private_data; | 4549 | struct hdsp *hdsp = (struct hdsp *)hw->private_data; |
4550 | void __user *argp = (void __user *)arg; | 4550 | void __user *argp = (void __user *)arg; |
4551 | int err; | ||
4551 | 4552 | ||
4552 | switch (cmd) { | 4553 | switch (cmd) { |
4553 | case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: { | 4554 | case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: { |
4554 | struct hdsp_peak_rms __user *peak_rms = (struct hdsp_peak_rms __user *)arg; | 4555 | struct hdsp_peak_rms __user *peak_rms = (struct hdsp_peak_rms __user *)arg; |
4555 | 4556 | ||
4557 | err = hdsp_check_for_iobox(hdsp); | ||
4558 | if (err < 0) | ||
4559 | return err; | ||
4560 | |||
4561 | err = hdsp_check_for_firmware(hdsp, 1); | ||
4562 | if (err < 0) | ||
4563 | return err; | ||
4564 | |||
4556 | if (!(hdsp->state & HDSP_FirmwareLoaded)) { | 4565 | if (!(hdsp->state & HDSP_FirmwareLoaded)) { |
4557 | snd_printk(KERN_ERR "Hammerfall-DSP: firmware needs to be uploaded to the card.\n"); | 4566 | snd_printk(KERN_ERR "Hammerfall-DSP: firmware needs to be uploaded to the card.\n"); |
4558 | return -EINVAL; | 4567 | return -EINVAL; |
@@ -4572,10 +4581,14 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne | |||
4572 | unsigned long flags; | 4581 | unsigned long flags; |
4573 | int i; | 4582 | int i; |
4574 | 4583 | ||
4575 | if (!(hdsp->state & HDSP_FirmwareLoaded)) { | 4584 | err = hdsp_check_for_iobox(hdsp); |
4576 | snd_printk(KERN_ERR "Hammerfall-DSP: Firmware needs to be uploaded to the card.\n"); | 4585 | if (err < 0) |
4577 | return -EINVAL; | 4586 | return err; |
4578 | } | 4587 | |
4588 | err = hdsp_check_for_firmware(hdsp, 1); | ||
4589 | if (err < 0) | ||
4590 | return err; | ||
4591 | |||
4579 | spin_lock_irqsave(&hdsp->lock, flags); | 4592 | spin_lock_irqsave(&hdsp->lock, flags); |
4580 | info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp); | 4593 | info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp); |
4581 | info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp); | 4594 | info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp); |
@@ -5045,6 +5058,10 @@ static int __devinit snd_hdsp_create(struct snd_card *card, | |||
5045 | /* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */ | 5058 | /* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */ |
5046 | ssleep(2); | 5059 | ssleep(2); |
5047 | 5060 | ||
5061 | err = hdsp_check_for_iobox(hdsp); | ||
5062 | if (err < 0) | ||
5063 | return err; | ||
5064 | |||
5048 | if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { | 5065 | if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { |
5049 | #ifdef HDSP_FW_LOADER | 5066 | #ifdef HDSP_FW_LOADER |
5050 | if ((err = hdsp_request_fw_loader(hdsp)) < 0) | 5067 | if ((err = hdsp_request_fw_loader(hdsp)) < 0) |
@@ -5057,7 +5074,7 @@ static int __devinit snd_hdsp_create(struct snd_card *card, | |||
5057 | /* init is complete, we return */ | 5074 | /* init is complete, we return */ |
5058 | return 0; | 5075 | return 0; |
5059 | #endif | 5076 | #endif |
5060 | /* no iobox connected, we defer initialization */ | 5077 | /* we defer initialization */ |
5061 | snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n"); | 5078 | snd_printk(KERN_INFO "Hammerfall-DSP: card initialization pending : waiting for firmware\n"); |
5062 | if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) | 5079 | if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) |
5063 | return err; | 5080 | return err; |