diff options
Diffstat (limited to 'sound')
62 files changed, 615 insertions, 383 deletions
diff --git a/sound/aoa/core/gpio-pmf.c b/sound/aoa/core/gpio-pmf.c index 5ca2220eac7d..1dd0c28d1fb7 100644 --- a/sound/aoa/core/gpio-pmf.c +++ b/sound/aoa/core/gpio-pmf.c | |||
@@ -182,6 +182,10 @@ static int pmf_set_notify(struct gpio_runtime *rt, | |||
182 | if (!old && notify) { | 182 | if (!old && notify) { |
183 | irq_client = kzalloc(sizeof(struct pmf_irq_client), | 183 | irq_client = kzalloc(sizeof(struct pmf_irq_client), |
184 | GFP_KERNEL); | 184 | GFP_KERNEL); |
185 | if (!irq_client) { | ||
186 | err = -ENOMEM; | ||
187 | goto out_unlock; | ||
188 | } | ||
185 | irq_client->data = notif; | 189 | irq_client->data = notif; |
186 | irq_client->handler = pmf_handle_notify_irq; | 190 | irq_client->handler = pmf_handle_notify_irq; |
187 | irq_client->owner = THIS_MODULE; | 191 | irq_client->owner = THIS_MODULE; |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 333e4dd29450..72cfd47af6b8 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -233,6 +233,18 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
233 | xrun(substream); | 233 | xrun(substream); |
234 | return -EPIPE; | 234 | return -EPIPE; |
235 | } | 235 | } |
236 | if (xrun_debug(substream, 8)) { | ||
237 | char name[16]; | ||
238 | pcm_debug_name(substream, name, sizeof(name)); | ||
239 | snd_printd("period_update: %s: pos=0x%x/0x%x/0x%x, " | ||
240 | "hwptr=0x%lx, hw_base=0x%lx, hw_intr=0x%lx\n", | ||
241 | name, (unsigned int)pos, | ||
242 | (unsigned int)runtime->period_size, | ||
243 | (unsigned int)runtime->buffer_size, | ||
244 | (unsigned long)old_hw_ptr, | ||
245 | (unsigned long)runtime->hw_ptr_base, | ||
246 | (unsigned long)runtime->hw_ptr_interrupt); | ||
247 | } | ||
236 | hw_base = runtime->hw_ptr_base; | 248 | hw_base = runtime->hw_ptr_base; |
237 | new_hw_ptr = hw_base + pos; | 249 | new_hw_ptr = hw_base + pos; |
238 | hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size; | 250 | hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size; |
@@ -244,18 +256,27 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) | |||
244 | delta = new_hw_ptr - hw_ptr_interrupt; | 256 | delta = new_hw_ptr - hw_ptr_interrupt; |
245 | } | 257 | } |
246 | if (delta < 0) { | 258 | if (delta < 0) { |
247 | delta += runtime->buffer_size; | 259 | if (runtime->periods == 1 || new_hw_ptr < old_hw_ptr) |
260 | delta += runtime->buffer_size; | ||
248 | if (delta < 0) { | 261 | if (delta < 0) { |
249 | hw_ptr_error(substream, | 262 | hw_ptr_error(substream, |
250 | "Unexpected hw_pointer value " | 263 | "Unexpected hw_pointer value " |
251 | "(stream=%i, pos=%ld, intr_ptr=%ld)\n", | 264 | "(stream=%i, pos=%ld, intr_ptr=%ld)\n", |
252 | substream->stream, (long)pos, | 265 | substream->stream, (long)pos, |
253 | (long)hw_ptr_interrupt); | 266 | (long)hw_ptr_interrupt); |
267 | #if 1 | ||
268 | /* simply skipping the hwptr update seems more | ||
269 | * robust in some cases, e.g. on VMware with | ||
270 | * inaccurate timer source | ||
271 | */ | ||
272 | return 0; /* skip this update */ | ||
273 | #else | ||
254 | /* rebase to interrupt position */ | 274 | /* rebase to interrupt position */ |
255 | hw_base = new_hw_ptr = hw_ptr_interrupt; | 275 | hw_base = new_hw_ptr = hw_ptr_interrupt; |
256 | /* align hw_base to buffer_size */ | 276 | /* align hw_base to buffer_size */ |
257 | hw_base -= hw_base % runtime->buffer_size; | 277 | hw_base -= hw_base % runtime->buffer_size; |
258 | delta = 0; | 278 | delta = 0; |
279 | #endif | ||
259 | } else { | 280 | } else { |
260 | hw_base += runtime->buffer_size; | 281 | hw_base += runtime->buffer_size; |
261 | if (hw_base >= runtime->boundary) | 282 | if (hw_base >= runtime->boundary) |
@@ -344,6 +365,19 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream) | |||
344 | xrun(substream); | 365 | xrun(substream); |
345 | return -EPIPE; | 366 | return -EPIPE; |
346 | } | 367 | } |
368 | if (xrun_debug(substream, 16)) { | ||
369 | char name[16]; | ||
370 | pcm_debug_name(substream, name, sizeof(name)); | ||
371 | snd_printd("hw_update: %s: pos=0x%x/0x%x/0x%x, " | ||
372 | "hwptr=0x%lx, hw_base=0x%lx, hw_intr=0x%lx\n", | ||
373 | name, (unsigned int)pos, | ||
374 | (unsigned int)runtime->period_size, | ||
375 | (unsigned int)runtime->buffer_size, | ||
376 | (unsigned long)old_hw_ptr, | ||
377 | (unsigned long)runtime->hw_ptr_base, | ||
378 | (unsigned long)runtime->hw_ptr_interrupt); | ||
379 | } | ||
380 | |||
347 | hw_base = runtime->hw_ptr_base; | 381 | hw_base = runtime->hw_ptr_base; |
348 | new_hw_ptr = hw_base + pos; | 382 | new_hw_ptr = hw_base + pos; |
349 | 383 | ||
diff --git a/sound/core/seq/Makefile b/sound/core/seq/Makefile index 1bcb360330e5..941f64a853eb 100644 --- a/sound/core/seq/Makefile +++ b/sound/core/seq/Makefile | |||
@@ -3,10 +3,6 @@ | |||
3 | # Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz> | 3 | # Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz> |
4 | # | 4 | # |
5 | 5 | ||
6 | ifeq ($(CONFIG_SND_SEQUENCER_OSS),y) | ||
7 | obj-$(CONFIG_SND_SEQUENCER) += oss/ | ||
8 | endif | ||
9 | |||
10 | snd-seq-device-objs := seq_device.o | 6 | snd-seq-device-objs := seq_device.o |
11 | snd-seq-objs := seq.o seq_lock.o seq_clientmgr.o seq_memory.o seq_queue.o \ | 7 | snd-seq-objs := seq.o seq_lock.o seq_clientmgr.o seq_memory.o seq_queue.o \ |
12 | seq_fifo.o seq_prioq.o seq_timer.o \ | 8 | seq_fifo.o seq_prioq.o seq_timer.o \ |
@@ -19,7 +15,8 @@ snd-seq-virmidi-objs := seq_virmidi.o | |||
19 | 15 | ||
20 | obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o | 16 | obj-$(CONFIG_SND_SEQUENCER) += snd-seq.o snd-seq-device.o |
21 | ifeq ($(CONFIG_SND_SEQUENCER_OSS),y) | 17 | ifeq ($(CONFIG_SND_SEQUENCER_OSS),y) |
22 | obj-$(CONFIG_SND_SEQUENCER) += snd-seq-midi-event.o | 18 | obj-$(CONFIG_SND_SEQUENCER) += snd-seq-midi-event.o |
19 | obj-$(CONFIG_SND_SEQUENCER) += oss/ | ||
23 | endif | 20 | endif |
24 | obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o | 21 | obj-$(CONFIG_SND_SEQ_DUMMY) += snd-seq-dummy.o |
25 | 22 | ||
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index de83608719ea..3ee0269e5bd0 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -338,7 +338,7 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard, | |||
338 | return -EBUSY; | 338 | return -EBUSY; |
339 | 339 | ||
340 | acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL); | 340 | acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL); |
341 | if (acard->play == NULL) | 341 | if (acard->mpu == NULL) |
342 | return -EBUSY; | 342 | return -EBUSY; |
343 | 343 | ||
344 | pdev = acard->cap; | 344 | pdev = acard->cap; |
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index edb11eefdfe3..2dcf45bf7293 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -795,13 +795,13 @@ static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ | |||
795 | if (!(pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE)) | 795 | if (!(pcmp->flags & SNDRV_GF1_PCM_PFLG_ACTIVE)) |
796 | continue; | 796 | continue; |
797 | /* load real volume - better precision */ | 797 | /* load real volume - better precision */ |
798 | spin_lock_irqsave(&gus->reg_lock, flags); | 798 | spin_lock(&gus->reg_lock); |
799 | snd_gf1_select_voice(gus, pvoice->number); | 799 | snd_gf1_select_voice(gus, pvoice->number); |
800 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); | 800 | snd_gf1_ctrl_stop(gus, SNDRV_GF1_VB_VOLUME_CONTROL); |
801 | vol = pvoice == pcmp->pvoices[0] ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; | 801 | vol = pvoice == pcmp->pvoices[0] ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; |
802 | snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, vol); | 802 | snd_gf1_write16(gus, SNDRV_GF1_VW_VOLUME, vol); |
803 | pcmp->final_volume = 1; | 803 | pcmp->final_volume = 1; |
804 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 804 | spin_unlock(&gus->reg_lock); |
805 | } | 805 | } |
806 | spin_unlock_irqrestore(&gus->voice_alloc, flags); | 806 | spin_unlock_irqrestore(&gus->voice_alloc, flags); |
807 | return change; | 807 | return change; |
diff --git a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c index 3ee9900ffd7b..35b5912cf3f8 100644 --- a/sound/oss/aedsp16.c +++ b/sound/oss/aedsp16.c | |||
@@ -325,8 +325,9 @@ | |||
325 | /* | 325 | /* |
326 | * Size of character arrays that store name and version of sound card | 326 | * Size of character arrays that store name and version of sound card |
327 | */ | 327 | */ |
328 | #define CARDNAMELEN 15 /* Size of the card's name in chars */ | 328 | #define CARDNAMELEN 15 /* Size of the card's name in chars */ |
329 | #define CARDVERLEN 2 /* Size of the card's version in chars */ | 329 | #define CARDVERLEN 10 /* Size of the card's version in chars */ |
330 | #define CARDVERDIGITS 2 /* Number of digits in the version */ | ||
330 | 331 | ||
331 | #if defined(CONFIG_SC6600) | 332 | #if defined(CONFIG_SC6600) |
332 | /* | 333 | /* |
@@ -410,7 +411,7 @@ | |||
410 | 411 | ||
411 | static int soft_cfg __initdata = 0; /* bitmapped config */ | 412 | static int soft_cfg __initdata = 0; /* bitmapped config */ |
412 | static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */ | 413 | static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */ |
413 | static int ver[CARDVERLEN] __initdata = {0, 0}; /* DSP Ver: | 414 | static int ver[CARDVERDIGITS] __initdata = {0, 0}; /* DSP Ver: |
414 | hi->ver[0] lo->ver[1] */ | 415 | hi->ver[0] lo->ver[1] */ |
415 | 416 | ||
416 | #if defined(CONFIG_SC6600) | 417 | #if defined(CONFIG_SC6600) |
@@ -957,7 +958,7 @@ static int __init aedsp16_dsp_version(int port) | |||
957 | * string is finished. | 958 | * string is finished. |
958 | */ | 959 | */ |
959 | ver[len++] = ret; | 960 | ver[len++] = ret; |
960 | } while (len < CARDVERLEN); | 961 | } while (len < CARDVERDIGITS); |
961 | sprintf(DSPVersion, "%d.%d", ver[0], ver[1]); | 962 | sprintf(DSPVersion, "%d.%d", ver[0], ver[1]); |
962 | 963 | ||
963 | DBG(("success.\n")); | 964 | DBG(("success.\n")); |
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index c180598f1710..89466b056be7 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c | |||
@@ -199,7 +199,7 @@ MODULE_LICENSE("GPL"); | |||
199 | */ | 199 | */ |
200 | 200 | ||
201 | static struct pci_device_id id_tbl[] = { | 201 | static struct pci_device_id id_tbl[] = { |
202 | { PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 202 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_AUDIO), 0 }, |
203 | { } | 203 | { } |
204 | }; | 204 | }; |
205 | 205 | ||
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index 6c0a770ed054..734b8f9e2f78 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c | |||
@@ -926,31 +926,21 @@ static struct midi_operations mpu401_midi_operations[MAX_MIDI_DEV]; | |||
926 | static void mpu401_chk_version(int n, struct mpu_config *devc) | 926 | static void mpu401_chk_version(int n, struct mpu_config *devc) |
927 | { | 927 | { |
928 | int tmp; | 928 | int tmp; |
929 | unsigned long flags; | ||
930 | 929 | ||
931 | devc->version = devc->revision = 0; | 930 | devc->version = devc->revision = 0; |
932 | 931 | ||
933 | spin_lock_irqsave(&devc->lock,flags); | 932 | tmp = mpu_cmd(n, 0xAC, 0); |
934 | if ((tmp = mpu_cmd(n, 0xAC, 0)) < 0) | 933 | if (tmp < 0) |
935 | { | ||
936 | spin_unlock_irqrestore(&devc->lock,flags); | ||
937 | return; | 934 | return; |
938 | } | ||
939 | if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */ | 935 | if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */ |
940 | { | ||
941 | spin_unlock_irqrestore(&devc->lock,flags); | ||
942 | return; | 936 | return; |
943 | } | ||
944 | devc->version = tmp; | 937 | devc->version = tmp; |
945 | 938 | ||
946 | if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0) | 939 | if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0) { |
947 | { | ||
948 | devc->version = 0; | 940 | devc->version = 0; |
949 | spin_unlock_irqrestore(&devc->lock,flags); | ||
950 | return; | 941 | return; |
951 | } | 942 | } |
952 | devc->revision = tmp; | 943 | devc->revision = tmp; |
953 | spin_unlock_irqrestore(&devc->lock,flags); | ||
954 | } | 944 | } |
955 | 945 | ||
956 | int attach_mpu401(struct address_info *hw_config, struct module *owner) | 946 | int attach_mpu401(struct address_info *hw_config, struct module *owner) |
@@ -1084,7 +1074,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner) | |||
1084 | sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name); | 1074 | sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name); |
1085 | else | 1075 | else |
1086 | sprintf(mpu_synth_info[m].name, | 1076 | sprintf(mpu_synth_info[m].name, |
1087 | "MPU-401 %d.%d%c Midi interface #%d", | 1077 | "MPU-401 %d.%d%c MIDI #%d", |
1088 | (int) (devc->version & 0xf0) >> 4, | 1078 | (int) (devc->version & 0xf0) >> 4, |
1089 | devc->version & 0x0f, | 1079 | devc->version & 0x0f, |
1090 | revision_char, | 1080 | revision_char, |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 71515ddb4593..d6752dff2a44 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -287,10 +287,10 @@ struct atiixp { | |||
287 | /* | 287 | /* |
288 | */ | 288 | */ |
289 | static struct pci_device_id snd_atiixp_ids[] = { | 289 | static struct pci_device_id snd_atiixp_ids[] = { |
290 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 290 | { PCI_VDEVICE(ATI, 0x4341), 0 }, /* SB200 */ |
291 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ | 291 | { PCI_VDEVICE(ATI, 0x4361), 0 }, /* SB300 */ |
292 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 292 | { PCI_VDEVICE(ATI, 0x4370), 0 }, /* SB400 */ |
293 | { 0x1002, 0x4382, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB600 */ | 293 | { PCI_VDEVICE(ATI, 0x4382), 0 }, /* SB600 */ |
294 | { 0, } | 294 | { 0, } |
295 | }; | 295 | }; |
296 | 296 | ||
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index c3136cccc559..e7e147bf8eb2 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -262,8 +262,8 @@ struct atiixp_modem { | |||
262 | /* | 262 | /* |
263 | */ | 263 | */ |
264 | static struct pci_device_id snd_atiixp_ids[] = { | 264 | static struct pci_device_id snd_atiixp_ids[] = { |
265 | { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 265 | { PCI_VDEVICE(ATI, 0x434d), 0 }, /* SB200 */ |
266 | { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 266 | { PCI_VDEVICE(ATI, 0x4378), 0 }, /* SB400 */ |
267 | { 0, } | 267 | { 0, } |
268 | }; | 268 | }; |
269 | 269 | ||
diff --git a/sound/pci/au88x0/au8810.c b/sound/pci/au88x0/au8810.c index fce22c7af0ea..c0e8c6b295cb 100644 --- a/sound/pci/au88x0/au8810.c +++ b/sound/pci/au88x0/au8810.c | |||
@@ -1,8 +1,7 @@ | |||
1 | #include "au8810.h" | 1 | #include "au8810.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, | 4 | {PCI_VDEVICE(AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE), 1,}, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, | ||
6 | {0,} | 5 | {0,} |
7 | }; | 6 | }; |
8 | 7 | ||
diff --git a/sound/pci/au88x0/au8820.c b/sound/pci/au88x0/au8820.c index d1fbcce07257..a6527330df58 100644 --- a/sound/pci/au88x0/au8820.c +++ b/sound/pci/au88x0/au8820.c | |||
@@ -1,8 +1,7 @@ | |||
1 | #include "au8820.h" | 1 | #include "au8820.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, | 4 | {PCI_VDEVICE(AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1), 0,}, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | ||
6 | {0,} | 5 | {0,} |
7 | }; | 6 | }; |
8 | 7 | ||
diff --git a/sound/pci/au88x0/au8830.c b/sound/pci/au88x0/au8830.c index d4f2717c14fb..6c702ad4352a 100644 --- a/sound/pci/au88x0/au8830.c +++ b/sound/pci/au88x0/au8830.c | |||
@@ -1,8 +1,7 @@ | |||
1 | #include "au8830.h" | 1 | #include "au8830.h" |
2 | #include "au88x0.h" | 2 | #include "au88x0.h" |
3 | static struct pci_device_id snd_vortex_ids[] = { | 3 | static struct pci_device_id snd_vortex_ids[] = { |
4 | {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, | 4 | {PCI_VDEVICE(AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2), 0,}, |
5 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | ||
6 | {0,} | 5 | {0,} |
7 | }; | 6 | }; |
8 | 7 | ||
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 57b992a5c057..15e4138bce17 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -325,9 +325,9 @@ static struct snd_pcm_hardware snd_ca0106_capture_hw = { | |||
325 | .rate_max = 192000, | 325 | .rate_max = 192000, |
326 | .channels_min = 2, | 326 | .channels_min = 2, |
327 | .channels_max = 2, | 327 | .channels_max = 2, |
328 | .buffer_bytes_max = ((65536 - 64) * 8), | 328 | .buffer_bytes_max = 65536 - 128, |
329 | .period_bytes_min = 64, | 329 | .period_bytes_min = 64, |
330 | .period_bytes_max = (65536 - 64), | 330 | .period_bytes_max = 32768 - 64, |
331 | .periods_min = 2, | 331 | .periods_min = 2, |
332 | .periods_max = 2, | 332 | .periods_max = 2, |
333 | .fifo_size = 0, | 333 | .fifo_size = 0, |
@@ -1876,7 +1876,7 @@ static int snd_ca0106_resume(struct pci_dev *pci) | |||
1876 | 1876 | ||
1877 | // PCI IDs | 1877 | // PCI IDs |
1878 | static struct pci_device_id snd_ca0106_ids[] = { | 1878 | static struct pci_device_id snd_ca0106_ids[] = { |
1879 | { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ | 1879 | { PCI_VDEVICE(CREATIVE, 0x0007), 0 }, /* Audigy LS or Live 24bit */ |
1880 | { 0, } | 1880 | { 0, } |
1881 | }; | 1881 | }; |
1882 | MODULE_DEVICE_TABLE(pci, snd_ca0106_ids); | 1882 | MODULE_DEVICE_TABLE(pci, snd_ca0106_ids); |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 449fe02f666e..ddcd4a9fd7e6 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2797,11 +2797,11 @@ static inline void snd_cmipci_proc_init(struct cmipci *cm) {} | |||
2797 | 2797 | ||
2798 | 2798 | ||
2799 | static struct pci_device_id snd_cmipci_ids[] = { | 2799 | static struct pci_device_id snd_cmipci_ids[] = { |
2800 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2800 | {PCI_VDEVICE(CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A), 0}, |
2801 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2801 | {PCI_VDEVICE(CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B), 0}, |
2802 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2802 | {PCI_VDEVICE(CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738), 0}, |
2803 | {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2803 | {PCI_VDEVICE(CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738B), 0}, |
2804 | {PCI_VENDOR_ID_AL, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 2804 | {PCI_VDEVICE(AL, PCI_DEVICE_ID_CMEDIA_CM8738), 0}, |
2805 | {0,}, | 2805 | {0,}, |
2806 | }; | 2806 | }; |
2807 | 2807 | ||
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index f6286f84a221..e2e0359bb056 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -495,7 +495,7 @@ struct cs4281 { | |||
495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id); | 495 | static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id); |
496 | 496 | ||
497 | static struct pci_device_id snd_cs4281_ids[] = { | 497 | static struct pci_device_id snd_cs4281_ids[] = { |
498 | { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ | 498 | { PCI_VDEVICE(CIRRUS, 0x6005), 0, }, /* CS4281 */ |
499 | { 0, } | 499 | { 0, } |
500 | }; | 500 | }; |
501 | 501 | ||
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index c9b3e3d48cbc..033aec430117 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -65,9 +65,9 @@ module_param_array(mmap_valid, bool, NULL, 0444); | |||
65 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); | 65 | MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); |
66 | 66 | ||
67 | static struct pci_device_id snd_cs46xx_ids[] = { | 67 | static struct pci_device_id snd_cs46xx_ids[] = { |
68 | { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ | 68 | { PCI_VDEVICE(CIRRUS, 0x6001), 0, }, /* CS4280 */ |
69 | { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ | 69 | { PCI_VDEVICE(CIRRUS, 0x6003), 0, }, /* CS4612 */ |
70 | { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ | 70 | { PCI_VDEVICE(CIRRUS, 0x6004), 0, }, /* CS4615 */ |
71 | { 0, } | 71 | { 0, } |
72 | }; | 72 | }; |
73 | 73 | ||
diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c index a1db51b3ead8..a7f4a671f7b7 100644 --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c | |||
@@ -242,13 +242,12 @@ static int get_amixer_rsc(struct amixer_mgr *mgr, | |||
242 | 242 | ||
243 | /* Allocate mem for amixer resource */ | 243 | /* Allocate mem for amixer resource */ |
244 | amixer = kzalloc(sizeof(*amixer), GFP_KERNEL); | 244 | amixer = kzalloc(sizeof(*amixer), GFP_KERNEL); |
245 | if (NULL == amixer) { | 245 | if (!amixer) |
246 | err = -ENOMEM; | 246 | return -ENOMEM; |
247 | return err; | ||
248 | } | ||
249 | 247 | ||
250 | /* Check whether there are sufficient | 248 | /* Check whether there are sufficient |
251 | * amixer resources to meet request. */ | 249 | * amixer resources to meet request. */ |
250 | err = 0; | ||
252 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 251 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
253 | for (i = 0; i < desc->msr; i++) { | 252 | for (i = 0; i < desc->msr; i++) { |
254 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 253 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |
@@ -397,12 +396,11 @@ static int get_sum_rsc(struct sum_mgr *mgr, | |||
397 | 396 | ||
398 | /* Allocate mem for sum resource */ | 397 | /* Allocate mem for sum resource */ |
399 | sum = kzalloc(sizeof(*sum), GFP_KERNEL); | 398 | sum = kzalloc(sizeof(*sum), GFP_KERNEL); |
400 | if (NULL == sum) { | 399 | if (!sum) |
401 | err = -ENOMEM; | 400 | return -ENOMEM; |
402 | return err; | ||
403 | } | ||
404 | 401 | ||
405 | /* Check whether there are sufficient sum resources to meet request. */ | 402 | /* Check whether there are sufficient sum resources to meet request. */ |
403 | err = 0; | ||
406 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 404 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
407 | for (i = 0; i < desc->msr; i++) { | 405 | for (i = 0; i < desc->msr; i++) { |
408 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 406 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |
diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c index 082e35c08c02..deb6cfa73600 100644 --- a/sound/pci/ctxfi/ctdaio.c +++ b/sound/pci/ctxfi/ctdaio.c | |||
@@ -57,9 +57,9 @@ struct daio_rsc_idx idx_20k1[NUM_DAIOTYP] = { | |||
57 | 57 | ||
58 | struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { | 58 | struct daio_rsc_idx idx_20k2[NUM_DAIOTYP] = { |
59 | [LINEO1] = {.left = 0x40, .right = 0x41}, | 59 | [LINEO1] = {.left = 0x40, .right = 0x41}, |
60 | [LINEO2] = {.left = 0x70, .right = 0x71}, | 60 | [LINEO2] = {.left = 0x60, .right = 0x61}, |
61 | [LINEO3] = {.left = 0x50, .right = 0x51}, | 61 | [LINEO3] = {.left = 0x50, .right = 0x51}, |
62 | [LINEO4] = {.left = 0x60, .right = 0x61}, | 62 | [LINEO4] = {.left = 0x70, .right = 0x71}, |
63 | [LINEIM] = {.left = 0x45, .right = 0xc5}, | 63 | [LINEIM] = {.left = 0x45, .right = 0xc5}, |
64 | [SPDIFOO] = {.left = 0x00, .right = 0x01}, | 64 | [SPDIFOO] = {.left = 0x00, .right = 0x01}, |
65 | [SPDIFIO] = {.left = 0x05, .right = 0x85}, | 65 | [SPDIFIO] = {.left = 0x05, .right = 0x85}, |
diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c index e1c145d8b702..df43a5cd3938 100644 --- a/sound/pci/ctxfi/ctsrc.c +++ b/sound/pci/ctxfi/ctsrc.c | |||
@@ -724,12 +724,11 @@ static int get_srcimp_rsc(struct srcimp_mgr *mgr, | |||
724 | 724 | ||
725 | /* Allocate mem for SRCIMP resource */ | 725 | /* Allocate mem for SRCIMP resource */ |
726 | srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL); | 726 | srcimp = kzalloc(sizeof(*srcimp), GFP_KERNEL); |
727 | if (NULL == srcimp) { | 727 | if (!srcimp) |
728 | err = -ENOMEM; | 728 | return -ENOMEM; |
729 | return err; | ||
730 | } | ||
731 | 729 | ||
732 | /* Check whether there are sufficient SRCIMP resources. */ | 730 | /* Check whether there are sufficient SRCIMP resources. */ |
731 | err = 0; | ||
733 | spin_lock_irqsave(&mgr->mgr_lock, flags); | 732 | spin_lock_irqsave(&mgr->mgr_lock, flags); |
734 | for (i = 0; i < desc->msr; i++) { | 733 | for (i = 0; i < desc->msr; i++) { |
735 | err = mgr_get_resource(&mgr->mgr, 1, &idx); | 734 | err = mgr_get_resource(&mgr->mgr, 1, &idx); |
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index c7f3b994101c..168af67d938e 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -77,9 +77,9 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model."); | |||
77 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 | 77 | * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 |
78 | */ | 78 | */ |
79 | static struct pci_device_id snd_emu10k1_ids[] = { | 79 | static struct pci_device_id snd_emu10k1_ids[] = { |
80 | { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ | 80 | { PCI_VDEVICE(CREATIVE, 0x0002), 0 }, /* EMU10K1 */ |
81 | { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ | 81 | { PCI_VDEVICE(CREATIVE, 0x0004), 1 }, /* Audigy */ |
82 | { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ | 82 | { PCI_VDEVICE(CREATIVE, 0x0008), 1 }, /* Audigy 2 Value SB0400 */ |
83 | { 0, } | 83 | { 0, } |
84 | }; | 84 | }; |
85 | 85 | ||
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 4d3ad793e98f..36e08bd2b3cc 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1607,7 +1607,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci) | |||
1607 | 1607 | ||
1608 | // PCI IDs | 1608 | // PCI IDs |
1609 | static struct pci_device_id snd_emu10k1x_ids[] = { | 1609 | static struct pci_device_id snd_emu10k1x_ids[] = { |
1610 | { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ | 1610 | { PCI_VDEVICE(CREATIVE, 0x0006), 0 }, /* Dell OEM version (EMU10K1) */ |
1611 | { 0, } | 1611 | { 0, } |
1612 | }; | 1612 | }; |
1613 | MODULE_DEVICE_TABLE(pci, snd_emu10k1x_ids); | 1613 | MODULE_DEVICE_TABLE(pci, snd_emu10k1x_ids); |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index e617acaf10e3..61b8ab39800f 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
@@ -644,7 +644,7 @@ int __devinit snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm * | |||
644 | int err; | 644 | int err; |
645 | int capture=1; | 645 | int capture=1; |
646 | 646 | ||
647 | /* snd_printk("KERN_DEBUG snd_p16v_pcm called. device=%d\n", device); */ | 647 | /* snd_printk(KERN_DEBUG "snd_p16v_pcm called. device=%d\n", device); */ |
648 | emu->p16v_device_offset = device; | 648 | emu->p16v_device_offset = device; |
649 | if (rpcm) | 649 | if (rpcm) |
650 | *rpcm = NULL; | 650 | *rpcm = NULL; |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 18f4d1e98c46..2b82c5c723e1 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -445,12 +445,12 @@ static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id); | |||
445 | 445 | ||
446 | static struct pci_device_id snd_audiopci_ids[] = { | 446 | static struct pci_device_id snd_audiopci_ids[] = { |
447 | #ifdef CHIP1370 | 447 | #ifdef CHIP1370 |
448 | { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ | 448 | { PCI_VDEVICE(ENSONIQ, 0x5000), 0, }, /* ES1370 */ |
449 | #endif | 449 | #endif |
450 | #ifdef CHIP1371 | 450 | #ifdef CHIP1371 |
451 | { 0x1274, 0x1371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1371 */ | 451 | { PCI_VDEVICE(ENSONIQ, 0x1371), 0, }, /* ES1371 */ |
452 | { 0x1274, 0x5880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1373 - CT5880 */ | 452 | { PCI_VDEVICE(ENSONIQ, 0x5880), 0, }, /* ES1373 - CT5880 */ |
453 | { 0x1102, 0x8938, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Ectiva EV1938 */ | 453 | { PCI_VDEVICE(ECTIVA, 0x8938), 0, }, /* Ectiva EV1938 */ |
454 | #endif | 454 | #endif |
455 | { 0, } | 455 | { 0, } |
456 | }; | 456 | }; |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index fbd2ac09aa34..820318ee62c1 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -244,7 +244,7 @@ struct es1938 { | |||
244 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id); | 244 | static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id); |
245 | 245 | ||
246 | static struct pci_device_id snd_es1938_ids[] = { | 246 | static struct pci_device_id snd_es1938_ids[] = { |
247 | { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ | 247 | { PCI_VDEVICE(ESS, 0x1969), 0, }, /* Solo-1 */ |
248 | { 0, } | 248 | { 0, } |
249 | }; | 249 | }; |
250 | 250 | ||
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 29272f2e95a0..b0275a050870 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -50,19 +50,22 @@ static void snd_hda_generate_beep(struct work_struct *work) | |||
50 | * The tone frequency of beep generator on IDT/STAC codecs is | 50 | * The tone frequency of beep generator on IDT/STAC codecs is |
51 | * defined from the 8bit tone parameter, in Hz, | 51 | * defined from the 8bit tone parameter, in Hz, |
52 | * freq = 48000 * (257 - tone) / 1024 | 52 | * freq = 48000 * (257 - tone) / 1024 |
53 | * that is from 12kHz to 93.75kHz in step of 46.875 hz | 53 | * that is from 12kHz to 93.75Hz in steps of 46.875 Hz |
54 | */ | 54 | */ |
55 | static int beep_linear_tone(struct hda_beep *beep, int hz) | 55 | static int beep_linear_tone(struct hda_beep *beep, int hz) |
56 | { | 56 | { |
57 | if (hz <= 0) | ||
58 | return 0; | ||
57 | hz *= 1000; /* fixed point */ | 59 | hz *= 1000; /* fixed point */ |
58 | hz = hz - DIGBEEP_HZ_MIN; | 60 | hz = hz - DIGBEEP_HZ_MIN |
61 | + DIGBEEP_HZ_STEP / 2; /* round to nearest step */ | ||
59 | if (hz < 0) | 62 | if (hz < 0) |
60 | hz = 0; /* turn off PC beep*/ | 63 | hz = 0; /* turn off PC beep*/ |
61 | else if (hz >= (DIGBEEP_HZ_MAX - DIGBEEP_HZ_MIN)) | 64 | else if (hz >= (DIGBEEP_HZ_MAX - DIGBEEP_HZ_MIN)) |
62 | hz = 0xff; | 65 | hz = 1; /* max frequency */ |
63 | else { | 66 | else { |
64 | hz /= DIGBEEP_HZ_STEP; | 67 | hz /= DIGBEEP_HZ_STEP; |
65 | hz++; | 68 | hz = 255 - hz; |
66 | } | 69 | } |
67 | return hz; | 70 | return hz; |
68 | } | 71 | } |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 462e2cedaa6a..c7df01b72cac 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -174,7 +174,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
174 | mutex_lock(&bus->cmd_mutex); | 174 | mutex_lock(&bus->cmd_mutex); |
175 | err = bus->ops.command(bus, cmd); | 175 | err = bus->ops.command(bus, cmd); |
176 | if (!err && res) | 176 | if (!err && res) |
177 | *res = bus->ops.get_response(bus); | 177 | *res = bus->ops.get_response(bus, codec->addr); |
178 | mutex_unlock(&bus->cmd_mutex); | 178 | mutex_unlock(&bus->cmd_mutex); |
179 | snd_hda_power_down(codec); | 179 | snd_hda_power_down(codec); |
180 | if (res && *res == -1 && bus->rirb_error) { | 180 | if (res && *res == -1 && bus->rirb_error) { |
@@ -332,6 +332,12 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, | |||
332 | AC_VERB_GET_CONNECT_LIST, i); | 332 | AC_VERB_GET_CONNECT_LIST, i); |
333 | range_val = !!(parm & (1 << (shift-1))); /* ranges */ | 333 | range_val = !!(parm & (1 << (shift-1))); /* ranges */ |
334 | val = parm & mask; | 334 | val = parm & mask; |
335 | if (val == 0) { | ||
336 | snd_printk(KERN_WARNING "hda_codec: " | ||
337 | "invalid CONNECT_LIST verb %x[%i]:%x\n", | ||
338 | nid, i, parm); | ||
339 | return 0; | ||
340 | } | ||
335 | parm >>= shift; | 341 | parm >>= shift; |
336 | if (range_val) { | 342 | if (range_val) { |
337 | /* ranges between the previous and this one */ | 343 | /* ranges between the previous and this one */ |
@@ -3470,10 +3476,16 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec, | |||
3470 | } | 3476 | } |
3471 | mutex_lock(&codec->spdif_mutex); | 3477 | mutex_lock(&codec->spdif_mutex); |
3472 | if (mout->share_spdif) { | 3478 | if (mout->share_spdif) { |
3473 | runtime->hw.rates &= mout->spdif_rates; | 3479 | if ((runtime->hw.rates & mout->spdif_rates) && |
3474 | runtime->hw.formats &= mout->spdif_formats; | 3480 | (runtime->hw.formats & mout->spdif_formats)) { |
3475 | if (mout->spdif_maxbps < hinfo->maxbps) | 3481 | runtime->hw.rates &= mout->spdif_rates; |
3476 | hinfo->maxbps = mout->spdif_maxbps; | 3482 | runtime->hw.formats &= mout->spdif_formats; |
3483 | if (mout->spdif_maxbps < hinfo->maxbps) | ||
3484 | hinfo->maxbps = mout->spdif_maxbps; | ||
3485 | } else { | ||
3486 | mout->share_spdif = 0; | ||
3487 | /* FIXME: need notify? */ | ||
3488 | } | ||
3477 | } | 3489 | } |
3478 | mutex_unlock(&codec->spdif_mutex); | 3490 | mutex_unlock(&codec->spdif_mutex); |
3479 | } | 3491 | } |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index cad79efaabc9..1b75f28ed092 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -568,7 +568,7 @@ struct hda_bus_ops { | |||
568 | /* send a single command */ | 568 | /* send a single command */ |
569 | int (*command)(struct hda_bus *bus, unsigned int cmd); | 569 | int (*command)(struct hda_bus *bus, unsigned int cmd); |
570 | /* get a response from the last command */ | 570 | /* get a response from the last command */ |
571 | unsigned int (*get_response)(struct hda_bus *bus); | 571 | unsigned int (*get_response)(struct hda_bus *bus, unsigned int addr); |
572 | /* free the private data */ | 572 | /* free the private data */ |
573 | void (*private_free)(struct hda_bus *); | 573 | void (*private_free)(struct hda_bus *); |
574 | /* attach a PCM stream */ | 574 | /* attach a PCM stream */ |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index fcad5ec31773..9446a5abea13 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -508,7 +508,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, | |||
508 | char name[64]; | 508 | char name[64]; |
509 | char *sname; | 509 | char *sname; |
510 | long long val; | 510 | long long val; |
511 | int n; | 511 | unsigned int n; |
512 | 512 | ||
513 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 513 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
514 | if (sscanf(line, "%s %llx", name, &val) != 2) | 514 | if (sscanf(line, "%s %llx", name, &val) != 2) |
@@ -539,7 +539,7 @@ static void hdmi_write_eld_info(struct snd_info_entry *entry, | |||
539 | sname++; | 539 | sname++; |
540 | n = 10 * n + name[4] - '0'; | 540 | n = 10 * n + name[4] - '0'; |
541 | } | 541 | } |
542 | if (n < 0 || n > 31) /* double the CEA limit */ | 542 | if (n >= ELD_MAX_SAD) |
543 | continue; | 543 | continue; |
544 | if (!strcmp(sname, "_coding_type")) | 544 | if (!strcmp(sname, "_coding_type")) |
545 | e->sad[n].format = val; | 545 | e->sad[n].format = val; |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 4e9ea7080270..175f07a381ba 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -253,7 +253,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
253 | 253 | ||
254 | /* STATESTS int mask: S3,SD2,SD1,SD0 */ | 254 | /* STATESTS int mask: S3,SD2,SD1,SD0 */ |
255 | #define AZX_MAX_CODECS 4 | 255 | #define AZX_MAX_CODECS 4 |
256 | #define STATESTS_INT_MASK 0x0f | 256 | #define STATESTS_INT_MASK ((1 << AZX_MAX_CODECS) - 1) |
257 | 257 | ||
258 | /* SD_CTL bits */ | 258 | /* SD_CTL bits */ |
259 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ | 259 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ |
@@ -361,8 +361,8 @@ struct azx_rb { | |||
361 | dma_addr_t addr; /* physical address of CORB/RIRB buffer */ | 361 | dma_addr_t addr; /* physical address of CORB/RIRB buffer */ |
362 | /* for RIRB */ | 362 | /* for RIRB */ |
363 | unsigned short rp, wp; /* read/write pointers */ | 363 | unsigned short rp, wp; /* read/write pointers */ |
364 | int cmds; /* number of pending requests */ | 364 | int cmds[AZX_MAX_CODECS]; /* number of pending requests */ |
365 | u32 res; /* last read value */ | 365 | u32 res[AZX_MAX_CODECS]; /* last read value */ |
366 | }; | 366 | }; |
367 | 367 | ||
368 | struct azx { | 368 | struct azx { |
@@ -418,7 +418,7 @@ struct azx { | |||
418 | unsigned int probing :1; /* codec probing phase */ | 418 | unsigned int probing :1; /* codec probing phase */ |
419 | 419 | ||
420 | /* for debugging */ | 420 | /* for debugging */ |
421 | unsigned int last_cmd; /* last issued command (to sync) */ | 421 | unsigned int last_cmd[AZX_MAX_CODECS]; |
422 | 422 | ||
423 | /* for pending irqs */ | 423 | /* for pending irqs */ |
424 | struct work_struct irq_pending_work; | 424 | struct work_struct irq_pending_work; |
@@ -513,6 +513,7 @@ static int azx_alloc_cmd_io(struct azx *chip) | |||
513 | 513 | ||
514 | static void azx_init_cmd_io(struct azx *chip) | 514 | static void azx_init_cmd_io(struct azx *chip) |
515 | { | 515 | { |
516 | spin_lock_irq(&chip->reg_lock); | ||
516 | /* CORB set up */ | 517 | /* CORB set up */ |
517 | chip->corb.addr = chip->rb.addr; | 518 | chip->corb.addr = chip->rb.addr; |
518 | chip->corb.buf = (u32 *)chip->rb.area; | 519 | chip->corb.buf = (u32 *)chip->rb.area; |
@@ -531,7 +532,8 @@ static void azx_init_cmd_io(struct azx *chip) | |||
531 | /* RIRB set up */ | 532 | /* RIRB set up */ |
532 | chip->rirb.addr = chip->rb.addr + 2048; | 533 | chip->rirb.addr = chip->rb.addr + 2048; |
533 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); | 534 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); |
534 | chip->rirb.wp = chip->rirb.rp = chip->rirb.cmds = 0; | 535 | chip->rirb.wp = chip->rirb.rp = 0; |
536 | memset(chip->rirb.cmds, 0, sizeof(chip->rirb.cmds)); | ||
535 | azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr); | 537 | azx_writel(chip, RIRBLBASE, (u32)chip->rirb.addr); |
536 | azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr)); | 538 | azx_writel(chip, RIRBUBASE, upper_32_bits(chip->rirb.addr)); |
537 | 539 | ||
@@ -543,30 +545,60 @@ static void azx_init_cmd_io(struct azx *chip) | |||
543 | azx_writew(chip, RINTCNT, 1); | 545 | azx_writew(chip, RINTCNT, 1); |
544 | /* enable rirb dma and response irq */ | 546 | /* enable rirb dma and response irq */ |
545 | azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); | 547 | azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); |
548 | spin_unlock_irq(&chip->reg_lock); | ||
546 | } | 549 | } |
547 | 550 | ||
548 | static void azx_free_cmd_io(struct azx *chip) | 551 | static void azx_free_cmd_io(struct azx *chip) |
549 | { | 552 | { |
553 | spin_lock_irq(&chip->reg_lock); | ||
550 | /* disable ringbuffer DMAs */ | 554 | /* disable ringbuffer DMAs */ |
551 | azx_writeb(chip, RIRBCTL, 0); | 555 | azx_writeb(chip, RIRBCTL, 0); |
552 | azx_writeb(chip, CORBCTL, 0); | 556 | azx_writeb(chip, CORBCTL, 0); |
557 | spin_unlock_irq(&chip->reg_lock); | ||
558 | } | ||
559 | |||
560 | static unsigned int azx_command_addr(u32 cmd) | ||
561 | { | ||
562 | unsigned int addr = cmd >> 28; | ||
563 | |||
564 | if (addr >= AZX_MAX_CODECS) { | ||
565 | snd_BUG(); | ||
566 | addr = 0; | ||
567 | } | ||
568 | |||
569 | return addr; | ||
570 | } | ||
571 | |||
572 | static unsigned int azx_response_addr(u32 res) | ||
573 | { | ||
574 | unsigned int addr = res & 0xf; | ||
575 | |||
576 | if (addr >= AZX_MAX_CODECS) { | ||
577 | snd_BUG(); | ||
578 | addr = 0; | ||
579 | } | ||
580 | |||
581 | return addr; | ||
553 | } | 582 | } |
554 | 583 | ||
555 | /* send a command */ | 584 | /* send a command */ |
556 | static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | 585 | static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) |
557 | { | 586 | { |
558 | struct azx *chip = bus->private_data; | 587 | struct azx *chip = bus->private_data; |
588 | unsigned int addr = azx_command_addr(val); | ||
559 | unsigned int wp; | 589 | unsigned int wp; |
560 | 590 | ||
591 | spin_lock_irq(&chip->reg_lock); | ||
592 | |||
561 | /* add command to corb */ | 593 | /* add command to corb */ |
562 | wp = azx_readb(chip, CORBWP); | 594 | wp = azx_readb(chip, CORBWP); |
563 | wp++; | 595 | wp++; |
564 | wp %= ICH6_MAX_CORB_ENTRIES; | 596 | wp %= ICH6_MAX_CORB_ENTRIES; |
565 | 597 | ||
566 | spin_lock_irq(&chip->reg_lock); | 598 | chip->rirb.cmds[addr]++; |
567 | chip->rirb.cmds++; | ||
568 | chip->corb.buf[wp] = cpu_to_le32(val); | 599 | chip->corb.buf[wp] = cpu_to_le32(val); |
569 | azx_writel(chip, CORBWP, wp); | 600 | azx_writel(chip, CORBWP, wp); |
601 | |||
570 | spin_unlock_irq(&chip->reg_lock); | 602 | spin_unlock_irq(&chip->reg_lock); |
571 | 603 | ||
572 | return 0; | 604 | return 0; |
@@ -578,13 +610,14 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | |||
578 | static void azx_update_rirb(struct azx *chip) | 610 | static void azx_update_rirb(struct azx *chip) |
579 | { | 611 | { |
580 | unsigned int rp, wp; | 612 | unsigned int rp, wp; |
613 | unsigned int addr; | ||
581 | u32 res, res_ex; | 614 | u32 res, res_ex; |
582 | 615 | ||
583 | wp = azx_readb(chip, RIRBWP); | 616 | wp = azx_readb(chip, RIRBWP); |
584 | if (wp == chip->rirb.wp) | 617 | if (wp == chip->rirb.wp) |
585 | return; | 618 | return; |
586 | chip->rirb.wp = wp; | 619 | chip->rirb.wp = wp; |
587 | 620 | ||
588 | while (chip->rirb.rp != wp) { | 621 | while (chip->rirb.rp != wp) { |
589 | chip->rirb.rp++; | 622 | chip->rirb.rp++; |
590 | chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; | 623 | chip->rirb.rp %= ICH6_MAX_RIRB_ENTRIES; |
@@ -592,18 +625,24 @@ static void azx_update_rirb(struct azx *chip) | |||
592 | rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ | 625 | rp = chip->rirb.rp << 1; /* an RIRB entry is 8-bytes */ |
593 | res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); | 626 | res_ex = le32_to_cpu(chip->rirb.buf[rp + 1]); |
594 | res = le32_to_cpu(chip->rirb.buf[rp]); | 627 | res = le32_to_cpu(chip->rirb.buf[rp]); |
628 | addr = azx_response_addr(res_ex); | ||
595 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) | 629 | if (res_ex & ICH6_RIRB_EX_UNSOL_EV) |
596 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); | 630 | snd_hda_queue_unsol_event(chip->bus, res, res_ex); |
597 | else if (chip->rirb.cmds) { | 631 | else if (chip->rirb.cmds[addr]) { |
598 | chip->rirb.res = res; | 632 | chip->rirb.res[addr] = res; |
599 | smp_wmb(); | 633 | smp_wmb(); |
600 | chip->rirb.cmds--; | 634 | chip->rirb.cmds[addr]--; |
601 | } | 635 | } else |
636 | snd_printk(KERN_ERR SFX "spurious response %#x:%#x, " | ||
637 | "last cmd=%#08x\n", | ||
638 | res, res_ex, | ||
639 | chip->last_cmd[addr]); | ||
602 | } | 640 | } |
603 | } | 641 | } |
604 | 642 | ||
605 | /* receive a response */ | 643 | /* receive a response */ |
606 | static unsigned int azx_rirb_get_response(struct hda_bus *bus) | 644 | static unsigned int azx_rirb_get_response(struct hda_bus *bus, |
645 | unsigned int addr) | ||
607 | { | 646 | { |
608 | struct azx *chip = bus->private_data; | 647 | struct azx *chip = bus->private_data; |
609 | unsigned long timeout; | 648 | unsigned long timeout; |
@@ -616,10 +655,10 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
616 | azx_update_rirb(chip); | 655 | azx_update_rirb(chip); |
617 | spin_unlock_irq(&chip->reg_lock); | 656 | spin_unlock_irq(&chip->reg_lock); |
618 | } | 657 | } |
619 | if (!chip->rirb.cmds) { | 658 | if (!chip->rirb.cmds[addr]) { |
620 | smp_rmb(); | 659 | smp_rmb(); |
621 | bus->rirb_error = 0; | 660 | bus->rirb_error = 0; |
622 | return chip->rirb.res; /* the last value */ | 661 | return chip->rirb.res[addr]; /* the last value */ |
623 | } | 662 | } |
624 | if (time_after(jiffies, timeout)) | 663 | if (time_after(jiffies, timeout)) |
625 | break; | 664 | break; |
@@ -633,7 +672,8 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
633 | 672 | ||
634 | if (chip->msi) { | 673 | if (chip->msi) { |
635 | snd_printk(KERN_WARNING SFX "No response from codec, " | 674 | snd_printk(KERN_WARNING SFX "No response from codec, " |
636 | "disabling MSI: last cmd=0x%08x\n", chip->last_cmd); | 675 | "disabling MSI: last cmd=0x%08x\n", |
676 | chip->last_cmd[addr]); | ||
637 | free_irq(chip->irq, chip); | 677 | free_irq(chip->irq, chip); |
638 | chip->irq = -1; | 678 | chip->irq = -1; |
639 | pci_disable_msi(chip->pci); | 679 | pci_disable_msi(chip->pci); |
@@ -648,7 +688,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
648 | if (!chip->polling_mode) { | 688 | if (!chip->polling_mode) { |
649 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " | 689 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " |
650 | "switching to polling mode: last cmd=0x%08x\n", | 690 | "switching to polling mode: last cmd=0x%08x\n", |
651 | chip->last_cmd); | 691 | chip->last_cmd[addr]); |
652 | chip->polling_mode = 1; | 692 | chip->polling_mode = 1; |
653 | goto again; | 693 | goto again; |
654 | } | 694 | } |
@@ -672,7 +712,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
672 | 712 | ||
673 | snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " | 713 | snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " |
674 | "switching to single_cmd mode: last cmd=0x%08x\n", | 714 | "switching to single_cmd mode: last cmd=0x%08x\n", |
675 | chip->last_cmd); | 715 | chip->last_cmd[addr]); |
676 | chip->single_cmd = 1; | 716 | chip->single_cmd = 1; |
677 | bus->response_reset = 0; | 717 | bus->response_reset = 0; |
678 | /* re-initialize CORB/RIRB */ | 718 | /* re-initialize CORB/RIRB */ |
@@ -692,7 +732,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus) | |||
692 | */ | 732 | */ |
693 | 733 | ||
694 | /* receive a response */ | 734 | /* receive a response */ |
695 | static int azx_single_wait_for_response(struct azx *chip) | 735 | static int azx_single_wait_for_response(struct azx *chip, unsigned int addr) |
696 | { | 736 | { |
697 | int timeout = 50; | 737 | int timeout = 50; |
698 | 738 | ||
@@ -700,7 +740,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
700 | /* check IRV busy bit */ | 740 | /* check IRV busy bit */ |
701 | if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { | 741 | if (azx_readw(chip, IRS) & ICH6_IRS_VALID) { |
702 | /* reuse rirb.res as the response return value */ | 742 | /* reuse rirb.res as the response return value */ |
703 | chip->rirb.res = azx_readl(chip, IR); | 743 | chip->rirb.res[addr] = azx_readl(chip, IR); |
704 | return 0; | 744 | return 0; |
705 | } | 745 | } |
706 | udelay(1); | 746 | udelay(1); |
@@ -708,7 +748,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
708 | if (printk_ratelimit()) | 748 | if (printk_ratelimit()) |
709 | snd_printd(SFX "get_response timeout: IRS=0x%x\n", | 749 | snd_printd(SFX "get_response timeout: IRS=0x%x\n", |
710 | azx_readw(chip, IRS)); | 750 | azx_readw(chip, IRS)); |
711 | chip->rirb.res = -1; | 751 | chip->rirb.res[addr] = -1; |
712 | return -EIO; | 752 | return -EIO; |
713 | } | 753 | } |
714 | 754 | ||
@@ -716,6 +756,7 @@ static int azx_single_wait_for_response(struct azx *chip) | |||
716 | static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | 756 | static int azx_single_send_cmd(struct hda_bus *bus, u32 val) |
717 | { | 757 | { |
718 | struct azx *chip = bus->private_data; | 758 | struct azx *chip = bus->private_data; |
759 | unsigned int addr = azx_command_addr(val); | ||
719 | int timeout = 50; | 760 | int timeout = 50; |
720 | 761 | ||
721 | bus->rirb_error = 0; | 762 | bus->rirb_error = 0; |
@@ -728,7 +769,7 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | |||
728 | azx_writel(chip, IC, val); | 769 | azx_writel(chip, IC, val); |
729 | azx_writew(chip, IRS, azx_readw(chip, IRS) | | 770 | azx_writew(chip, IRS, azx_readw(chip, IRS) | |
730 | ICH6_IRS_BUSY); | 771 | ICH6_IRS_BUSY); |
731 | return azx_single_wait_for_response(chip); | 772 | return azx_single_wait_for_response(chip, addr); |
732 | } | 773 | } |
733 | udelay(1); | 774 | udelay(1); |
734 | } | 775 | } |
@@ -739,10 +780,11 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | |||
739 | } | 780 | } |
740 | 781 | ||
741 | /* receive a response */ | 782 | /* receive a response */ |
742 | static unsigned int azx_single_get_response(struct hda_bus *bus) | 783 | static unsigned int azx_single_get_response(struct hda_bus *bus, |
784 | unsigned int addr) | ||
743 | { | 785 | { |
744 | struct azx *chip = bus->private_data; | 786 | struct azx *chip = bus->private_data; |
745 | return chip->rirb.res; | 787 | return chip->rirb.res[addr]; |
746 | } | 788 | } |
747 | 789 | ||
748 | /* | 790 | /* |
@@ -757,7 +799,7 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val) | |||
757 | { | 799 | { |
758 | struct azx *chip = bus->private_data; | 800 | struct azx *chip = bus->private_data; |
759 | 801 | ||
760 | chip->last_cmd = val; | 802 | chip->last_cmd[azx_command_addr(val)] = val; |
761 | if (chip->single_cmd) | 803 | if (chip->single_cmd) |
762 | return azx_single_send_cmd(bus, val); | 804 | return azx_single_send_cmd(bus, val); |
763 | else | 805 | else |
@@ -765,13 +807,14 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val) | |||
765 | } | 807 | } |
766 | 808 | ||
767 | /* get a response */ | 809 | /* get a response */ |
768 | static unsigned int azx_get_response(struct hda_bus *bus) | 810 | static unsigned int azx_get_response(struct hda_bus *bus, |
811 | unsigned int addr) | ||
769 | { | 812 | { |
770 | struct azx *chip = bus->private_data; | 813 | struct azx *chip = bus->private_data; |
771 | if (chip->single_cmd) | 814 | if (chip->single_cmd) |
772 | return azx_single_get_response(bus); | 815 | return azx_single_get_response(bus, addr); |
773 | else | 816 | else |
774 | return azx_rirb_get_response(bus); | 817 | return azx_rirb_get_response(bus, addr); |
775 | } | 818 | } |
776 | 819 | ||
777 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 820 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -1243,10 +1286,12 @@ static int probe_codec(struct azx *chip, int addr) | |||
1243 | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; | 1286 | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; |
1244 | unsigned int res; | 1287 | unsigned int res; |
1245 | 1288 | ||
1289 | mutex_lock(&chip->bus->cmd_mutex); | ||
1246 | chip->probing = 1; | 1290 | chip->probing = 1; |
1247 | azx_send_cmd(chip->bus, cmd); | 1291 | azx_send_cmd(chip->bus, cmd); |
1248 | res = azx_get_response(chip->bus); | 1292 | res = azx_get_response(chip->bus, addr); |
1249 | chip->probing = 0; | 1293 | chip->probing = 0; |
1294 | mutex_unlock(&chip->bus->cmd_mutex); | ||
1250 | if (res == -1) | 1295 | if (res == -1) |
1251 | return -EIO; | 1296 | return -EIO; |
1252 | snd_printdd(SFX "codec #%d probed OK\n", addr); | 1297 | snd_printdd(SFX "codec #%d probed OK\n", addr); |
@@ -1454,6 +1499,18 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1454 | mutex_unlock(&chip->open_mutex); | 1499 | mutex_unlock(&chip->open_mutex); |
1455 | return err; | 1500 | return err; |
1456 | } | 1501 | } |
1502 | snd_pcm_limit_hw_rates(runtime); | ||
1503 | /* sanity check */ | ||
1504 | if (snd_BUG_ON(!runtime->hw.channels_min) || | ||
1505 | snd_BUG_ON(!runtime->hw.channels_max) || | ||
1506 | snd_BUG_ON(!runtime->hw.formats) || | ||
1507 | snd_BUG_ON(!runtime->hw.rates)) { | ||
1508 | azx_release_device(azx_dev); | ||
1509 | hinfo->ops.close(hinfo, apcm->codec, substream); | ||
1510 | snd_hda_power_down(apcm->codec); | ||
1511 | mutex_unlock(&chip->open_mutex); | ||
1512 | return -EINVAL; | ||
1513 | } | ||
1457 | spin_lock_irqsave(&chip->reg_lock, flags); | 1514 | spin_lock_irqsave(&chip->reg_lock, flags); |
1458 | azx_dev->substream = substream; | 1515 | azx_dev->substream = substream; |
1459 | azx_dev->running = 0; | 1516 | azx_dev->running = 0; |
@@ -1462,7 +1519,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1462 | runtime->private_data = azx_dev; | 1519 | runtime->private_data = azx_dev; |
1463 | snd_pcm_set_sync(substream); | 1520 | snd_pcm_set_sync(substream); |
1464 | mutex_unlock(&chip->open_mutex); | 1521 | mutex_unlock(&chip->open_mutex); |
1465 | |||
1466 | return 0; | 1522 | return 0; |
1467 | } | 1523 | } |
1468 | 1524 | ||
@@ -2322,9 +2378,19 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2322 | gcap = azx_readw(chip, GCAP); | 2378 | gcap = azx_readw(chip, GCAP); |
2323 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); | 2379 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); |
2324 | 2380 | ||
2325 | /* ATI chips seems buggy about 64bit DMA addresses */ | 2381 | /* disable SB600 64bit support for safety */ |
2326 | if (chip->driver_type == AZX_DRIVER_ATI) | 2382 | if ((chip->driver_type == AZX_DRIVER_ATI) || |
2327 | gcap &= ~ICH6_GCAP_64OK; | 2383 | (chip->driver_type == AZX_DRIVER_ATIHDMI)) { |
2384 | struct pci_dev *p_smbus; | ||
2385 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, | ||
2386 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, | ||
2387 | NULL); | ||
2388 | if (p_smbus) { | ||
2389 | if (p_smbus->revision < 0x30) | ||
2390 | gcap &= ~ICH6_GCAP_64OK; | ||
2391 | pci_dev_put(p_smbus); | ||
2392 | } | ||
2393 | } | ||
2328 | 2394 | ||
2329 | /* allow 64bit DMA address if supported by H/W */ | 2395 | /* allow 64bit DMA address if supported by H/W */ |
2330 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) | 2396 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 84cc49ca9148..3da85caf8af1 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -72,6 +72,7 @@ struct ad198x_spec { | |||
72 | hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; | 72 | hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; |
73 | 73 | ||
74 | unsigned int jack_present :1; | 74 | unsigned int jack_present :1; |
75 | unsigned int inv_jack_detect:1; | ||
75 | 76 | ||
76 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 77 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
77 | struct hda_loopback_check loopback; | 78 | struct hda_loopback_check loopback; |
@@ -669,39 +670,13 @@ static struct hda_input_mux ad1986a_automic_capture_source = { | |||
669 | }, | 670 | }, |
670 | }; | 671 | }; |
671 | 672 | ||
672 | static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { | 673 | static struct snd_kcontrol_new ad1986a_laptop_master_mixers[] = { |
673 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), | 674 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), |
674 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), | 675 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), |
675 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
676 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | ||
677 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT), | ||
678 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT), | ||
679 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | ||
680 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | ||
681 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | ||
682 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), | ||
683 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), | ||
684 | { | ||
685 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
686 | .name = "Capture Source", | ||
687 | .info = ad198x_mux_enum_info, | ||
688 | .get = ad198x_mux_enum_get, | ||
689 | .put = ad198x_mux_enum_put, | ||
690 | }, | ||
691 | { | ||
692 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
693 | .name = "External Amplifier", | ||
694 | .info = ad198x_eapd_info, | ||
695 | .get = ad198x_eapd_get, | ||
696 | .put = ad198x_eapd_put, | ||
697 | .private_value = 0x1b | (1 << 8), /* port-D, inversed */ | ||
698 | }, | ||
699 | { } /* end */ | 676 | { } /* end */ |
700 | }; | 677 | }; |
701 | 678 | ||
702 | static struct snd_kcontrol_new ad1986a_samsung_mixers[] = { | 679 | static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { |
703 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), | ||
704 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), | ||
705 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 680 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
706 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | 681 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), |
707 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 682 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
@@ -727,6 +702,12 @@ static struct snd_kcontrol_new ad1986a_samsung_mixers[] = { | |||
727 | { } /* end */ | 702 | { } /* end */ |
728 | }; | 703 | }; |
729 | 704 | ||
705 | static struct snd_kcontrol_new ad1986a_laptop_intmic_mixers[] = { | ||
706 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT), | ||
707 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT), | ||
708 | { } /* end */ | ||
709 | }; | ||
710 | |||
730 | /* re-connect the mic boost input according to the jack sensing */ | 711 | /* re-connect the mic boost input according to the jack sensing */ |
731 | static void ad1986a_automic(struct hda_codec *codec) | 712 | static void ad1986a_automic(struct hda_codec *codec) |
732 | { | 713 | { |
@@ -776,8 +757,9 @@ static void ad1986a_hp_automute(struct hda_codec *codec) | |||
776 | unsigned int present; | 757 | unsigned int present; |
777 | 758 | ||
778 | present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); | 759 | present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); |
779 | /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */ | 760 | spec->jack_present = !!(present & 0x80000000); |
780 | spec->jack_present = !(present & 0x80000000); | 761 | if (spec->inv_jack_detect) |
762 | spec->jack_present = !spec->jack_present; | ||
781 | ad1986a_update_hp(codec); | 763 | ad1986a_update_hp(codec); |
782 | } | 764 | } |
783 | 765 | ||
@@ -816,7 +798,7 @@ static int ad1986a_hp_master_sw_put(struct snd_kcontrol *kcontrol, | |||
816 | return change; | 798 | return change; |
817 | } | 799 | } |
818 | 800 | ||
819 | static struct snd_kcontrol_new ad1986a_laptop_automute_mixers[] = { | 801 | static struct snd_kcontrol_new ad1986a_automute_master_mixers[] = { |
820 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), | 802 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), |
821 | { | 803 | { |
822 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 804 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -826,33 +808,10 @@ static struct snd_kcontrol_new ad1986a_laptop_automute_mixers[] = { | |||
826 | .put = ad1986a_hp_master_sw_put, | 808 | .put = ad1986a_hp_master_sw_put, |
827 | .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | 809 | .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), |
828 | }, | 810 | }, |
829 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
830 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | ||
831 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x0, HDA_OUTPUT), | ||
832 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0x0, HDA_OUTPUT), | ||
833 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | ||
834 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | ||
835 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | ||
836 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), | ||
837 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), | ||
838 | { | ||
839 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
840 | .name = "Capture Source", | ||
841 | .info = ad198x_mux_enum_info, | ||
842 | .get = ad198x_mux_enum_get, | ||
843 | .put = ad198x_mux_enum_put, | ||
844 | }, | ||
845 | { | ||
846 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
847 | .name = "External Amplifier", | ||
848 | .info = ad198x_eapd_info, | ||
849 | .get = ad198x_eapd_get, | ||
850 | .put = ad198x_eapd_put, | ||
851 | .private_value = 0x1b | (1 << 8), /* port-D, inversed */ | ||
852 | }, | ||
853 | { } /* end */ | 811 | { } /* end */ |
854 | }; | 812 | }; |
855 | 813 | ||
814 | |||
856 | /* | 815 | /* |
857 | * initialization verbs | 816 | * initialization verbs |
858 | */ | 817 | */ |
@@ -981,6 +940,27 @@ static struct hda_verb ad1986a_hp_init_verbs[] = { | |||
981 | {} | 940 | {} |
982 | }; | 941 | }; |
983 | 942 | ||
943 | static void ad1986a_samsung_p50_unsol_event(struct hda_codec *codec, | ||
944 | unsigned int res) | ||
945 | { | ||
946 | switch (res >> 26) { | ||
947 | case AD1986A_HP_EVENT: | ||
948 | ad1986a_hp_automute(codec); | ||
949 | break; | ||
950 | case AD1986A_MIC_EVENT: | ||
951 | ad1986a_automic(codec); | ||
952 | break; | ||
953 | } | ||
954 | } | ||
955 | |||
956 | static int ad1986a_samsung_p50_init(struct hda_codec *codec) | ||
957 | { | ||
958 | ad198x_init(codec); | ||
959 | ad1986a_hp_automute(codec); | ||
960 | ad1986a_automic(codec); | ||
961 | return 0; | ||
962 | } | ||
963 | |||
984 | 964 | ||
985 | /* models */ | 965 | /* models */ |
986 | enum { | 966 | enum { |
@@ -991,6 +971,7 @@ enum { | |||
991 | AD1986A_LAPTOP_AUTOMUTE, | 971 | AD1986A_LAPTOP_AUTOMUTE, |
992 | AD1986A_ULTRA, | 972 | AD1986A_ULTRA, |
993 | AD1986A_SAMSUNG, | 973 | AD1986A_SAMSUNG, |
974 | AD1986A_SAMSUNG_P50, | ||
994 | AD1986A_MODELS | 975 | AD1986A_MODELS |
995 | }; | 976 | }; |
996 | 977 | ||
@@ -1002,6 +983,7 @@ static const char *ad1986a_models[AD1986A_MODELS] = { | |||
1002 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", | 983 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", |
1003 | [AD1986A_ULTRA] = "ultra", | 984 | [AD1986A_ULTRA] = "ultra", |
1004 | [AD1986A_SAMSUNG] = "samsung", | 985 | [AD1986A_SAMSUNG] = "samsung", |
986 | [AD1986A_SAMSUNG_P50] = "samsung-p50", | ||
1005 | }; | 987 | }; |
1006 | 988 | ||
1007 | static struct snd_pci_quirk ad1986a_cfg_tbl[] = { | 989 | static struct snd_pci_quirk ad1986a_cfg_tbl[] = { |
@@ -1024,6 +1006,7 @@ static struct snd_pci_quirk ad1986a_cfg_tbl[] = { | |||
1024 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD), | 1006 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD), |
1025 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), | 1007 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), |
1026 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), | 1008 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), |
1009 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung P50", AD1986A_SAMSUNG_P50), | ||
1027 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), | 1010 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), |
1028 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_SAMSUNG), | 1011 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_SAMSUNG), |
1029 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), | 1012 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), |
@@ -1111,7 +1094,10 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1111 | spec->multiout.dac_nids = ad1986a_laptop_dac_nids; | 1094 | spec->multiout.dac_nids = ad1986a_laptop_dac_nids; |
1112 | break; | 1095 | break; |
1113 | case AD1986A_LAPTOP_EAPD: | 1096 | case AD1986A_LAPTOP_EAPD: |
1114 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; | 1097 | spec->num_mixers = 3; |
1098 | spec->mixers[0] = ad1986a_laptop_master_mixers; | ||
1099 | spec->mixers[1] = ad1986a_laptop_eapd_mixers; | ||
1100 | spec->mixers[2] = ad1986a_laptop_intmic_mixers; | ||
1115 | spec->num_init_verbs = 2; | 1101 | spec->num_init_verbs = 2; |
1116 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | 1102 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; |
1117 | spec->multiout.max_channels = 2; | 1103 | spec->multiout.max_channels = 2; |
@@ -1122,7 +1108,9 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1122 | spec->input_mux = &ad1986a_laptop_eapd_capture_source; | 1108 | spec->input_mux = &ad1986a_laptop_eapd_capture_source; |
1123 | break; | 1109 | break; |
1124 | case AD1986A_SAMSUNG: | 1110 | case AD1986A_SAMSUNG: |
1125 | spec->mixers[0] = ad1986a_samsung_mixers; | 1111 | spec->num_mixers = 2; |
1112 | spec->mixers[0] = ad1986a_laptop_master_mixers; | ||
1113 | spec->mixers[1] = ad1986a_laptop_eapd_mixers; | ||
1126 | spec->num_init_verbs = 3; | 1114 | spec->num_init_verbs = 3; |
1127 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | 1115 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; |
1128 | spec->init_verbs[2] = ad1986a_automic_verbs; | 1116 | spec->init_verbs[2] = ad1986a_automic_verbs; |
@@ -1135,8 +1123,28 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1135 | codec->patch_ops.unsol_event = ad1986a_automic_unsol_event; | 1123 | codec->patch_ops.unsol_event = ad1986a_automic_unsol_event; |
1136 | codec->patch_ops.init = ad1986a_automic_init; | 1124 | codec->patch_ops.init = ad1986a_automic_init; |
1137 | break; | 1125 | break; |
1126 | case AD1986A_SAMSUNG_P50: | ||
1127 | spec->num_mixers = 2; | ||
1128 | spec->mixers[0] = ad1986a_automute_master_mixers; | ||
1129 | spec->mixers[1] = ad1986a_laptop_eapd_mixers; | ||
1130 | spec->num_init_verbs = 4; | ||
1131 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | ||
1132 | spec->init_verbs[2] = ad1986a_automic_verbs; | ||
1133 | spec->init_verbs[3] = ad1986a_hp_init_verbs; | ||
1134 | spec->multiout.max_channels = 2; | ||
1135 | spec->multiout.num_dacs = 1; | ||
1136 | spec->multiout.dac_nids = ad1986a_laptop_dac_nids; | ||
1137 | if (!is_jack_available(codec, 0x25)) | ||
1138 | spec->multiout.dig_out_nid = 0; | ||
1139 | spec->input_mux = &ad1986a_automic_capture_source; | ||
1140 | codec->patch_ops.unsol_event = ad1986a_samsung_p50_unsol_event; | ||
1141 | codec->patch_ops.init = ad1986a_samsung_p50_init; | ||
1142 | break; | ||
1138 | case AD1986A_LAPTOP_AUTOMUTE: | 1143 | case AD1986A_LAPTOP_AUTOMUTE: |
1139 | spec->mixers[0] = ad1986a_laptop_automute_mixers; | 1144 | spec->num_mixers = 3; |
1145 | spec->mixers[0] = ad1986a_automute_master_mixers; | ||
1146 | spec->mixers[1] = ad1986a_laptop_eapd_mixers; | ||
1147 | spec->mixers[2] = ad1986a_laptop_intmic_mixers; | ||
1140 | spec->num_init_verbs = 3; | 1148 | spec->num_init_verbs = 3; |
1141 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | 1149 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; |
1142 | spec->init_verbs[2] = ad1986a_hp_init_verbs; | 1150 | spec->init_verbs[2] = ad1986a_hp_init_verbs; |
@@ -1148,6 +1156,10 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1148 | spec->input_mux = &ad1986a_laptop_eapd_capture_source; | 1156 | spec->input_mux = &ad1986a_laptop_eapd_capture_source; |
1149 | codec->patch_ops.unsol_event = ad1986a_hp_unsol_event; | 1157 | codec->patch_ops.unsol_event = ad1986a_hp_unsol_event; |
1150 | codec->patch_ops.init = ad1986a_hp_init; | 1158 | codec->patch_ops.init = ad1986a_hp_init; |
1159 | /* Lenovo N100 seems to report the reversed bit | ||
1160 | * for HP jack-sensing | ||
1161 | */ | ||
1162 | spec->inv_jack_detect = 1; | ||
1151 | break; | 1163 | break; |
1152 | case AD1986A_ULTRA: | 1164 | case AD1986A_ULTRA: |
1153 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; | 1165 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; |
@@ -3734,9 +3746,30 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = { | |||
3734 | { } /* end */ | 3746 | { } /* end */ |
3735 | }; | 3747 | }; |
3736 | 3748 | ||
3749 | static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol, | ||
3750 | struct snd_ctl_elem_value *ucontrol) | ||
3751 | { | ||
3752 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
3753 | int ret = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | ||
3754 | int mute = (!ucontrol->value.integer.value[0] && | ||
3755 | !ucontrol->value.integer.value[1]); | ||
3756 | /* toggle GPIO1 according to the mute state */ | ||
3757 | snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, | ||
3758 | mute ? 0x02 : 0x0); | ||
3759 | return ret; | ||
3760 | } | ||
3761 | |||
3737 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { | 3762 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { |
3738 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 3763 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
3739 | HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 3764 | /*HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),*/ |
3765 | { | ||
3766 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
3767 | .name = "Master Playback Switch", | ||
3768 | .info = snd_hda_mixer_amp_switch_info, | ||
3769 | .get = snd_hda_mixer_amp_switch_get, | ||
3770 | .put = ad1884a_mobile_master_sw_put, | ||
3771 | .private_value = HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT), | ||
3772 | }, | ||
3740 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), | 3773 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), |
3741 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), | 3774 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), |
3742 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT), | 3775 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT), |
@@ -3857,6 +3890,10 @@ static struct hda_verb ad1884a_mobile_verbs[] = { | |||
3857 | /* unsolicited event for pin-sense */ | 3890 | /* unsolicited event for pin-sense */ |
3858 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, | 3891 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, |
3859 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, | 3892 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, |
3893 | /* allow to touch GPIO1 (for mute control) */ | ||
3894 | {0x01, AC_VERB_SET_GPIO_MASK, 0x02}, | ||
3895 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x02}, | ||
3896 | {0x01, AC_VERB_SET_GPIO_DATA, 0x02}, /* first muted */ | ||
3860 | { } /* end */ | 3897 | { } /* end */ |
3861 | }; | 3898 | }; |
3862 | 3899 | ||
@@ -3966,6 +4003,7 @@ static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | |||
3966 | SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), | 4003 | SND_PCI_QUIRK(0x103c, 0x3037, "HP 2230s", AD1884A_LAPTOP), |
3967 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | 4004 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), |
3968 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), | 4005 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x3070, "HP", AD1884A_MOBILE), |
4006 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30d0, "HP laptop", AD1884A_LAPTOP), | ||
3969 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP), | 4007 | SND_PCI_QUIRK_MASK(0x103c, 0xfff0, 0x30e0, "HP laptop", AD1884A_LAPTOP), |
3970 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3600, "HP laptop", AD1884A_LAPTOP), | 4008 | SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3600, "HP laptop", AD1884A_LAPTOP), |
3971 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 4009 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c index 392d108c3558..019ca7cb56d7 100644 --- a/sound/pci/hda/patch_ca0110.c +++ b/sound/pci/hda/patch_ca0110.c | |||
@@ -510,7 +510,7 @@ static int ca0110_parse_auto_config(struct hda_codec *codec) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | 512 | ||
513 | int patch_ca0110(struct hda_codec *codec) | 513 | static int patch_ca0110(struct hda_codec *codec) |
514 | { | 514 | { |
515 | struct ca0110_spec *spec; | 515 | struct ca0110_spec *spec; |
516 | int err; | 516 | int err; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 334533197425..51c44fdbc0f0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -275,13 +275,13 @@ struct alc_spec { | |||
275 | */ | 275 | */ |
276 | unsigned int num_init_verbs; | 276 | unsigned int num_init_verbs; |
277 | 277 | ||
278 | char stream_name_analog[16]; /* analog PCM stream */ | 278 | char stream_name_analog[32]; /* analog PCM stream */ |
279 | struct hda_pcm_stream *stream_analog_playback; | 279 | struct hda_pcm_stream *stream_analog_playback; |
280 | struct hda_pcm_stream *stream_analog_capture; | 280 | struct hda_pcm_stream *stream_analog_capture; |
281 | struct hda_pcm_stream *stream_analog_alt_playback; | 281 | struct hda_pcm_stream *stream_analog_alt_playback; |
282 | struct hda_pcm_stream *stream_analog_alt_capture; | 282 | struct hda_pcm_stream *stream_analog_alt_capture; |
283 | 283 | ||
284 | char stream_name_digital[16]; /* digital PCM stream */ | 284 | char stream_name_digital[32]; /* digital PCM stream */ |
285 | struct hda_pcm_stream *stream_digital_playback; | 285 | struct hda_pcm_stream *stream_digital_playback; |
286 | struct hda_pcm_stream *stream_digital_capture; | 286 | struct hda_pcm_stream *stream_digital_capture; |
287 | 287 | ||
@@ -559,7 +559,7 @@ static int alc_pin_mode_get(struct snd_kcontrol *kcontrol, | |||
559 | 559 | ||
560 | /* Find enumerated value for current pinctl setting */ | 560 | /* Find enumerated value for current pinctl setting */ |
561 | i = alc_pin_mode_min(dir); | 561 | i = alc_pin_mode_min(dir); |
562 | while (alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir)) | 562 | while (i <= alc_pin_mode_max(dir) && alc_pin_mode_values[i] != pinctl) |
563 | i++; | 563 | i++; |
564 | *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); | 564 | *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); |
565 | return 0; | 565 | return 0; |
@@ -945,12 +945,13 @@ static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid, | |||
945 | static void alc_automute_pin(struct hda_codec *codec) | 945 | static void alc_automute_pin(struct hda_codec *codec) |
946 | { | 946 | { |
947 | struct alc_spec *spec = codec->spec; | 947 | struct alc_spec *spec = codec->spec; |
948 | unsigned int present; | 948 | unsigned int present, pincap; |
949 | unsigned int nid = spec->autocfg.hp_pins[0]; | 949 | unsigned int nid = spec->autocfg.hp_pins[0]; |
950 | int i; | 950 | int i; |
951 | 951 | ||
952 | /* need to execute and sync at first */ | 952 | pincap = snd_hda_query_pin_caps(codec, nid); |
953 | snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); | 953 | if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ |
954 | snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); | ||
954 | present = snd_hda_codec_read(codec, nid, 0, | 955 | present = snd_hda_codec_read(codec, nid, 0, |
955 | AC_VERB_GET_PIN_SENSE, 0); | 956 | AC_VERB_GET_PIN_SENSE, 0); |
956 | spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0; | 957 | spec->jack_present = (present & AC_PINSENSE_PRESENCE) != 0; |
@@ -1392,7 +1393,7 @@ static struct hda_verb alc888_fujitsu_xa3530_verbs[] = { | |||
1392 | static void alc_automute_amp(struct hda_codec *codec) | 1393 | static void alc_automute_amp(struct hda_codec *codec) |
1393 | { | 1394 | { |
1394 | struct alc_spec *spec = codec->spec; | 1395 | struct alc_spec *spec = codec->spec; |
1395 | unsigned int val, mute; | 1396 | unsigned int val, mute, pincap; |
1396 | hda_nid_t nid; | 1397 | hda_nid_t nid; |
1397 | int i; | 1398 | int i; |
1398 | 1399 | ||
@@ -1401,6 +1402,10 @@ static void alc_automute_amp(struct hda_codec *codec) | |||
1401 | nid = spec->autocfg.hp_pins[i]; | 1402 | nid = spec->autocfg.hp_pins[i]; |
1402 | if (!nid) | 1403 | if (!nid) |
1403 | break; | 1404 | break; |
1405 | pincap = snd_hda_query_pin_caps(codec, nid); | ||
1406 | if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ | ||
1407 | snd_hda_codec_read(codec, nid, 0, | ||
1408 | AC_VERB_SET_PIN_SENSE, 0); | ||
1404 | val = snd_hda_codec_read(codec, nid, 0, | 1409 | val = snd_hda_codec_read(codec, nid, 0, |
1405 | AC_VERB_GET_PIN_SENSE, 0); | 1410 | AC_VERB_GET_PIN_SENSE, 0); |
1406 | if (val & AC_PINSENSE_PRESENCE) { | 1411 | if (val & AC_PINSENSE_PRESENCE) { |
@@ -1471,6 +1476,10 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = { | |||
1471 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | 1476 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { |
1472 | /* Bias voltage on for external mic port */ | 1477 | /* Bias voltage on for external mic port */ |
1473 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, | 1478 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, |
1479 | /* Front Mic: set to PIN_IN (empty by default) */ | ||
1480 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
1481 | /* Unselect Front Mic by default in input mixer 3 */ | ||
1482 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0xb)}, | ||
1474 | /* Enable unsolicited event for HP jack */ | 1483 | /* Enable unsolicited event for HP jack */ |
1475 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | 1484 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, |
1476 | /* Enable speaker output */ | 1485 | /* Enable speaker output */ |
@@ -1560,18 +1569,22 @@ static struct hda_input_mux alc888_2_capture_sources[2] = { | |||
1560 | static struct hda_input_mux alc888_acer_aspire_6530_sources[2] = { | 1569 | static struct hda_input_mux alc888_acer_aspire_6530_sources[2] = { |
1561 | /* Interal mic only available on one ADC */ | 1570 | /* Interal mic only available on one ADC */ |
1562 | { | 1571 | { |
1563 | .num_items = 3, | 1572 | .num_items = 5, |
1564 | .items = { | 1573 | .items = { |
1565 | { "Ext Mic", 0x0 }, | 1574 | { "Ext Mic", 0x0 }, |
1575 | { "Line In", 0x2 }, | ||
1566 | { "CD", 0x4 }, | 1576 | { "CD", 0x4 }, |
1577 | { "Input Mix", 0xa }, | ||
1567 | { "Int Mic", 0xb }, | 1578 | { "Int Mic", 0xb }, |
1568 | }, | 1579 | }, |
1569 | }, | 1580 | }, |
1570 | { | 1581 | { |
1571 | .num_items = 2, | 1582 | .num_items = 4, |
1572 | .items = { | 1583 | .items = { |
1573 | { "Ext Mic", 0x0 }, | 1584 | { "Ext Mic", 0x0 }, |
1585 | { "Line In", 0x2 }, | ||
1574 | { "CD", 0x4 }, | 1586 | { "CD", 0x4 }, |
1587 | { "Input Mix", 0xa }, | ||
1575 | }, | 1588 | }, |
1576 | } | 1589 | } |
1577 | }; | 1590 | }; |
@@ -1639,6 +1652,17 @@ static void alc888_acer_aspire_4930g_init_hook(struct hda_codec *codec) | |||
1639 | alc_automute_amp(codec); | 1652 | alc_automute_amp(codec); |
1640 | } | 1653 | } |
1641 | 1654 | ||
1655 | static void alc888_acer_aspire_6530g_init_hook(struct hda_codec *codec) | ||
1656 | { | ||
1657 | struct alc_spec *spec = codec->spec; | ||
1658 | |||
1659 | spec->autocfg.hp_pins[0] = 0x15; | ||
1660 | spec->autocfg.speaker_pins[0] = 0x14; | ||
1661 | spec->autocfg.speaker_pins[1] = 0x16; | ||
1662 | spec->autocfg.speaker_pins[2] = 0x17; | ||
1663 | alc_automute_amp(codec); | ||
1664 | } | ||
1665 | |||
1642 | static void alc889_acer_aspire_8930g_init_hook(struct hda_codec *codec) | 1666 | static void alc889_acer_aspire_8930g_init_hook(struct hda_codec *codec) |
1643 | { | 1667 | { |
1644 | struct alc_spec *spec = codec->spec; | 1668 | struct alc_spec *spec = codec->spec; |
@@ -4481,6 +4505,12 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
4481 | &dig_nid, 1); | 4505 | &dig_nid, 1); |
4482 | if (err < 0) | 4506 | if (err < 0) |
4483 | continue; | 4507 | continue; |
4508 | if (dig_nid > 0x7f) { | ||
4509 | printk(KERN_ERR "alc880_auto: invalid dig_nid " | ||
4510 | "connection 0x%x for NID 0x%x\n", dig_nid, | ||
4511 | spec->autocfg.dig_out_pins[i]); | ||
4512 | continue; | ||
4513 | } | ||
4484 | if (!i) | 4514 | if (!i) |
4485 | spec->multiout.dig_out_nid = dig_nid; | 4515 | spec->multiout.dig_out_nid = dig_nid; |
4486 | else { | 4516 | else { |
@@ -6895,9 +6925,6 @@ static struct hda_verb alc882_targa_verbs[] = { | |||
6895 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | 6925 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ |
6896 | 6926 | ||
6897 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | 6927 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, |
6898 | {0x01, AC_VERB_SET_GPIO_MASK, 0x03}, | ||
6899 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03}, | ||
6900 | {0x01, AC_VERB_SET_GPIO_DATA, 0x03}, | ||
6901 | { } /* end */ | 6928 | { } /* end */ |
6902 | }; | 6929 | }; |
6903 | 6930 | ||
@@ -7217,7 +7244,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
7217 | }, | 7244 | }, |
7218 | [ALC882_TARGA] = { | 7245 | [ALC882_TARGA] = { |
7219 | .mixers = { alc882_targa_mixer, alc882_chmode_mixer }, | 7246 | .mixers = { alc882_targa_mixer, alc882_chmode_mixer }, |
7220 | .init_verbs = { alc882_init_verbs, alc882_targa_verbs}, | 7247 | .init_verbs = { alc882_init_verbs, alc880_gpio3_init_verbs, |
7248 | alc882_targa_verbs}, | ||
7221 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | 7249 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), |
7222 | .dac_nids = alc882_dac_nids, | 7250 | .dac_nids = alc882_dac_nids, |
7223 | .dig_out_nid = ALC882_DIGOUT_NID, | 7251 | .dig_out_nid = ALC882_DIGOUT_NID, |
@@ -8189,6 +8217,8 @@ static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { | |||
8189 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 8217 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
8190 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 8218 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
8191 | HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT), | 8219 | HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT), |
8220 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
8221 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
8192 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 8222 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
8193 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 8223 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
8194 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8224 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
@@ -9064,7 +9094,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
9064 | SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC883_AUTO), | 9094 | SND_PCI_QUIRK(0x1025, 0x0157, "Acer X3200", ALC883_AUTO), |
9065 | SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC883_AUTO), | 9095 | SND_PCI_QUIRK(0x1025, 0x0158, "Acer AX1700-U3700A", ALC883_AUTO), |
9066 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | 9096 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", |
9067 | ALC888_ACER_ASPIRE_4930G), | 9097 | ALC888_ACER_ASPIRE_6530G), |
9068 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | 9098 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", |
9069 | ALC888_ACER_ASPIRE_6530G), | 9099 | ALC888_ACER_ASPIRE_6530G), |
9070 | /* default Acer -- disabled as it causes more problems. | 9100 | /* default Acer -- disabled as it causes more problems. |
@@ -9212,7 +9242,8 @@ static struct alc_config_preset alc883_presets[] = { | |||
9212 | }, | 9242 | }, |
9213 | [ALC883_TARGA_DIG] = { | 9243 | [ALC883_TARGA_DIG] = { |
9214 | .mixers = { alc883_targa_mixer, alc883_chmode_mixer }, | 9244 | .mixers = { alc883_targa_mixer, alc883_chmode_mixer }, |
9215 | .init_verbs = { alc883_init_verbs, alc883_targa_verbs}, | 9245 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, |
9246 | alc883_targa_verbs}, | ||
9216 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 9247 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
9217 | .dac_nids = alc883_dac_nids, | 9248 | .dac_nids = alc883_dac_nids, |
9218 | .dig_out_nid = ALC883_DIGOUT_NID, | 9249 | .dig_out_nid = ALC883_DIGOUT_NID, |
@@ -9225,7 +9256,8 @@ static struct alc_config_preset alc883_presets[] = { | |||
9225 | }, | 9256 | }, |
9226 | [ALC883_TARGA_2ch_DIG] = { | 9257 | [ALC883_TARGA_2ch_DIG] = { |
9227 | .mixers = { alc883_targa_2ch_mixer}, | 9258 | .mixers = { alc883_targa_2ch_mixer}, |
9228 | .init_verbs = { alc883_init_verbs, alc883_targa_verbs}, | 9259 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, |
9260 | alc883_targa_verbs}, | ||
9229 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 9261 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
9230 | .dac_nids = alc883_dac_nids, | 9262 | .dac_nids = alc883_dac_nids, |
9231 | .adc_nids = alc883_adc_nids_alt, | 9263 | .adc_nids = alc883_adc_nids_alt, |
@@ -9317,7 +9349,7 @@ static struct alc_config_preset alc883_presets[] = { | |||
9317 | ARRAY_SIZE(alc888_2_capture_sources), | 9349 | ARRAY_SIZE(alc888_2_capture_sources), |
9318 | .input_mux = alc888_acer_aspire_6530_sources, | 9350 | .input_mux = alc888_acer_aspire_6530_sources, |
9319 | .unsol_event = alc_automute_amp_unsol_event, | 9351 | .unsol_event = alc_automute_amp_unsol_event, |
9320 | .init_hook = alc888_acer_aspire_4930g_init_hook, | 9352 | .init_hook = alc888_acer_aspire_6530g_init_hook, |
9321 | }, | 9353 | }, |
9322 | [ALC888_ACER_ASPIRE_8930G] = { | 9354 | [ALC888_ACER_ASPIRE_8930G] = { |
9323 | .mixers = { alc888_base_mixer, | 9355 | .mixers = { alc888_base_mixer, |
@@ -10599,6 +10631,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec, | |||
10599 | alc262_lenovo_3000_automute(codec, 1); | 10631 | alc262_lenovo_3000_automute(codec, 1); |
10600 | } | 10632 | } |
10601 | 10633 | ||
10634 | static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid, | ||
10635 | int dir, int idx, long *valp) | ||
10636 | { | ||
10637 | int i, change = 0; | ||
10638 | |||
10639 | for (i = 0; i < 2; i++, valp++) | ||
10640 | change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx, | ||
10641 | HDA_AMP_MUTE, | ||
10642 | *valp ? 0 : HDA_AMP_MUTE); | ||
10643 | return change; | ||
10644 | } | ||
10645 | |||
10602 | /* bind hp and internal speaker mute (with plug check) */ | 10646 | /* bind hp and internal speaker mute (with plug check) */ |
10603 | static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, | 10647 | static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, |
10604 | struct snd_ctl_elem_value *ucontrol) | 10648 | struct snd_ctl_elem_value *ucontrol) |
@@ -10607,13 +10651,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol, | |||
10607 | long *valp = ucontrol->value.integer.value; | 10651 | long *valp = ucontrol->value.integer.value; |
10608 | int change; | 10652 | int change; |
10609 | 10653 | ||
10610 | change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0, | 10654 | change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp); |
10611 | HDA_AMP_MUTE, | 10655 | change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp); |
10612 | valp ? 0 : HDA_AMP_MUTE); | ||
10613 | change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, | ||
10614 | HDA_AMP_MUTE, | ||
10615 | valp ? 0 : HDA_AMP_MUTE); | ||
10616 | |||
10617 | if (change) | 10656 | if (change) |
10618 | alc262_fujitsu_automute(codec, 0); | 10657 | alc262_fujitsu_automute(codec, 0); |
10619 | return change; | 10658 | return change; |
@@ -10648,10 +10687,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol, | |||
10648 | long *valp = ucontrol->value.integer.value; | 10687 | long *valp = ucontrol->value.integer.value; |
10649 | int change; | 10688 | int change; |
10650 | 10689 | ||
10651 | change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0, | 10690 | change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp); |
10652 | HDA_AMP_MUTE, | ||
10653 | valp ? 0 : HDA_AMP_MUTE); | ||
10654 | |||
10655 | if (change) | 10691 | if (change) |
10656 | alc262_lenovo_3000_automute(codec, 0); | 10692 | alc262_lenovo_3000_automute(codec, 0); |
10657 | return change; | 10693 | return change; |
@@ -11822,12 +11858,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol, | |||
11822 | long *valp = ucontrol->value.integer.value; | 11858 | long *valp = ucontrol->value.integer.value; |
11823 | int change; | 11859 | int change; |
11824 | 11860 | ||
11825 | change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, | 11861 | change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp); |
11826 | HDA_AMP_MUTE, | ||
11827 | valp[0] ? 0 : HDA_AMP_MUTE); | ||
11828 | change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, | ||
11829 | HDA_AMP_MUTE, | ||
11830 | valp[1] ? 0 : HDA_AMP_MUTE); | ||
11831 | if (change) | 11862 | if (change) |
11832 | alc268_acer_automute(codec, 0); | 11863 | alc268_acer_automute(codec, 0); |
11833 | return change; | 11864 | return change; |
@@ -12437,6 +12468,8 @@ static int alc268_parse_auto_config(struct hda_codec *codec) | |||
12437 | if (err < 0) | 12468 | if (err < 0) |
12438 | return err; | 12469 | return err; |
12439 | 12470 | ||
12471 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | ||
12472 | |||
12440 | return 1; | 12473 | return 1; |
12441 | } | 12474 | } |
12442 | 12475 | ||
@@ -12848,20 +12881,11 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
12848 | { } | 12881 | { } |
12849 | }; | 12882 | }; |
12850 | 12883 | ||
12851 | /* bind volumes of both NID 0x0c and 0x0d */ | ||
12852 | static struct hda_bind_ctls alc269_epc_bind_vol = { | ||
12853 | .ops = &snd_hda_bind_vol, | ||
12854 | .values = { | ||
12855 | HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT), | ||
12856 | HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT), | ||
12857 | 0 | ||
12858 | }, | ||
12859 | }; | ||
12860 | |||
12861 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { | 12884 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { |
12862 | HDA_CODEC_MUTE("iSpeaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 12885 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
12863 | HDA_BIND_VOL("LineOut Playback Volume", &alc269_epc_bind_vol), | 12886 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
12864 | HDA_CODEC_MUTE("LineOut Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 12887 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
12888 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
12865 | { } /* end */ | 12889 | { } /* end */ |
12866 | }; | 12890 | }; |
12867 | 12891 | ||
@@ -12874,12 +12898,7 @@ static struct snd_kcontrol_new alc269_epc_capture_mixer[] = { | |||
12874 | }; | 12898 | }; |
12875 | 12899 | ||
12876 | /* FSC amilo */ | 12900 | /* FSC amilo */ |
12877 | static struct snd_kcontrol_new alc269_fujitsu_mixer[] = { | 12901 | #define alc269_fujitsu_mixer alc269_eeepc_mixer |
12878 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
12879 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
12880 | HDA_BIND_VOL("PCM Playback Volume", &alc269_epc_bind_vol), | ||
12881 | { } /* end */ | ||
12882 | }; | ||
12883 | 12902 | ||
12884 | static struct hda_verb alc269_quanta_fl1_verbs[] = { | 12903 | static struct hda_verb alc269_quanta_fl1_verbs[] = { |
12885 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | 12904 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, |
@@ -13345,6 +13364,8 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13345 | if (!spec->cap_mixer && !spec->no_analog) | 13364 | if (!spec->cap_mixer && !spec->no_analog) |
13346 | set_capture_mixer(spec); | 13365 | set_capture_mixer(spec); |
13347 | 13366 | ||
13367 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | ||
13368 | |||
13348 | return 1; | 13369 | return 1; |
13349 | } | 13370 | } |
13350 | 13371 | ||
@@ -15136,7 +15157,7 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = { | |||
15136 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), | 15157 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), |
15137 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO), | 15158 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba A135", ALC861VD_LENOVO), |
15138 | /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/ | 15159 | /*SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS),*/ /*lenovo*/ |
15139 | SND_PCI_QUIRK(0x1179, 0xff01, "DALLAS", ALC861VD_DALLAS), | 15160 | SND_PCI_QUIRK(0x1179, 0xff01, "Toshiba A135", ALC861VD_LENOVO), |
15140 | SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO), | 15161 | SND_PCI_QUIRK(0x1179, 0xff03, "Toshiba P205", ALC861VD_LENOVO), |
15141 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS), | 15162 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba L30-149", ALC861VD_DALLAS), |
15142 | SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG), | 15163 | SND_PCI_QUIRK(0x1565, 0x820d, "Biostar NF61S SE", ALC861VD_6ST_DIG), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 14f3c3e0f62d..456ef6ac12e4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1590,8 +1590,6 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { | |||
1590 | /* SigmaTel reference board */ | 1590 | /* SigmaTel reference board */ |
1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, | 1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, |
1592 | "DFI LanParty", STAC_REF), | 1592 | "DFI LanParty", STAC_REF), |
1593 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0xfb30, | ||
1594 | "SigmaTel",STAC_9205_REF), | ||
1595 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, | 1593 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, |
1596 | "DFI LanParty", STAC_REF), | 1594 | "DFI LanParty", STAC_REF), |
1597 | /* Dell laptops have BIOS problem */ | 1595 | /* Dell laptops have BIOS problem */ |
@@ -1811,6 +1809,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | |||
1811 | "Dell Studio 1537", STAC_DELL_M6_DMIC), | 1809 | "Dell Studio 1537", STAC_DELL_M6_DMIC), |
1812 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, | 1810 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, |
1813 | "Dell Studio 17", STAC_DELL_M6_DMIC), | 1811 | "Dell Studio 17", STAC_DELL_M6_DMIC), |
1812 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, | ||
1813 | "Dell Studio 1555", STAC_DELL_M6_DMIC), | ||
1814 | {} /* terminator */ | 1814 | {} /* terminator */ |
1815 | }; | 1815 | }; |
1816 | 1816 | ||
@@ -2266,7 +2266,7 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { | |||
2266 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), | 2266 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), |
2267 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), | 2267 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), |
2268 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), | 2268 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), |
2269 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST), | 2269 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS), |
2270 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), | 2270 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), |
2271 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), | 2271 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), |
2272 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), | 2272 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), |
@@ -2344,6 +2344,8 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = { | |||
2344 | /* SigmaTel reference board */ | 2344 | /* SigmaTel reference board */ |
2345 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, | 2345 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, |
2346 | "DFI LanParty", STAC_9205_REF), | 2346 | "DFI LanParty", STAC_9205_REF), |
2347 | SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0xfb30, | ||
2348 | "SigmaTel", STAC_9205_REF), | ||
2347 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, | 2349 | SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, |
2348 | "DFI LanParty", STAC_9205_REF), | 2350 | "DFI LanParty", STAC_9205_REF), |
2349 | /* Dell */ | 2351 | /* Dell */ |
@@ -2378,6 +2380,7 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = { | |||
2378 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, | 2380 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228, |
2379 | "Dell Vostro 1500", STAC_9205_DELL_M42), | 2381 | "Dell Vostro 1500", STAC_9205_DELL_M42), |
2380 | /* Gateway */ | 2382 | /* Gateway */ |
2383 | SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD), | ||
2381 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), | 2384 | SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD), |
2382 | {} /* terminator */ | 2385 | {} /* terminator */ |
2383 | }; | 2386 | }; |
@@ -4065,7 +4068,7 @@ static int stac92xx_add_jack(struct hda_codec *codec, | |||
4065 | jack->nid = nid; | 4068 | jack->nid = nid; |
4066 | jack->type = type; | 4069 | jack->type = type; |
4067 | 4070 | ||
4068 | sprintf(name, "%s at %s %s Jack", | 4071 | snprintf(name, sizeof(name), "%s at %s %s Jack", |
4069 | snd_hda_get_jack_type(def_conf), | 4072 | snd_hda_get_jack_type(def_conf), |
4070 | snd_hda_get_jack_connectivity(def_conf), | 4073 | snd_hda_get_jack_connectivity(def_conf), |
4071 | snd_hda_get_jack_location(def_conf)); | 4074 | snd_hda_get_jack_location(def_conf)); |
@@ -5642,6 +5645,13 @@ static int patch_stac927x(struct hda_codec *codec) | |||
5642 | /* GPIO2 High = Enable EAPD */ | 5645 | /* GPIO2 High = Enable EAPD */ |
5643 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; | 5646 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; |
5644 | spec->gpio_data = 0x04; | 5647 | spec->gpio_data = 0x04; |
5648 | switch (codec->subsystem_id) { | ||
5649 | case 0x1028022f: | ||
5650 | /* correct EAPD to be GPIO0 */ | ||
5651 | spec->eapd_mask = spec->gpio_mask = 0x01; | ||
5652 | spec->gpio_dir = spec->gpio_data = 0x01; | ||
5653 | break; | ||
5654 | }; | ||
5645 | spec->dmic_nids = stac927x_dmic_nids; | 5655 | spec->dmic_nids = stac927x_dmic_nids; |
5646 | spec->num_dmics = STAC927X_NUM_DMICS; | 5656 | spec->num_dmics = STAC927X_NUM_DMICS; |
5647 | 5657 | ||
@@ -5854,6 +5864,8 @@ static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = { | |||
5854 | }; | 5864 | }; |
5855 | 5865 | ||
5856 | static struct snd_pci_quirk stac9872_cfg_tbl[] = { | 5866 | static struct snd_pci_quirk stac9872_cfg_tbl[] = { |
5867 | SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0, | ||
5868 | "Sony VAIO F/S", STAC_9872_VAIO), | ||
5857 | {} /* terminator */ | 5869 | {} /* terminator */ |
5858 | }; | 5870 | }; |
5859 | 5871 | ||
@@ -5866,6 +5878,8 @@ static int patch_stac9872(struct hda_codec *codec) | |||
5866 | if (spec == NULL) | 5878 | if (spec == NULL) |
5867 | return -ENOMEM; | 5879 | return -ENOMEM; |
5868 | codec->spec = spec; | 5880 | codec->spec = spec; |
5881 | spec->num_pins = ARRAY_SIZE(stac9872_pin_nids); | ||
5882 | spec->pin_nids = stac9872_pin_nids; | ||
5869 | 5883 | ||
5870 | spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, | 5884 | spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, |
5871 | stac9872_models, | 5885 | stac9872_models, |
@@ -5877,8 +5891,6 @@ static int patch_stac9872(struct hda_codec *codec) | |||
5877 | stac92xx_set_config_regs(codec, | 5891 | stac92xx_set_config_regs(codec, |
5878 | stac9872_brd_tbl[spec->board_config]); | 5892 | stac9872_brd_tbl[spec->board_config]); |
5879 | 5893 | ||
5880 | spec->num_pins = ARRAY_SIZE(stac9872_pin_nids); | ||
5881 | spec->pin_nids = stac9872_pin_nids; | ||
5882 | spec->multiout.dac_nids = spec->dac_nids; | 5894 | spec->multiout.dac_nids = spec->dac_nids; |
5883 | spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids); | 5895 | spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids); |
5884 | spec->adc_nids = stac9872_adc_nids; | 5896 | spec->adc_nids = stac9872_adc_nids; |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 8e004fb6961a..9008b4b013aa 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -210,7 +210,9 @@ struct via_spec { | |||
210 | /* capture */ | 210 | /* capture */ |
211 | unsigned int num_adc_nids; | 211 | unsigned int num_adc_nids; |
212 | hda_nid_t *adc_nids; | 212 | hda_nid_t *adc_nids; |
213 | hda_nid_t mux_nids[3]; | ||
213 | hda_nid_t dig_in_nid; | 214 | hda_nid_t dig_in_nid; |
215 | hda_nid_t dig_in_pin; | ||
214 | 216 | ||
215 | /* capture source */ | 217 | /* capture source */ |
216 | const struct hda_input_mux *input_mux; | 218 | const struct hda_input_mux *input_mux; |
@@ -319,6 +321,9 @@ static void via_auto_set_output_and_unmute(struct hda_codec *codec, | |||
319 | pin_type); | 321 | pin_type); |
320 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | 322 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, |
321 | AMP_OUT_UNMUTE); | 323 | AMP_OUT_UNMUTE); |
324 | if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) | ||
325 | snd_hda_codec_write(codec, nid, 0, | ||
326 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
322 | } | 327 | } |
323 | 328 | ||
324 | 329 | ||
@@ -387,27 +392,12 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
387 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 392 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
388 | struct via_spec *spec = codec->spec; | 393 | struct via_spec *spec = codec->spec; |
389 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 394 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
390 | unsigned int vendor_id = codec->vendor_id; | 395 | |
391 | 396 | if (!spec->mux_nids[adc_idx]) | |
392 | /* AIW0 lydia 060801 add for correct sw0 input select */ | 397 | return -EINVAL; |
393 | if (IS_VT1708_VENDORID(vendor_id) && (adc_idx == 0)) | 398 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, |
394 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | 399 | spec->mux_nids[adc_idx], |
395 | 0x18, &spec->cur_mux[adc_idx]); | 400 | &spec->cur_mux[adc_idx]); |
396 | else if ((IS_VT1709_10CH_VENDORID(vendor_id) || | ||
397 | IS_VT1709_6CH_VENDORID(vendor_id)) && (adc_idx == 0)) | ||
398 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
399 | 0x19, &spec->cur_mux[adc_idx]); | ||
400 | else if ((IS_VT1708B_8CH_VENDORID(vendor_id) || | ||
401 | IS_VT1708B_4CH_VENDORID(vendor_id)) && (adc_idx == 0)) | ||
402 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
403 | 0x17, &spec->cur_mux[adc_idx]); | ||
404 | else if (IS_VT1702_VENDORID(vendor_id) && (adc_idx == 0)) | ||
405 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
406 | 0x13, &spec->cur_mux[adc_idx]); | ||
407 | else | ||
408 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
409 | spec->adc_nids[adc_idx], | ||
410 | &spec->cur_mux[adc_idx]); | ||
411 | } | 401 | } |
412 | 402 | ||
413 | static int via_independent_hp_info(struct snd_kcontrol *kcontrol, | 403 | static int via_independent_hp_info(struct snd_kcontrol *kcontrol, |
@@ -998,25 +988,11 @@ static int via_init(struct hda_codec *codec) | |||
998 | 988 | ||
999 | /* Lydia Add for EAPD enable */ | 989 | /* Lydia Add for EAPD enable */ |
1000 | if (!spec->dig_in_nid) { /* No Digital In connection */ | 990 | if (!spec->dig_in_nid) { /* No Digital In connection */ |
1001 | if (IS_VT1708_VENDORID(codec->vendor_id)) { | 991 | if (spec->dig_in_pin) { |
1002 | snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, | 992 | snd_hda_codec_write(codec, spec->dig_in_pin, 0, |
1003 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
1004 | PIN_OUT); | ||
1005 | snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, | ||
1006 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
1007 | } else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) || | ||
1008 | IS_VT1709_6CH_VENDORID(codec->vendor_id)) { | ||
1009 | snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, | ||
1010 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 993 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
1011 | PIN_OUT); | 994 | PIN_OUT); |
1012 | snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, | 995 | snd_hda_codec_write(codec, spec->dig_in_pin, 0, |
1013 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
1014 | } else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) || | ||
1015 | IS_VT1708B_4CH_VENDORID(codec->vendor_id)) { | ||
1016 | snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, | ||
1017 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
1018 | PIN_OUT); | ||
1019 | snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, | ||
1020 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | 996 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); |
1021 | } | 997 | } |
1022 | } else /* enable SPDIF-input pin */ | 998 | } else /* enable SPDIF-input pin */ |
@@ -1326,6 +1302,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec) | |||
1326 | 1302 | ||
1327 | if (spec->autocfg.dig_outs) | 1303 | if (spec->autocfg.dig_outs) |
1328 | spec->multiout.dig_out_nid = VT1708_DIGOUT_NID; | 1304 | spec->multiout.dig_out_nid = VT1708_DIGOUT_NID; |
1305 | spec->dig_in_pin = VT1708_DIGIN_PIN; | ||
1329 | if (spec->autocfg.dig_in_pin) | 1306 | if (spec->autocfg.dig_in_pin) |
1330 | spec->dig_in_nid = VT1708_DIGIN_NID; | 1307 | spec->dig_in_nid = VT1708_DIGIN_NID; |
1331 | 1308 | ||
@@ -1352,6 +1329,34 @@ static int via_auto_init(struct hda_codec *codec) | |||
1352 | return 0; | 1329 | return 0; |
1353 | } | 1330 | } |
1354 | 1331 | ||
1332 | static int get_mux_nids(struct hda_codec *codec) | ||
1333 | { | ||
1334 | struct via_spec *spec = codec->spec; | ||
1335 | hda_nid_t nid, conn[8]; | ||
1336 | unsigned int type; | ||
1337 | int i, n; | ||
1338 | |||
1339 | for (i = 0; i < spec->num_adc_nids; i++) { | ||
1340 | nid = spec->adc_nids[i]; | ||
1341 | while (nid) { | ||
1342 | type = (get_wcaps(codec, nid) & AC_WCAP_TYPE) | ||
1343 | >> AC_WCAP_TYPE_SHIFT; | ||
1344 | if (type == AC_WID_PIN) | ||
1345 | break; | ||
1346 | n = snd_hda_get_connections(codec, nid, conn, | ||
1347 | ARRAY_SIZE(conn)); | ||
1348 | if (n <= 0) | ||
1349 | break; | ||
1350 | if (n > 1) { | ||
1351 | spec->mux_nids[i] = nid; | ||
1352 | break; | ||
1353 | } | ||
1354 | nid = conn[0]; | ||
1355 | } | ||
1356 | } | ||
1357 | return 0; | ||
1358 | } | ||
1359 | |||
1355 | static int patch_vt1708(struct hda_codec *codec) | 1360 | static int patch_vt1708(struct hda_codec *codec) |
1356 | { | 1361 | { |
1357 | struct via_spec *spec; | 1362 | struct via_spec *spec; |
@@ -1799,6 +1804,7 @@ static int vt1709_parse_auto_config(struct hda_codec *codec) | |||
1799 | 1804 | ||
1800 | if (spec->autocfg.dig_outs) | 1805 | if (spec->autocfg.dig_outs) |
1801 | spec->multiout.dig_out_nid = VT1709_DIGOUT_NID; | 1806 | spec->multiout.dig_out_nid = VT1709_DIGOUT_NID; |
1807 | spec->dig_in_pin = VT1709_DIGIN_PIN; | ||
1802 | if (spec->autocfg.dig_in_pin) | 1808 | if (spec->autocfg.dig_in_pin) |
1803 | spec->dig_in_nid = VT1709_DIGIN_NID; | 1809 | spec->dig_in_nid = VT1709_DIGIN_NID; |
1804 | 1810 | ||
@@ -1859,6 +1865,7 @@ static int patch_vt1709_10ch(struct hda_codec *codec) | |||
1859 | if (!spec->adc_nids && spec->input_mux) { | 1865 | if (!spec->adc_nids && spec->input_mux) { |
1860 | spec->adc_nids = vt1709_adc_nids; | 1866 | spec->adc_nids = vt1709_adc_nids; |
1861 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); | 1867 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); |
1868 | get_mux_nids(codec); | ||
1862 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; | 1869 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; |
1863 | spec->num_mixers++; | 1870 | spec->num_mixers++; |
1864 | } | 1871 | } |
@@ -1952,6 +1959,7 @@ static int patch_vt1709_6ch(struct hda_codec *codec) | |||
1952 | if (!spec->adc_nids && spec->input_mux) { | 1959 | if (!spec->adc_nids && spec->input_mux) { |
1953 | spec->adc_nids = vt1709_adc_nids; | 1960 | spec->adc_nids = vt1709_adc_nids; |
1954 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); | 1961 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); |
1962 | get_mux_nids(codec); | ||
1955 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; | 1963 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; |
1956 | spec->num_mixers++; | 1964 | spec->num_mixers++; |
1957 | } | 1965 | } |
@@ -2344,6 +2352,7 @@ static int vt1708B_parse_auto_config(struct hda_codec *codec) | |||
2344 | 2352 | ||
2345 | if (spec->autocfg.dig_outs) | 2353 | if (spec->autocfg.dig_outs) |
2346 | spec->multiout.dig_out_nid = VT1708B_DIGOUT_NID; | 2354 | spec->multiout.dig_out_nid = VT1708B_DIGOUT_NID; |
2355 | spec->dig_in_pin = VT1708B_DIGIN_PIN; | ||
2347 | if (spec->autocfg.dig_in_pin) | 2356 | if (spec->autocfg.dig_in_pin) |
2348 | spec->dig_in_nid = VT1708B_DIGIN_NID; | 2357 | spec->dig_in_nid = VT1708B_DIGIN_NID; |
2349 | 2358 | ||
@@ -2404,6 +2413,7 @@ static int patch_vt1708B_8ch(struct hda_codec *codec) | |||
2404 | if (!spec->adc_nids && spec->input_mux) { | 2413 | if (!spec->adc_nids && spec->input_mux) { |
2405 | spec->adc_nids = vt1708B_adc_nids; | 2414 | spec->adc_nids = vt1708B_adc_nids; |
2406 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); | 2415 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); |
2416 | get_mux_nids(codec); | ||
2407 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; | 2417 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; |
2408 | spec->num_mixers++; | 2418 | spec->num_mixers++; |
2409 | } | 2419 | } |
@@ -2455,6 +2465,7 @@ static int patch_vt1708B_4ch(struct hda_codec *codec) | |||
2455 | if (!spec->adc_nids && spec->input_mux) { | 2465 | if (!spec->adc_nids && spec->input_mux) { |
2456 | spec->adc_nids = vt1708B_adc_nids; | 2466 | spec->adc_nids = vt1708B_adc_nids; |
2457 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); | 2467 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); |
2468 | get_mux_nids(codec); | ||
2458 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; | 2469 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; |
2459 | spec->num_mixers++; | 2470 | spec->num_mixers++; |
2460 | } | 2471 | } |
@@ -2889,6 +2900,7 @@ static int patch_vt1708S(struct hda_codec *codec) | |||
2889 | if (!spec->adc_nids && spec->input_mux) { | 2900 | if (!spec->adc_nids && spec->input_mux) { |
2890 | spec->adc_nids = vt1708S_adc_nids; | 2901 | spec->adc_nids = vt1708S_adc_nids; |
2891 | spec->num_adc_nids = ARRAY_SIZE(vt1708S_adc_nids); | 2902 | spec->num_adc_nids = ARRAY_SIZE(vt1708S_adc_nids); |
2903 | get_mux_nids(codec); | ||
2892 | spec->mixers[spec->num_mixers] = vt1708S_capture_mixer; | 2904 | spec->mixers[spec->num_mixers] = vt1708S_capture_mixer; |
2893 | spec->num_mixers++; | 2905 | spec->num_mixers++; |
2894 | } | 2906 | } |
@@ -3206,6 +3218,7 @@ static int patch_vt1702(struct hda_codec *codec) | |||
3206 | if (!spec->adc_nids && spec->input_mux) { | 3218 | if (!spec->adc_nids && spec->input_mux) { |
3207 | spec->adc_nids = vt1702_adc_nids; | 3219 | spec->adc_nids = vt1702_adc_nids; |
3208 | spec->num_adc_nids = ARRAY_SIZE(vt1702_adc_nids); | 3220 | spec->num_adc_nids = ARRAY_SIZE(vt1702_adc_nids); |
3221 | get_mux_nids(codec); | ||
3209 | spec->mixers[spec->num_mixers] = vt1702_capture_mixer; | 3222 | spec->mixers[spec->num_mixers] = vt1702_capture_mixer; |
3210 | spec->num_mixers++; | 3223 | spec->num_mixers++; |
3211 | } | 3224 | } |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 0d0cdbdb4486..cecf1ffeeaaa 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -107,7 +107,7 @@ MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); | |||
107 | 107 | ||
108 | 108 | ||
109 | static const struct pci_device_id snd_ice1712_ids[] = { | 109 | static const struct pci_device_id snd_ice1712_ids[] = { |
110 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ | 110 | { PCI_VDEVICE(ICE, PCI_DEVICE_ID_ICE_1712), 0 }, /* ICE1712 */ |
111 | { 0, } | 111 | { 0, } |
112 | }; | 112 | }; |
113 | 113 | ||
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 36ade77cf371..cc84a831eb21 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -93,7 +93,7 @@ MODULE_PARM_DESC(model, "Use the given board model."); | |||
93 | 93 | ||
94 | /* Both VT1720 and VT1724 have the same PCI IDs */ | 94 | /* Both VT1720 and VT1724 have the same PCI IDs */ |
95 | static const struct pci_device_id snd_vt1724_ids[] = { | 95 | static const struct pci_device_id snd_vt1724_ids[] = { |
96 | { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 96 | { PCI_VDEVICE(ICE, PCI_DEVICE_ID_VT1724), 0 }, |
97 | { 0, } | 97 | { 0, } |
98 | }; | 98 | }; |
99 | 99 | ||
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 8aa5687f392a..171ada535209 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -421,29 +421,29 @@ struct intel8x0 { | |||
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct pci_device_id snd_intel8x0_ids[] = { | 423 | static struct pci_device_id snd_intel8x0_ids[] = { |
424 | { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 424 | { PCI_VDEVICE(INTEL, 0x2415), DEVICE_INTEL }, /* 82801AA */ |
425 | { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 425 | { PCI_VDEVICE(INTEL, 0x2425), DEVICE_INTEL }, /* 82901AB */ |
426 | { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 426 | { PCI_VDEVICE(INTEL, 0x2445), DEVICE_INTEL }, /* 82801BA */ |
427 | { 0x8086, 0x2485, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH3 */ | 427 | { PCI_VDEVICE(INTEL, 0x2485), DEVICE_INTEL }, /* ICH3 */ |
428 | { 0x8086, 0x24c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ICH4 */ | 428 | { PCI_VDEVICE(INTEL, 0x24c5), DEVICE_INTEL_ICH4 }, /* ICH4 */ |
429 | { 0x8086, 0x24d5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ICH5 */ | 429 | { PCI_VDEVICE(INTEL, 0x24d5), DEVICE_INTEL_ICH4 }, /* ICH5 */ |
430 | { 0x8086, 0x25a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ESB */ | 430 | { PCI_VDEVICE(INTEL, 0x25a6), DEVICE_INTEL_ICH4 }, /* ESB */ |
431 | { 0x8086, 0x266e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ICH6 */ | 431 | { PCI_VDEVICE(INTEL, 0x266e), DEVICE_INTEL_ICH4 }, /* ICH6 */ |
432 | { 0x8086, 0x27de, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ICH7 */ | 432 | { PCI_VDEVICE(INTEL, 0x27de), DEVICE_INTEL_ICH4 }, /* ICH7 */ |
433 | { 0x8086, 0x2698, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL_ICH4 }, /* ESB2 */ | 433 | { PCI_VDEVICE(INTEL, 0x2698), DEVICE_INTEL_ICH4 }, /* ESB2 */ |
434 | { 0x8086, 0x7195, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 440MX */ | 434 | { PCI_VDEVICE(INTEL, 0x7195), DEVICE_INTEL }, /* 440MX */ |
435 | { 0x1039, 0x7012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS }, /* SI7012 */ | 435 | { PCI_VDEVICE(SI, 0x7012), DEVICE_SIS }, /* SI7012 */ |
436 | { 0x10de, 0x01b1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE */ | 436 | { PCI_VDEVICE(NVIDIA, 0x01b1), DEVICE_NFORCE }, /* NFORCE */ |
437 | { 0x10de, 0x003a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP04 */ | 437 | { PCI_VDEVICE(NVIDIA, 0x003a), DEVICE_NFORCE }, /* MCP04 */ |
438 | { 0x10de, 0x006a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2 */ | 438 | { PCI_VDEVICE(NVIDIA, 0x006a), DEVICE_NFORCE }, /* NFORCE2 */ |
439 | { 0x10de, 0x0059, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK804 */ | 439 | { PCI_VDEVICE(NVIDIA, 0x0059), DEVICE_NFORCE }, /* CK804 */ |
440 | { 0x10de, 0x008a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8 */ | 440 | { PCI_VDEVICE(NVIDIA, 0x008a), DEVICE_NFORCE }, /* CK8 */ |
441 | { 0x10de, 0x00da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ | 441 | { PCI_VDEVICE(NVIDIA, 0x00da), DEVICE_NFORCE }, /* NFORCE3 */ |
442 | { 0x10de, 0x00ea, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* CK8S */ | 442 | { PCI_VDEVICE(NVIDIA, 0x00ea), DEVICE_NFORCE }, /* CK8S */ |
443 | { 0x10de, 0x026b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP51 */ | 443 | { PCI_VDEVICE(NVIDIA, 0x026b), DEVICE_NFORCE }, /* MCP51 */ |
444 | { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ | 444 | { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */ |
445 | { 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ | 445 | { PCI_VDEVICE(AMD, 0x7445), DEVICE_INTEL }, /* AMD768 */ |
446 | { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ | 446 | { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */ |
447 | { 0, } | 447 | { 0, } |
448 | }; | 448 | }; |
449 | 449 | ||
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 6ec0fc50d6be..9e7d12e7673f 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -220,24 +220,24 @@ struct intel8x0m { | |||
220 | }; | 220 | }; |
221 | 221 | ||
222 | static struct pci_device_id snd_intel8x0m_ids[] = { | 222 | static struct pci_device_id snd_intel8x0m_ids[] = { |
223 | { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ | 223 | { PCI_VDEVICE(INTEL, 0x2416), DEVICE_INTEL }, /* 82801AA */ |
224 | { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ | 224 | { PCI_VDEVICE(INTEL, 0x2426), DEVICE_INTEL }, /* 82901AB */ |
225 | { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ | 225 | { PCI_VDEVICE(INTEL, 0x2446), DEVICE_INTEL }, /* 82801BA */ |
226 | { 0x8086, 0x2486, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH3 */ | 226 | { PCI_VDEVICE(INTEL, 0x2486), DEVICE_INTEL }, /* ICH3 */ |
227 | { 0x8086, 0x24c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH4 */ | 227 | { PCI_VDEVICE(INTEL, 0x24c6), DEVICE_INTEL }, /* ICH4 */ |
228 | { 0x8086, 0x24d6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH5 */ | 228 | { PCI_VDEVICE(INTEL, 0x24d6), DEVICE_INTEL }, /* ICH5 */ |
229 | { 0x8086, 0x266d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH6 */ | 229 | { PCI_VDEVICE(INTEL, 0x266d), DEVICE_INTEL }, /* ICH6 */ |
230 | { 0x8086, 0x27dd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* ICH7 */ | 230 | { PCI_VDEVICE(INTEL, 0x27dd), DEVICE_INTEL }, /* ICH7 */ |
231 | { 0x8086, 0x7196, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 440MX */ | 231 | { PCI_VDEVICE(INTEL, 0x7196), DEVICE_INTEL }, /* 440MX */ |
232 | { 0x1022, 0x7446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */ | 232 | { PCI_VDEVICE(AMD, 0x7446), DEVICE_INTEL }, /* AMD768 */ |
233 | { 0x1039, 0x7013, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS }, /* SI7013 */ | 233 | { PCI_VDEVICE(SI, 0x7013), DEVICE_SIS }, /* SI7013 */ |
234 | { 0x10de, 0x01c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE */ | 234 | { PCI_VDEVICE(NVIDIA, 0x01c1), DEVICE_NFORCE }, /* NFORCE */ |
235 | { 0x10de, 0x0069, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2 */ | 235 | { PCI_VDEVICE(NVIDIA, 0x0069), DEVICE_NFORCE }, /* NFORCE2 */ |
236 | { 0x10de, 0x0089, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE2s */ | 236 | { PCI_VDEVICE(NVIDIA, 0x0089), DEVICE_NFORCE }, /* NFORCE2s */ |
237 | { 0x10de, 0x00d9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* NFORCE3 */ | 237 | { PCI_VDEVICE(NVIDIA, 0x00d9), DEVICE_NFORCE }, /* NFORCE3 */ |
238 | #if 0 | 238 | #if 0 |
239 | { 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */ | 239 | { PCI_VDEVICE(AMD, 0x746d), DEVICE_INTEL }, /* AMD8111 */ |
240 | { 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */ | 240 | { PCI_VDEVICE(AL, 0x5455), DEVICE_ALI }, /* Ali5455 */ |
241 | #endif | 241 | #endif |
242 | { 0, } | 242 | { 0, } |
243 | }; | 243 | }; |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index 18da2ef04d09..11b8c6514b3d 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -654,13 +654,12 @@ static int __devinit lx_init_ethersound_config(struct lx6464es *chip) | |||
654 | int i; | 654 | int i; |
655 | u32 orig_conf_es = lx_dsp_reg_read(chip, eReg_CONFES); | 655 | u32 orig_conf_es = lx_dsp_reg_read(chip, eReg_CONFES); |
656 | 656 | ||
657 | u32 default_conf_es = (64 << IOCR_OUTPUTS_OFFSET) | | 657 | /* configure 64 io channels */ |
658 | u32 conf_es = (orig_conf_es & CONFES_READ_PART_MASK) | | ||
658 | (64 << IOCR_INPUTS_OFFSET) | | 659 | (64 << IOCR_INPUTS_OFFSET) | |
660 | (64 << IOCR_OUTPUTS_OFFSET) | | ||
659 | (FREQ_RATIO_SINGLE_MODE << FREQ_RATIO_OFFSET); | 661 | (FREQ_RATIO_SINGLE_MODE << FREQ_RATIO_OFFSET); |
660 | 662 | ||
661 | u32 conf_es = (orig_conf_es & CONFES_READ_PART_MASK) | ||
662 | | (default_conf_es & CONFES_WRITE_PART_MASK); | ||
663 | |||
664 | snd_printdd("->lx_init_ethersound\n"); | 663 | snd_printdd("->lx_init_ethersound\n"); |
665 | 664 | ||
666 | chip->freq_ratio = FREQ_RATIO_SINGLE_MODE; | 665 | chip->freq_ratio = FREQ_RATIO_SINGLE_MODE; |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 82bc5b9e7629..a83d1968a845 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | static struct pci_device_id snd_mixart_ids[] = { | 63 | static struct pci_device_id snd_mixart_ids[] = { |
64 | { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ | 64 | { PCI_VDEVICE(MOTOROLA, 0x0003), 0, }, /* MC8240 */ |
65 | { 0, } | 65 | { 0, } |
66 | }; | 66 | }; |
67 | 67 | ||
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 522a040855d4..97a0731331a1 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -263,9 +263,9 @@ struct nm256 { | |||
263 | * PCI ids | 263 | * PCI ids |
264 | */ | 264 | */ |
265 | static struct pci_device_id snd_nm256_ids[] = { | 265 | static struct pci_device_id snd_nm256_ids[] = { |
266 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 266 | {PCI_VDEVICE(NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO), 0}, |
267 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 267 | {PCI_VDEVICE(NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO), 0}, |
268 | {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 268 | {PCI_VDEVICE(NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO), 0}, |
269 | {0,}, | 269 | {0,}, |
270 | }; | 270 | }; |
271 | 271 | ||
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c index 304da169bfdc..5401c547c4e3 100644 --- a/sound/pci/oxygen/oxygen_mixer.c +++ b/sound/pci/oxygen/oxygen_mixer.c | |||
@@ -575,8 +575,10 @@ static int ac97_switch_put(struct snd_kcontrol *ctl, | |||
575 | static int ac97_volume_info(struct snd_kcontrol *ctl, | 575 | static int ac97_volume_info(struct snd_kcontrol *ctl, |
576 | struct snd_ctl_elem_info *info) | 576 | struct snd_ctl_elem_info *info) |
577 | { | 577 | { |
578 | int stereo = (ctl->private_value >> 16) & 1; | ||
579 | |||
578 | info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 580 | info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
579 | info->count = 2; | 581 | info->count = stereo ? 2 : 1; |
580 | info->value.integer.min = 0; | 582 | info->value.integer.min = 0; |
581 | info->value.integer.max = 0x1f; | 583 | info->value.integer.max = 0x1f; |
582 | return 0; | 584 | return 0; |
@@ -587,6 +589,7 @@ static int ac97_volume_get(struct snd_kcontrol *ctl, | |||
587 | { | 589 | { |
588 | struct oxygen *chip = ctl->private_data; | 590 | struct oxygen *chip = ctl->private_data; |
589 | unsigned int codec = (ctl->private_value >> 24) & 1; | 591 | unsigned int codec = (ctl->private_value >> 24) & 1; |
592 | int stereo = (ctl->private_value >> 16) & 1; | ||
590 | unsigned int index = ctl->private_value & 0xff; | 593 | unsigned int index = ctl->private_value & 0xff; |
591 | u16 reg; | 594 | u16 reg; |
592 | 595 | ||
@@ -594,7 +597,8 @@ static int ac97_volume_get(struct snd_kcontrol *ctl, | |||
594 | reg = oxygen_read_ac97(chip, codec, index); | 597 | reg = oxygen_read_ac97(chip, codec, index); |
595 | mutex_unlock(&chip->mutex); | 598 | mutex_unlock(&chip->mutex); |
596 | value->value.integer.value[0] = 31 - (reg & 0x1f); | 599 | value->value.integer.value[0] = 31 - (reg & 0x1f); |
597 | value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f); | 600 | if (stereo) |
601 | value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f); | ||
598 | return 0; | 602 | return 0; |
599 | } | 603 | } |
600 | 604 | ||
@@ -603,6 +607,7 @@ static int ac97_volume_put(struct snd_kcontrol *ctl, | |||
603 | { | 607 | { |
604 | struct oxygen *chip = ctl->private_data; | 608 | struct oxygen *chip = ctl->private_data; |
605 | unsigned int codec = (ctl->private_value >> 24) & 1; | 609 | unsigned int codec = (ctl->private_value >> 24) & 1; |
610 | int stereo = (ctl->private_value >> 16) & 1; | ||
606 | unsigned int index = ctl->private_value & 0xff; | 611 | unsigned int index = ctl->private_value & 0xff; |
607 | u16 oldreg, newreg; | 612 | u16 oldreg, newreg; |
608 | int change; | 613 | int change; |
@@ -612,8 +617,11 @@ static int ac97_volume_put(struct snd_kcontrol *ctl, | |||
612 | newreg = oldreg; | 617 | newreg = oldreg; |
613 | newreg = (newreg & ~0x1f) | | 618 | newreg = (newreg & ~0x1f) | |
614 | (31 - (value->value.integer.value[0] & 0x1f)); | 619 | (31 - (value->value.integer.value[0] & 0x1f)); |
615 | newreg = (newreg & ~0x1f00) | | 620 | if (stereo) |
616 | ((31 - (value->value.integer.value[0] & 0x1f)) << 8); | 621 | newreg = (newreg & ~0x1f00) | |
622 | ((31 - (value->value.integer.value[1] & 0x1f)) << 8); | ||
623 | else | ||
624 | newreg = (newreg & ~0x1f00) | ((newreg & 0x1f) << 8); | ||
617 | change = newreg != oldreg; | 625 | change = newreg != oldreg; |
618 | if (change) | 626 | if (change) |
619 | oxygen_write_ac97(chip, codec, index, newreg); | 627 | oxygen_write_ac97(chip, codec, index, newreg); |
@@ -673,7 +681,7 @@ static int ac97_fp_rec_volume_put(struct snd_kcontrol *ctl, | |||
673 | .private_value = ((codec) << 24) | ((invert) << 16) | \ | 681 | .private_value = ((codec) << 24) | ((invert) << 16) | \ |
674 | ((bitnr) << 8) | (index), \ | 682 | ((bitnr) << 8) | (index), \ |
675 | } | 683 | } |
676 | #define AC97_VOLUME(xname, codec, index) { \ | 684 | #define AC97_VOLUME(xname, codec, index, stereo) { \ |
677 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 685 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
678 | .name = xname, \ | 686 | .name = xname, \ |
679 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ | 687 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ |
@@ -682,7 +690,7 @@ static int ac97_fp_rec_volume_put(struct snd_kcontrol *ctl, | |||
682 | .get = ac97_volume_get, \ | 690 | .get = ac97_volume_get, \ |
683 | .put = ac97_volume_put, \ | 691 | .put = ac97_volume_put, \ |
684 | .tlv = { .p = ac97_db_scale, }, \ | 692 | .tlv = { .p = ac97_db_scale, }, \ |
685 | .private_value = ((codec) << 24) | (index), \ | 693 | .private_value = ((codec) << 24) | ((stereo) << 16) | (index), \ |
686 | } | 694 | } |
687 | 695 | ||
688 | static DECLARE_TLV_DB_SCALE(monitor_db_scale, -1000, 1000, 0); | 696 | static DECLARE_TLV_DB_SCALE(monitor_db_scale, -1000, 1000, 0); |
@@ -882,18 +890,18 @@ static const struct { | |||
882 | }; | 890 | }; |
883 | 891 | ||
884 | static const struct snd_kcontrol_new ac97_controls[] = { | 892 | static const struct snd_kcontrol_new ac97_controls[] = { |
885 | AC97_VOLUME("Mic Capture Volume", 0, AC97_MIC), | 893 | AC97_VOLUME("Mic Capture Volume", 0, AC97_MIC, 0), |
886 | AC97_SWITCH("Mic Capture Switch", 0, AC97_MIC, 15, 1), | 894 | AC97_SWITCH("Mic Capture Switch", 0, AC97_MIC, 15, 1), |
887 | AC97_SWITCH("Mic Boost (+20dB)", 0, AC97_MIC, 6, 0), | 895 | AC97_SWITCH("Mic Boost (+20dB)", 0, AC97_MIC, 6, 0), |
888 | AC97_SWITCH("Line Capture Switch", 0, AC97_LINE, 15, 1), | 896 | AC97_SWITCH("Line Capture Switch", 0, AC97_LINE, 15, 1), |
889 | AC97_VOLUME("CD Capture Volume", 0, AC97_CD), | 897 | AC97_VOLUME("CD Capture Volume", 0, AC97_CD, 1), |
890 | AC97_SWITCH("CD Capture Switch", 0, AC97_CD, 15, 1), | 898 | AC97_SWITCH("CD Capture Switch", 0, AC97_CD, 15, 1), |
891 | AC97_VOLUME("Aux Capture Volume", 0, AC97_AUX), | 899 | AC97_VOLUME("Aux Capture Volume", 0, AC97_AUX, 1), |
892 | AC97_SWITCH("Aux Capture Switch", 0, AC97_AUX, 15, 1), | 900 | AC97_SWITCH("Aux Capture Switch", 0, AC97_AUX, 15, 1), |
893 | }; | 901 | }; |
894 | 902 | ||
895 | static const struct snd_kcontrol_new ac97_fp_controls[] = { | 903 | static const struct snd_kcontrol_new ac97_fp_controls[] = { |
896 | AC97_VOLUME("Front Panel Playback Volume", 1, AC97_HEADPHONE), | 904 | AC97_VOLUME("Front Panel Playback Volume", 1, AC97_HEADPHONE, 1), |
897 | AC97_SWITCH("Front Panel Playback Switch", 1, AC97_HEADPHONE, 15, 1), | 905 | AC97_SWITCH("Front Panel Playback Switch", 1, AC97_HEADPHONE, 15, 1), |
898 | { | 906 | { |
899 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 907 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index bf971f7cfdc6..6ebcb6bdd712 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -635,6 +635,8 @@ static void xonar_d2_resume(struct oxygen *chip) | |||
635 | 635 | ||
636 | static void xonar_d1_resume(struct oxygen *chip) | 636 | static void xonar_d1_resume(struct oxygen *chip) |
637 | { | 637 | { |
638 | oxygen_set_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC); | ||
639 | msleep(1); | ||
638 | cs43xx_init(chip); | 640 | cs43xx_init(chip); |
639 | xonar_enable_output(chip); | 641 | xonar_enable_output(chip); |
640 | } | 642 | } |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 235a71e5ac8d..b5ca02e2038c 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -2197,9 +2197,12 @@ static int __init alsa_card_riptide_init(void) | |||
2197 | if (err < 0) | 2197 | if (err < 0) |
2198 | return err; | 2198 | return err; |
2199 | #if defined(SUPPORT_JOYSTICK) | 2199 | #if defined(SUPPORT_JOYSTICK) |
2200 | pci_register_driver(&joystick_driver); | 2200 | err = pci_register_driver(&joystick_driver); |
2201 | /* On failure unregister formerly registered audio driver */ | ||
2202 | if (err < 0) | ||
2203 | pci_unregister_driver(&driver); | ||
2201 | #endif | 2204 | #endif |
2202 | return 0; | 2205 | return err; |
2203 | } | 2206 | } |
2204 | 2207 | ||
2205 | static void __exit alsa_card_riptide_exit(void) | 2208 | static void __exit alsa_card_riptide_exit(void) |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index d7b966e7c4cf..f977dba7cbd0 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -227,12 +227,9 @@ struct rme32 { | |||
227 | }; | 227 | }; |
228 | 228 | ||
229 | static struct pci_device_id snd_rme32_ids[] = { | 229 | static struct pci_device_id snd_rme32_ids[] = { |
230 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, | 230 | {PCI_VDEVICE(XILINX_RME, PCI_DEVICE_ID_RME_DIGI32), 0,}, |
231 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | 231 | {PCI_VDEVICE(XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8), 0,}, |
232 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, | 232 | {PCI_VDEVICE(XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_PRO), 0,}, |
233 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | ||
234 | {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_PRO, | ||
235 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, | ||
236 | {0,} | 233 | {0,} |
237 | }; | 234 | }; |
238 | 235 | ||
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 55fb1c131f58..2ba5c0fd55db 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -232,14 +232,10 @@ struct rme96 { | |||
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct pci_device_id snd_rme96_ids[] = { | 234 | static struct pci_device_id snd_rme96_ids[] = { |
235 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, | 235 | { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_RME_DIGI96), 0, }, |
236 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 236 | { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_RME_DIGI96_8), 0, }, |
237 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, | 237 | { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PRO), 0, }, |
238 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 238 | { PCI_VDEVICE(XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST), 0, }, |
239 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PRO, | ||
240 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | ||
241 | { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST, | ||
242 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | ||
243 | { 0, } | 239 | { 0, } |
244 | }; | 240 | }; |
245 | 241 | ||
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 7dc60ad4772e..1f6406c4534d 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -243,7 +243,7 @@ struct sonicvibes { | |||
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct pci_device_id snd_sonic_ids[] = { | 245 | static struct pci_device_id snd_sonic_ids[] = { |
246 | { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 246 | { PCI_VDEVICE(S3, 0xca00), 0, }, |
247 | { 0, } | 247 | { 0, } |
248 | }; | 248 | }; |
249 | 249 | ||
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 949fcaf6b70e..acfa4760da49 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -402,9 +402,9 @@ struct via82xx { | |||
402 | 402 | ||
403 | static struct pci_device_id snd_via82xx_ids[] = { | 403 | static struct pci_device_id snd_via82xx_ids[] = { |
404 | /* 0x1106, 0x3058 */ | 404 | /* 0x1106, 0x3058 */ |
405 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ | 405 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C686_5), TYPE_CARD_VIA686, }, /* 686A */ |
406 | /* 0x1106, 0x3059 */ | 406 | /* 0x1106, 0x3059 */ |
407 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA8233, }, /* VT8233 */ | 407 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233_5), TYPE_CARD_VIA8233, }, /* VT8233 */ |
408 | { 0, } | 408 | { 0, } |
409 | }; | 409 | }; |
410 | 410 | ||
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 0d54e3503c1e..47eb61561dfc 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -261,7 +261,7 @@ struct via82xx_modem { | |||
261 | }; | 261 | }; |
262 | 262 | ||
263 | static struct pci_device_id snd_via82xx_modem_ids[] = { | 263 | static struct pci_device_id snd_via82xx_modem_ids[] = { |
264 | { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, | 264 | { PCI_VDEVICE(VIA, 0x3068), TYPE_CARD_VIA82XX_MODEM, }, |
265 | { 0, } | 265 | { 0, } |
266 | }; | 266 | }; |
267 | 267 | ||
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 4af66661f9b0..e6b18b90d451 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -67,12 +67,12 @@ module_param_array(rear_switch, bool, NULL, 0444); | |||
67 | MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); | 67 | MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); |
68 | 68 | ||
69 | static struct pci_device_id snd_ymfpci_ids[] = { | 69 | static struct pci_device_id snd_ymfpci_ids[] = { |
70 | { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ | 70 | { PCI_VDEVICE(YAMAHA, 0x0004), 0, }, /* YMF724 */ |
71 | { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ | 71 | { PCI_VDEVICE(YAMAHA, 0x000d), 0, }, /* YMF724F */ |
72 | { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ | 72 | { PCI_VDEVICE(YAMAHA, 0x000a), 0, }, /* YMF740 */ |
73 | { 0x1073, 0x000c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740C */ | 73 | { PCI_VDEVICE(YAMAHA, 0x000c), 0, }, /* YMF740C */ |
74 | { 0x1073, 0x0010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF744 */ | 74 | { PCI_VDEVICE(YAMAHA, 0x0010), 0, }, /* YMF744 */ |
75 | { 0x1073, 0x0012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF754 */ | 75 | { PCI_VDEVICE(YAMAHA, 0x0012), 0, }, /* YMF754 */ |
76 | { 0, } | 76 | { 0, } |
77 | }; | 77 | }; |
78 | 78 | ||
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index c05f71803aa8..8c0fdf84aac3 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
@@ -1037,14 +1037,14 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi) | |||
1037 | codec->control_data = spi; | 1037 | codec->control_data = spi; |
1038 | codec->dev = &spi->dev; | 1038 | codec->dev = &spi->dev; |
1039 | 1039 | ||
1040 | spi->dev.driver_data = wm8988; | 1040 | dev_set_drvdata(&spi->dev, wm8988); |
1041 | 1041 | ||
1042 | return wm8988_register(wm8988); | 1042 | return wm8988_register(wm8988); |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | static int __devexit wm8988_spi_remove(struct spi_device *spi) | 1045 | static int __devexit wm8988_spi_remove(struct spi_device *spi) |
1046 | { | 1046 | { |
1047 | struct wm8988_priv *wm8988 = spi->dev.driver_data; | 1047 | struct wm8988_priv *wm8988 = dev_get_drvdata(&spi->dev); |
1048 | 1048 | ||
1049 | wm8988_unregister(wm8988); | 1049 | wm8988_unregister(wm8988); |
1050 | 1050 | ||
diff --git a/sound/sound_core.c b/sound/sound_core.c index 12522e6913d9..a41f8b127f49 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/kdev_t.h> | ||
14 | #include <linux/major.h> | ||
13 | #include <sound/core.h> | 15 | #include <sound/core.h> |
14 | 16 | ||
15 | #ifdef CONFIG_SOUND_OSS_CORE | 17 | #ifdef CONFIG_SOUND_OSS_CORE |
@@ -29,6 +31,8 @@ MODULE_LICENSE("GPL"); | |||
29 | 31 | ||
30 | static char *sound_nodename(struct device *dev) | 32 | static char *sound_nodename(struct device *dev) |
31 | { | 33 | { |
34 | if (MAJOR(dev->devt) == SOUND_MAJOR) | ||
35 | return NULL; | ||
32 | return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); | 36 | return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); |
33 | } | 37 | } |
34 | 38 | ||
@@ -104,7 +108,6 @@ module_exit(cleanup_soundcore); | |||
104 | #include <linux/types.h> | 108 | #include <linux/types.h> |
105 | #include <linux/kernel.h> | 109 | #include <linux/kernel.h> |
106 | #include <linux/sound.h> | 110 | #include <linux/sound.h> |
107 | #include <linux/major.h> | ||
108 | #include <linux/kmod.h> | 111 | #include <linux/kmod.h> |
109 | 112 | ||
110 | #define SOUND_STEP 16 | 113 | #define SOUND_STEP 16 |
diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig index 523aec188ccf..73525c048e7f 100644 --- a/sound/usb/Kconfig +++ b/sound/usb/Kconfig | |||
@@ -48,6 +48,7 @@ config SND_USB_CAIAQ | |||
48 | * Native Instruments Kore Controller | 48 | * Native Instruments Kore Controller |
49 | * Native Instruments Kore Controller 2 | 49 | * Native Instruments Kore Controller 2 |
50 | * Native Instruments Audio Kontrol 1 | 50 | * Native Instruments Audio Kontrol 1 |
51 | * Native Instruments Audio 2 DJ | ||
51 | * Native Instruments Audio 4 DJ | 52 | * Native Instruments Audio 4 DJ |
52 | * Native Instruments Audio 8 DJ | 53 | * Native Instruments Audio 8 DJ |
53 | * Native Instruments Guitar Rig Session I/O | 54 | * Native Instruments Guitar Rig Session I/O |
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 8f9b60c5d74c..121af0644fd9 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -646,6 +646,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev) | |||
646 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_GUITARRIGMOBILE): | 646 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_GUITARRIGMOBILE): |
647 | dev->samplerates |= SNDRV_PCM_RATE_192000; | 647 | dev->samplerates |= SNDRV_PCM_RATE_192000; |
648 | /* fall thru */ | 648 | /* fall thru */ |
649 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO2DJ): | ||
649 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): | 650 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO4DJ): |
650 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ): | 651 | case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ): |
651 | dev->samplerates |= SNDRV_PCM_RATE_88200; | 652 | dev->samplerates |= SNDRV_PCM_RATE_88200; |
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index 0e5db719de24..83e6c1312d47 100644 --- a/sound/usb/caiaq/device.c +++ b/sound/usb/caiaq/device.c | |||
@@ -35,13 +35,14 @@ | |||
35 | #include "input.h" | 35 | #include "input.h" |
36 | 36 | ||
37 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); | 37 | MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>"); |
38 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.17"); | 38 | MODULE_DESCRIPTION("caiaq USB audio, version 1.3.19"); |
39 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
40 | MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," | 40 | MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2}," |
41 | "{Native Instruments, RigKontrol3}," | 41 | "{Native Instruments, RigKontrol3}," |
42 | "{Native Instruments, Kore Controller}," | 42 | "{Native Instruments, Kore Controller}," |
43 | "{Native Instruments, Kore Controller 2}," | 43 | "{Native Instruments, Kore Controller 2}," |
44 | "{Native Instruments, Audio Kontrol 1}," | 44 | "{Native Instruments, Audio Kontrol 1}," |
45 | "{Native Instruments, Audio 2 DJ}," | ||
45 | "{Native Instruments, Audio 4 DJ}," | 46 | "{Native Instruments, Audio 4 DJ}," |
46 | "{Native Instruments, Audio 8 DJ}," | 47 | "{Native Instruments, Audio 8 DJ}," |
47 | "{Native Instruments, Session I/O}," | 48 | "{Native Instruments, Session I/O}," |
@@ -121,6 +122,11 @@ static struct usb_device_id snd_usb_id_table[] = { | |||
121 | .idVendor = USB_VID_NATIVEINSTRUMENTS, | 122 | .idVendor = USB_VID_NATIVEINSTRUMENTS, |
122 | .idProduct = USB_PID_AUDIO4DJ | 123 | .idProduct = USB_PID_AUDIO4DJ |
123 | }, | 124 | }, |
125 | { | ||
126 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE, | ||
127 | .idVendor = USB_VID_NATIVEINSTRUMENTS, | ||
128 | .idProduct = USB_PID_AUDIO2DJ | ||
129 | }, | ||
124 | { /* terminator */ } | 130 | { /* terminator */ } |
125 | }; | 131 | }; |
126 | 132 | ||
@@ -349,7 +355,9 @@ static void __devinit setup_card(struct snd_usb_caiaqdev *dev) | |||
349 | log("Unable to set up control system (ret=%d)\n", ret); | 355 | log("Unable to set up control system (ret=%d)\n", ret); |
350 | } | 356 | } |
351 | 357 | ||
352 | static int create_card(struct usb_device* usb_dev, struct snd_card **cardp) | 358 | static int create_card(struct usb_device *usb_dev, |
359 | struct usb_interface *intf, | ||
360 | struct snd_card **cardp) | ||
353 | { | 361 | { |
354 | int devnum; | 362 | int devnum; |
355 | int err; | 363 | int err; |
@@ -374,7 +382,7 @@ static int create_card(struct usb_device* usb_dev, struct snd_card **cardp) | |||
374 | dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor), | 382 | dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor), |
375 | le16_to_cpu(usb_dev->descriptor.idProduct)); | 383 | le16_to_cpu(usb_dev->descriptor.idProduct)); |
376 | spin_lock_init(&dev->spinlock); | 384 | spin_lock_init(&dev->spinlock); |
377 | snd_card_set_dev(card, &usb_dev->dev); | 385 | snd_card_set_dev(card, &intf->dev); |
378 | 386 | ||
379 | *cardp = card; | 387 | *cardp = card; |
380 | return 0; | 388 | return 0; |
@@ -461,7 +469,7 @@ static int __devinit snd_probe(struct usb_interface *intf, | |||
461 | struct snd_card *card; | 469 | struct snd_card *card; |
462 | struct usb_device *device = interface_to_usbdev(intf); | 470 | struct usb_device *device = interface_to_usbdev(intf); |
463 | 471 | ||
464 | ret = create_card(device, &card); | 472 | ret = create_card(device, intf, &card); |
465 | 473 | ||
466 | if (ret < 0) | 474 | if (ret < 0) |
467 | return ret; | 475 | return ret; |
diff --git a/sound/usb/caiaq/device.h b/sound/usb/caiaq/device.h index ece73514854e..44e3edf88bef 100644 --- a/sound/usb/caiaq/device.h +++ b/sound/usb/caiaq/device.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define USB_PID_KORECONTROLLER 0x4711 | 10 | #define USB_PID_KORECONTROLLER 0x4711 |
11 | #define USB_PID_KORECONTROLLER2 0x4712 | 11 | #define USB_PID_KORECONTROLLER2 0x4712 |
12 | #define USB_PID_AK1 0x0815 | 12 | #define USB_PID_AK1 0x0815 |
13 | #define USB_PID_AUDIO2DJ 0x041c | ||
13 | #define USB_PID_AUDIO4DJ 0x0839 | 14 | #define USB_PID_AUDIO4DJ 0x0839 |
14 | #define USB_PID_AUDIO8DJ 0x1978 | 15 | #define USB_PID_AUDIO8DJ 0x1978 |
15 | #define USB_PID_SESSIONIO 0x1915 | 16 | #define USB_PID_SESSIONIO 0x1915 |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index c7b902358b7b..44b9cdc8a83b 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -2661,7 +2661,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) | |||
2661 | struct usb_interface_descriptor *altsd; | 2661 | struct usb_interface_descriptor *altsd; |
2662 | int i, altno, err, stream; | 2662 | int i, altno, err, stream; |
2663 | int format; | 2663 | int format; |
2664 | struct audioformat *fp; | 2664 | struct audioformat *fp = NULL; |
2665 | unsigned char *fmt, *csep; | 2665 | unsigned char *fmt, *csep; |
2666 | int num; | 2666 | int num; |
2667 | 2667 | ||
@@ -2734,6 +2734,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) | |||
2734 | continue; | 2734 | continue; |
2735 | } | 2735 | } |
2736 | 2736 | ||
2737 | /* | ||
2738 | * Blue Microphones workaround: The last altsetting is identical | ||
2739 | * with the previous one, except for a larger packet size, but | ||
2740 | * is actually a mislabeled two-channel setting; ignore it. | ||
2741 | */ | ||
2742 | if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 && | ||
2743 | fp && fp->altsetting == 1 && fp->channels == 1 && | ||
2744 | fp->format == SNDRV_PCM_FORMAT_S16_LE && | ||
2745 | le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) == | ||
2746 | fp->maxpacksize * 2) | ||
2747 | continue; | ||
2748 | |||
2737 | csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); | 2749 | csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); |
2738 | /* Creamware Noah has this descriptor after the 2nd endpoint */ | 2750 | /* Creamware Noah has this descriptor after the 2nd endpoint */ |
2739 | if (!csep && altsd->bNumEndpoints >= 2) | 2751 | if (!csep && altsd->bNumEndpoints >= 2) |
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 4bd3a7a0edc1..ec9cdf986928 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c | |||
@@ -990,20 +990,35 @@ static void build_feature_ctl(struct mixer_build *state, unsigned char *desc, | |||
990 | break; | 990 | break; |
991 | } | 991 | } |
992 | 992 | ||
993 | /* quirk for UDA1321/N101 */ | 993 | /* volume control quirks */ |
994 | /* note that detection between firmware 2.1.1.7 (N101) and later 2.1.1.21 */ | ||
995 | /* is not very clear from datasheets */ | ||
996 | /* I hope that the min value is -15360 for newer firmware --jk */ | ||
997 | switch (state->chip->usb_id) { | 994 | switch (state->chip->usb_id) { |
998 | case USB_ID(0x0471, 0x0101): | 995 | case USB_ID(0x0471, 0x0101): |
999 | case USB_ID(0x0471, 0x0104): | 996 | case USB_ID(0x0471, 0x0104): |
1000 | case USB_ID(0x0471, 0x0105): | 997 | case USB_ID(0x0471, 0x0105): |
1001 | case USB_ID(0x0672, 0x1041): | 998 | case USB_ID(0x0672, 0x1041): |
999 | /* quirk for UDA1321/N101. | ||
1000 | * note that detection between firmware 2.1.1.7 (N101) | ||
1001 | * and later 2.1.1.21 is not very clear from datasheets. | ||
1002 | * I hope that the min value is -15360 for newer firmware --jk | ||
1003 | */ | ||
1002 | if (!strcmp(kctl->id.name, "PCM Playback Volume") && | 1004 | if (!strcmp(kctl->id.name, "PCM Playback Volume") && |
1003 | cval->min == -15616) { | 1005 | cval->min == -15616) { |
1004 | snd_printk(KERN_INFO "using volume control quirk for the UDA1321/N101 chip\n"); | 1006 | snd_printk(KERN_INFO |
1007 | "set volume quirk for UDA1321/N101 chip\n"); | ||
1005 | cval->max = -256; | 1008 | cval->max = -256; |
1006 | } | 1009 | } |
1010 | break; | ||
1011 | |||
1012 | case USB_ID(0x046d, 0x09a4): | ||
1013 | if (!strcmp(kctl->id.name, "Mic Capture Volume")) { | ||
1014 | snd_printk(KERN_INFO | ||
1015 | "set volume quirk for QuickCam E3500\n"); | ||
1016 | cval->min = 6080; | ||
1017 | cval->max = 8768; | ||
1018 | cval->res = 192; | ||
1019 | } | ||
1020 | break; | ||
1021 | |||
1007 | } | 1022 | } |
1008 | 1023 | ||
1009 | snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n", | 1024 | snd_printdd(KERN_INFO "[%d] FU [%s] ch = %d, val = %d/%d/%d\n", |
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index a5aae9d67f31..fd44946ce4b3 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c | |||
@@ -514,7 +514,6 @@ static int usx2y_create_card(struct usb_device *device, struct snd_card **cardp) | |||
514 | US122L(card)->chip.dev->bus->busnum, | 514 | US122L(card)->chip.dev->bus->busnum, |
515 | US122L(card)->chip.dev->devnum | 515 | US122L(card)->chip.dev->devnum |
516 | ); | 516 | ); |
517 | snd_card_set_dev(card, &device->dev); | ||
518 | *cardp = card; | 517 | *cardp = card; |
519 | return 0; | 518 | return 0; |
520 | } | 519 | } |
@@ -531,6 +530,7 @@ static int us122l_usb_probe(struct usb_interface *intf, | |||
531 | if (err < 0) | 530 | if (err < 0) |
532 | return err; | 531 | return err; |
533 | 532 | ||
533 | snd_card_set_dev(card, &intf->dev); | ||
534 | if (!us122l_create_card(card)) { | 534 | if (!us122l_create_card(card)) { |
535 | snd_card_free(card); | 535 | snd_card_free(card); |
536 | return -EINVAL; | 536 | return -EINVAL; |
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index 5ce0da23ee96..cb4bb8373ca2 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c | |||
@@ -364,7 +364,6 @@ static int usX2Y_create_card(struct usb_device *device, struct snd_card **cardp) | |||
364 | 0,//us428(card)->usbmidi.ifnum, | 364 | 0,//us428(card)->usbmidi.ifnum, |
365 | usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum | 365 | usX2Y(card)->chip.dev->bus->busnum, usX2Y(card)->chip.dev->devnum |
366 | ); | 366 | ); |
367 | snd_card_set_dev(card, &device->dev); | ||
368 | *cardp = card; | 367 | *cardp = card; |
369 | return 0; | 368 | return 0; |
370 | } | 369 | } |
@@ -388,6 +387,7 @@ static int usX2Y_usb_probe(struct usb_device *device, | |||
388 | err = usX2Y_create_card(device, &card); | 387 | err = usX2Y_create_card(device, &card); |
389 | if (err < 0) | 388 | if (err < 0) |
390 | return err; | 389 | return err; |
390 | snd_card_set_dev(card, &intf->dev); | ||
391 | if ((err = usX2Y_hwdep_new(card, device)) < 0 || | 391 | if ((err = usX2Y_hwdep_new(card, device)) < 0 || |
392 | (err = snd_card_register(card)) < 0) { | 392 | (err = snd_card_register(card)) < 0) { |
393 | snd_card_free(card); | 393 | snd_card_free(card); |
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index dd1ab6177840..9efd27f6b52f 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -296,9 +296,10 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y, | |||
296 | static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, | 296 | static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, |
297 | struct snd_usX2Y_substream *subs, struct urb *urb) | 297 | struct snd_usX2Y_substream *subs, struct urb *urb) |
298 | { | 298 | { |
299 | snd_printk(KERN_ERR "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" | 299 | snd_printk(KERN_ERR |
300 | KERN_ERR "Most propably some urb of usb-frame %i is still missing.\n" | 300 | "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" |
301 | KERN_ERR "Cause could be too long delays in usb-hcd interrupt handling.\n", | 301 | "Most propably some urb of usb-frame %i is still missing.\n" |
302 | "Cause could be too long delays in usb-hcd interrupt handling.\n", | ||
302 | usb_get_current_frame_number(usX2Y->chip.dev), | 303 | usb_get_current_frame_number(usX2Y->chip.dev), |
303 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", | 304 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", |
304 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); | 305 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); |