aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
committerJiri Kosina <jkosina@suse.cz>2010-06-16 12:08:13 -0400
commitf1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch)
treec2c130a74be25b0b2dff992e1a195e2728bdaadd /sound/pci
parentfd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff)
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff)
Merge branch 'master' into for-next
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/asihpi/asihpi.c3
-rw-r--r--sound/pci/asihpi/hpi.h8
-rw-r--r--sound/pci/asihpi/hpi6000.c6
-rw-r--r--sound/pci/asihpi/hpi6205.c21
-rw-r--r--sound/pci/asihpi/hpi_internal.h5
-rw-r--r--sound/pci/asihpi/hpicmn.c38
-rw-r--r--sound/pci/asihpi/hpifunc.c17
-rw-r--r--sound/pci/asihpi/hpios.c23
-rw-r--r--sound/pci/asihpi/hpios.h9
-rw-r--r--sound/pci/aw2/aw2-alsa.c11
-rw-r--r--sound/pci/emu10k1/emufx.c36
-rw-r--r--sound/pci/hda/hda_intel.c18
-rw-r--r--sound/pci/hda/patch_conexant.c2
-rw-r--r--sound/pci/hda/patch_realtek.c88
-rw-r--r--sound/pci/hda/patch_sigmatel.c2
15 files changed, 146 insertions, 141 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index f74c7372b3d1..1db586af4f9c 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -2578,6 +2578,9 @@ static int __devinit snd_card_asihpi_mixer_new(struct snd_card_asihpi *asihpi)
2578 if (err) 2578 if (err)
2579 return -err; 2579 return -err;
2580 2580
2581 memset(&prev_ctl, 0, sizeof(prev_ctl));
2582 prev_ctl.control_type = -1;
2583
2581 for (idx = 0; idx < 2000; idx++) { 2584 for (idx = 0; idx < 2000; idx++) {
2582 err = hpi_mixer_get_control_by_index( 2585 err = hpi_mixer_get_control_by_index(
2583 ss, asihpi->h_mixer, 2586 ss, asihpi->h_mixer,
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h
index 99400de6c075..0173bbe62b67 100644
--- a/sound/pci/asihpi/hpi.h
+++ b/sound/pci/asihpi/hpi.h
@@ -50,7 +50,7 @@ i.e 3.05.02 is a development version
50#define HPI_VER_RELEASE(v) ((int)(v & 0xFF)) 50#define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
51 51
52/* Use single digits for versions less that 10 to avoid octal. */ 52/* Use single digits for versions less that 10 to avoid octal. */
53#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 18) 53#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 3, 25)
54 54
55/* Library version as documented in hpi-api-versions.txt */ 55/* Library version as documented in hpi-api-versions.txt */
56#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0) 56#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0)
@@ -1632,6 +1632,12 @@ u16 hpi_tuner_get_hd_radio_sdk_version(const struct hpi_hsubsys *ph_subsys,
1632u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys, 1632u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
1633 u32 h_control, u32 *pquality); 1633 u32 h_control, u32 *pquality);
1634 1634
1635u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1636 u32 h_control, u32 *pblend);
1637
1638u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1639 u32 h_control, const u32 blend);
1640
1635/****************************/ 1641/****************************/
1636/* PADs control */ 1642/* PADs control */
1637/****************************/ 1643/****************************/
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c
index 839ecb2e4b64..12dab5e4892c 100644
--- a/sound/pci/asihpi/hpi6000.c
+++ b/sound/pci/asihpi/hpi6000.c
@@ -691,9 +691,6 @@ static short hpi6000_adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
691 case 0x6200: 691 case 0x6200:
692 boot_load_family = HPI_ADAPTER_FAMILY_ASI(0x6200); 692 boot_load_family = HPI_ADAPTER_FAMILY_ASI(0x6200);
693 break; 693 break;
694 case 0x8800:
695 boot_load_family = HPI_ADAPTER_FAMILY_ASI(0x8800);
696 break;
697 default: 694 default:
698 return HPI6000_ERROR_UNHANDLED_SUBSYS_ID; 695 return HPI6000_ERROR_UNHANDLED_SUBSYS_ID;
699 } 696 }
@@ -1775,7 +1772,6 @@ static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
1775 u16 error = 0; 1772 u16 error = 0;
1776 u16 dsp_index = 0; 1773 u16 dsp_index = 0;
1777 u16 num_dsp = ((struct hpi_hw_obj *)pao->priv)->num_dsp; 1774 u16 num_dsp = ((struct hpi_hw_obj *)pao->priv)->num_dsp;
1778 hpios_dsplock_lock(pao);
1779 1775
1780 if (num_dsp < 2) 1776 if (num_dsp < 2)
1781 dsp_index = 0; 1777 dsp_index = 0;
@@ -1796,6 +1792,8 @@ static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
1796 } 1792 }
1797 } 1793 }
1798 } 1794 }
1795
1796 hpios_dsplock_lock(pao);
1799 error = hpi6000_message_response_sequence(pao, dsp_index, phm, phr); 1797 error = hpi6000_message_response_sequence(pao, dsp_index, phm, phr);
1800 1798
1801 /* maybe an error response */ 1799 /* maybe an error response */
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index 5e88c1fc2b9e..e89991ea3543 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -966,23 +966,16 @@ static void outstream_write(struct hpi_adapter_obj *pao,
966 status = &interface->outstream_host_buffer_status[phm->obj_index]; 966 status = &interface->outstream_host_buffer_status[phm->obj_index];
967 967
968 if (phw->flag_outstream_just_reset[phm->obj_index]) { 968 if (phw->flag_outstream_just_reset[phm->obj_index]) {
969 /* Format can only change after reset. Must tell DSP. */
970 u16 function = phm->function;
971 phw->flag_outstream_just_reset[phm->obj_index] = 0;
972 phm->function = HPI_OSTREAM_SET_FORMAT;
973 hw_message(pao, phm, phr); /* send the format to the DSP */
974 phm->function = function;
975 if (phr->error)
976 return;
977 }
978#if 1
979 if (phw->flag_outstream_just_reset[phm->obj_index]) {
980 /* First OutStremWrite() call following reset will write data to the 969 /* First OutStremWrite() call following reset will write data to the
981 adapter's buffers, reducing delay before stream can start 970 adapter's buffers, reducing delay before stream can start. The DSP
971 takes care of setting the stream data format using format information
972 embedded in phm.
982 */ 973 */
983 int partial_write = 0; 974 int partial_write = 0;
984 unsigned int original_size = 0; 975 unsigned int original_size = 0;
985 976
977 phw->flag_outstream_just_reset[phm->obj_index] = 0;
978
986 /* Send the first buffer to the DSP the old way. */ 979 /* Send the first buffer to the DSP the old way. */
987 /* Limit size of first transfer - */ 980 /* Limit size of first transfer - */
988 /* expect that this will not usually be triggered. */ 981 /* expect that this will not usually be triggered. */
@@ -1012,7 +1005,6 @@ static void outstream_write(struct hpi_adapter_obj *pao,
1012 original_size - HPI6205_SIZEOF_DATA; 1005 original_size - HPI6205_SIZEOF_DATA;
1013 phm->u.d.u.data.pb_data += HPI6205_SIZEOF_DATA; 1006 phm->u.d.u.data.pb_data += HPI6205_SIZEOF_DATA;
1014 } 1007 }
1015#endif
1016 1008
1017 space_available = outstream_get_space_available(status); 1009 space_available = outstream_get_space_available(status);
1018 if (space_available < (long)phm->u.d.u.data.data_size) { 1010 if (space_available < (long)phm->u.d.u.data.data_size) {
@@ -1369,6 +1361,9 @@ static u16 adapter_boot_load_dsp(struct hpi_adapter_obj *pao,
1369 case HPI_ADAPTER_FAMILY_ASI(0x6500): 1361 case HPI_ADAPTER_FAMILY_ASI(0x6500):
1370 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6600); 1362 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x6600);
1371 break; 1363 break;
1364 case HPI_ADAPTER_FAMILY_ASI(0x8800):
1365 firmware_id = HPI_ADAPTER_FAMILY_ASI(0x8900);
1366 break;
1372 } 1367 }
1373 boot_code_id[1] = firmware_id; 1368 boot_code_id[1] = firmware_id;
1374 1369
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h
index f1cd6f1a0d44..fdd0ce02aa68 100644
--- a/sound/pci/asihpi/hpi_internal.h
+++ b/sound/pci/asihpi/hpi_internal.h
@@ -232,6 +232,8 @@ enum HPI_BUSES {
232#define HPI_TUNER_HDRADIO_SDK_VERSION HPI_CTL_ATTR(TUNER, 13) 232#define HPI_TUNER_HDRADIO_SDK_VERSION HPI_CTL_ATTR(TUNER, 13)
233/** HD Radio DSP firmware version. */ 233/** HD Radio DSP firmware version. */
234#define HPI_TUNER_HDRADIO_DSP_VERSION HPI_CTL_ATTR(TUNER, 14) 234#define HPI_TUNER_HDRADIO_DSP_VERSION HPI_CTL_ATTR(TUNER, 14)
235/** HD Radio signal blend (force analog, or automatic). */
236#define HPI_TUNER_HDRADIO_BLEND HPI_CTL_ATTR(TUNER, 15)
235 237
236/** \} */ 238/** \} */
237 239
@@ -478,8 +480,10 @@ Threshold is a -ve number in units of dB/100,
478 480
479/** First 2 hex digits define the adapter family */ 481/** First 2 hex digits define the adapter family */
480#define HPI_ADAPTER_FAMILY_MASK 0xff00 482#define HPI_ADAPTER_FAMILY_MASK 0xff00
483#define HPI_MODULE_FAMILY_MASK 0xfff0
481 484
482#define HPI_ADAPTER_FAMILY_ASI(f) (f & HPI_ADAPTER_FAMILY_MASK) 485#define HPI_ADAPTER_FAMILY_ASI(f) (f & HPI_ADAPTER_FAMILY_MASK)
486#define HPI_MODULE_FAMILY_ASI(f) (f & HPI_MODULE_FAMILY_MASK)
483#define HPI_ADAPTER_ASI(f) (f) 487#define HPI_ADAPTER_ASI(f) (f)
484 488
485/******************************************* message types */ 489/******************************************* message types */
@@ -970,6 +974,7 @@ struct hpi_control_union_msg {
970 u32 mode; 974 u32 mode;
971 u32 value; 975 u32 value;
972 } mode; 976 } mode;
977 u32 blend;
973 } tuner; 978 } tuner;
974 } u; 979 } u;
975}; 980};
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c
index 565102cae4f8..fcd64539d9ef 100644
--- a/sound/pci/asihpi/hpicmn.c
+++ b/sound/pci/asihpi/hpicmn.c
@@ -347,20 +347,15 @@ short hpi_check_control_cache(struct hpi_control_cache *p_cache,
347 found = 0; 347 found = 0;
348 break; 348 break;
349 case HPI_CONTROL_TUNER: 349 case HPI_CONTROL_TUNER:
350 { 350 if (phm->u.c.attribute == HPI_TUNER_FREQ)
351 struct hpi_control_cache_single *pCT = 351 phr->u.c.param1 = pC->u.t.freq_ink_hz;
352 (struct hpi_control_cache_single *)pI; 352 else if (phm->u.c.attribute == HPI_TUNER_BAND)
353 if (phm->u.c.attribute == HPI_TUNER_FREQ) 353 phr->u.c.param1 = pC->u.t.band;
354 phr->u.c.param1 = pCT->u.t.freq_ink_hz; 354 else if ((phm->u.c.attribute == HPI_TUNER_LEVEL)
355 else if (phm->u.c.attribute == HPI_TUNER_BAND) 355 && (phm->u.c.param1 == HPI_TUNER_LEVEL_AVERAGE))
356 phr->u.c.param1 = pCT->u.t.band; 356 phr->u.c.param1 = pC->u.t.level;
357 else if ((phm->u.c.attribute == HPI_TUNER_LEVEL) 357 else
358 && (phm->u.c.param1 == 358 found = 0;
359 HPI_TUNER_LEVEL_AVERAGE))
360 phr->u.c.param1 = pCT->u.t.level;
361 else
362 found = 0;
363 }
364 break; 359 break;
365 case HPI_CONTROL_AESEBU_RECEIVER: 360 case HPI_CONTROL_AESEBU_RECEIVER:
366 if (phm->u.c.attribute == HPI_AESEBURX_ERRORSTATUS) 361 if (phm->u.c.attribute == HPI_AESEBURX_ERRORSTATUS)
@@ -503,6 +498,9 @@ void hpi_sync_control_cache(struct hpi_control_cache *p_cache,
503 struct hpi_control_cache_single *pC; 498 struct hpi_control_cache_single *pC;
504 struct hpi_control_cache_info *pI; 499 struct hpi_control_cache_info *pI;
505 500
501 if (phr->error)
502 return;
503
506 if (!find_control(phm, p_cache, &pI, &control_index)) 504 if (!find_control(phm, p_cache, &pI, &control_index))
507 return; 505 return;
508 506
@@ -520,8 +518,6 @@ void hpi_sync_control_cache(struct hpi_control_cache *p_cache,
520 break; 518 break;
521 case HPI_CONTROL_MULTIPLEXER: 519 case HPI_CONTROL_MULTIPLEXER:
522 /* mux does not return its setting on Set command. */ 520 /* mux does not return its setting on Set command. */
523 if (phr->error)
524 return;
525 if (phm->u.c.attribute == HPI_MULTIPLEXER_SOURCE) { 521 if (phm->u.c.attribute == HPI_MULTIPLEXER_SOURCE) {
526 pC->u.x.source_node_type = (u16)phm->u.c.param1; 522 pC->u.x.source_node_type = (u16)phm->u.c.param1;
527 pC->u.x.source_node_index = (u16)phm->u.c.param2; 523 pC->u.x.source_node_index = (u16)phm->u.c.param2;
@@ -529,8 +525,6 @@ void hpi_sync_control_cache(struct hpi_control_cache *p_cache,
529 break; 525 break;
530 case HPI_CONTROL_CHANNEL_MODE: 526 case HPI_CONTROL_CHANNEL_MODE:
531 /* mode does not return its setting on Set command. */ 527 /* mode does not return its setting on Set command. */
532 if (phr->error)
533 return;
534 if (phm->u.c.attribute == HPI_CHANNEL_MODE_MODE) 528 if (phm->u.c.attribute == HPI_CHANNEL_MODE_MODE)
535 pC->u.m.mode = (u16)phm->u.c.param1; 529 pC->u.m.mode = (u16)phm->u.c.param1;
536 break; 530 break;
@@ -545,20 +539,14 @@ void hpi_sync_control_cache(struct hpi_control_cache *p_cache,
545 pC->u.phantom_power.state = (u16)phm->u.c.param1; 539 pC->u.phantom_power.state = (u16)phm->u.c.param1;
546 break; 540 break;
547 case HPI_CONTROL_AESEBU_TRANSMITTER: 541 case HPI_CONTROL_AESEBU_TRANSMITTER:
548 if (phr->error)
549 return;
550 if (phm->u.c.attribute == HPI_AESEBUTX_FORMAT) 542 if (phm->u.c.attribute == HPI_AESEBUTX_FORMAT)
551 pC->u.aes3tx.format = phm->u.c.param1; 543 pC->u.aes3tx.format = phm->u.c.param1;
552 break; 544 break;
553 case HPI_CONTROL_AESEBU_RECEIVER: 545 case HPI_CONTROL_AESEBU_RECEIVER:
554 if (phr->error)
555 return;
556 if (phm->u.c.attribute == HPI_AESEBURX_FORMAT) 546 if (phm->u.c.attribute == HPI_AESEBURX_FORMAT)
557 pC->u.aes3rx.source = phm->u.c.param1; 547 pC->u.aes3rx.source = phm->u.c.param1;
558 break; 548 break;
559 case HPI_CONTROL_SAMPLECLOCK: 549 case HPI_CONTROL_SAMPLECLOCK:
560 if (phr->error)
561 return;
562 if (phm->u.c.attribute == HPI_SAMPLECLOCK_SOURCE) 550 if (phm->u.c.attribute == HPI_SAMPLECLOCK_SOURCE)
563 pC->u.clk.source = (u16)phm->u.c.param1; 551 pC->u.clk.source = (u16)phm->u.c.param1;
564 else if (phm->u.c.attribute == HPI_SAMPLECLOCK_SOURCE_INDEX) 552 else if (phm->u.c.attribute == HPI_SAMPLECLOCK_SOURCE_INDEX)
@@ -590,7 +578,7 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32
590 578
591void hpi_free_control_cache(struct hpi_control_cache *p_cache) 579void hpi_free_control_cache(struct hpi_control_cache *p_cache)
592{ 580{
593 if ((p_cache->init) && (p_cache->p_info)) { 581 if (p_cache->init) {
594 kfree(p_cache->p_info); 582 kfree(p_cache->p_info);
595 p_cache->p_info = NULL; 583 p_cache->p_info = NULL;
596 p_cache->init = 0; 584 p_cache->init = 0;
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c
index eda26b312324..298eef3e20e9 100644
--- a/sound/pci/asihpi/hpifunc.c
+++ b/sound/pci/asihpi/hpifunc.c
@@ -2946,6 +2946,20 @@ u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
2946 HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL); 2946 HPI_TUNER_HDRADIO_SIGNAL_QUALITY, 0, 0, pquality, NULL);
2947} 2947}
2948 2948
2949u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
2950 u32 h_control, u32 *pblend)
2951{
2952 return hpi_control_param_get(ph_subsys, h_control,
2953 HPI_TUNER_HDRADIO_BLEND, 0, 0, pblend, NULL);
2954}
2955
2956u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
2957 u32 h_control, const u32 blend)
2958{
2959 return hpi_control_param_set(ph_subsys, h_control,
2960 HPI_TUNER_HDRADIO_BLEND, blend, 0);
2961}
2962
2949u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control, 2963u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
2950 char *p_data) 2964 char *p_data)
2951{ 2965{
@@ -3266,8 +3280,7 @@ u16 hpi_entity_find_next(struct hpi_entity *container_entity,
3266 3280
3267void hpi_entity_free(struct hpi_entity *entity) 3281void hpi_entity_free(struct hpi_entity *entity)
3268{ 3282{
3269 if (entity != NULL) 3283 kfree(entity);
3270 kfree(entity);
3271} 3284}
3272 3285
3273static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src, 3286static u16 hpi_entity_alloc_and_copy(struct hpi_entity *src,
diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c
index de615cfdb950..742ee12a9e17 100644
--- a/sound/pci/asihpi/hpios.c
+++ b/sound/pci/asihpi/hpios.c
@@ -89,26 +89,3 @@ u16 hpios_locked_mem_free(struct consistent_dma_area *p_mem_area)
89void hpios_locked_mem_free_all(void) 89void hpios_locked_mem_free_all(void)
90{ 90{
91} 91}
92
93void __iomem *hpios_map_io(struct pci_dev *pci_dev, int idx,
94 unsigned int length)
95{
96 HPI_DEBUG_LOG(DEBUG, "mapping %d %s %08llx-%08llx %04llx len 0x%x\n",
97 idx, pci_dev->resource[idx].name,
98 (unsigned long long)pci_resource_start(pci_dev, idx),
99 (unsigned long long)pci_resource_end(pci_dev, idx),
100 (unsigned long long)pci_resource_flags(pci_dev, idx), length);
101
102 if (!(pci_resource_flags(pci_dev, idx) & IORESOURCE_MEM)) {
103 HPI_DEBUG_LOG(ERROR, "not an io memory resource\n");
104 return NULL;
105 }
106
107 if (length > pci_resource_len(pci_dev, idx)) {
108 HPI_DEBUG_LOG(ERROR, "resource too small for requested %d \n",
109 length);
110 return NULL;
111 }
112
113 return ioremap(pci_resource_start(pci_dev, idx), length);
114}
diff --git a/sound/pci/asihpi/hpios.h b/sound/pci/asihpi/hpios.h
index a62c3f1e5f09..370f39b43f85 100644
--- a/sound/pci/asihpi/hpios.h
+++ b/sound/pci/asihpi/hpios.h
@@ -166,13 +166,4 @@ struct hpi_adapter {
166 void __iomem *ap_remapped_mem_base[HPI_MAX_ADAPTER_MEM_SPACES]; 166 void __iomem *ap_remapped_mem_base[HPI_MAX_ADAPTER_MEM_SPACES];
167}; 167};
168 168
169static inline void hpios_unmap_io(void __iomem *addr,
170 unsigned long size)
171{
172 iounmap(addr);
173}
174
175void __iomem *hpios_map_io(struct pci_dev *pci_dev, int idx,
176 unsigned int length);
177
178#endif 169#endif
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 67921f93a41e..c15002242d98 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -26,7 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <asm/io.h> 29#include <linux/io.h>
30#include <sound/core.h> 30#include <sound/core.h>
31#include <sound/initval.h> 31#include <sound/initval.h>
32#include <sound/pcm.h> 32#include <sound/pcm.h>
@@ -44,9 +44,6 @@ MODULE_LICENSE("GPL");
44/********************************* 44/*********************************
45 * DEFINES 45 * DEFINES
46 ********************************/ 46 ********************************/
47#define PCI_VENDOR_ID_SAA7146 0x1131
48#define PCI_DEVICE_ID_SAA7146 0x7146
49
50#define CTL_ROUTE_ANALOG 0 47#define CTL_ROUTE_ANALOG 0
51#define CTL_ROUTE_DIGITAL 1 48#define CTL_ROUTE_DIGITAL 1
52 49
@@ -165,7 +162,7 @@ module_param_array(enable, bool, NULL, 0444);
165MODULE_PARM_DESC(enable, "Enable Audiowerk2 soundcard."); 162MODULE_PARM_DESC(enable, "Enable Audiowerk2 soundcard.");
166 163
167static DEFINE_PCI_DEVICE_TABLE(snd_aw2_ids) = { 164static DEFINE_PCI_DEVICE_TABLE(snd_aw2_ids) = {
168 {PCI_VENDOR_ID_SAA7146, PCI_DEVICE_ID_SAA7146, 0, 0, 165 {PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_PHILIPS_SAA7146, 0, 0,
169 0, 0, 0}, 166 0, 0, 0},
170 {0} 167 {0}
171}; 168};
@@ -419,7 +416,7 @@ static int snd_aw2_pcm_playback_open(struct snd_pcm_substream *substream)
419{ 416{
420 struct snd_pcm_runtime *runtime = substream->runtime; 417 struct snd_pcm_runtime *runtime = substream->runtime;
421 418
422 snd_printdd(KERN_DEBUG "aw2: Playback_open \n"); 419 snd_printdd(KERN_DEBUG "aw2: Playback_open\n");
423 runtime->hw = snd_aw2_playback_hw; 420 runtime->hw = snd_aw2_playback_hw;
424 return 0; 421 return 0;
425} 422}
@@ -435,7 +432,7 @@ static int snd_aw2_pcm_capture_open(struct snd_pcm_substream *substream)
435{ 432{
436 struct snd_pcm_runtime *runtime = substream->runtime; 433 struct snd_pcm_runtime *runtime = substream->runtime;
437 434
438 snd_printdd(KERN_DEBUG "aw2: Capture_open \n"); 435 snd_printdd(KERN_DEBUG "aw2: Capture_open\n");
439 runtime->hw = snd_aw2_capture_hw; 436 runtime->hw = snd_aw2_capture_hw;
440 return 0; 437 return 0;
441} 438}
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 4b302d86f5f2..7a9401462c1c 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -35,6 +35,7 @@
35#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
36#include <linux/init.h> 36#include <linux/init.h>
37#include <linux/mutex.h> 37#include <linux/mutex.h>
38#include <linux/moduleparam.h>
38 39
39#include <sound/core.h> 40#include <sound/core.h>
40#include <sound/tlv.h> 41#include <sound/tlv.h>
@@ -50,6 +51,10 @@
50#define EMU10K1_CENTER_LFE_FROM_FRONT 51#define EMU10K1_CENTER_LFE_FROM_FRONT
51#endif 52#endif
52 53
54static bool high_res_gpr_volume;
55module_param(high_res_gpr_volume, bool, 0444);
56MODULE_PARM_DESC(high_res_gpr_volume, "GPR mixer controls use 31-bit range.");
57
53/* 58/*
54 * Tables 59 * Tables
55 */ 60 */
@@ -296,6 +301,7 @@ static const u32 db_table[101] = {
296 301
297/* EMU10k1/EMU10k2 DSP control db gain */ 302/* EMU10k1/EMU10k2 DSP control db gain */
298static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); 303static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1);
304static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0);
299 305
300static const u32 onoff_table[2] = { 306static const u32 onoff_table[2] = {
301 0x00000000, 0x00000001 307 0x00000000, 0x00000001
@@ -1072,10 +1078,17 @@ snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1072 strcpy(ctl->id.name, name); 1078 strcpy(ctl->id.name, name);
1073 ctl->vcount = ctl->count = 1; 1079 ctl->vcount = ctl->count = 1;
1074 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; 1080 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1075 ctl->min = 0; 1081 if (high_res_gpr_volume) {
1076 ctl->max = 100; 1082 ctl->min = 0;
1077 ctl->tlv = snd_emu10k1_db_scale1; 1083 ctl->max = 0x7fffffff;
1078 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; 1084 ctl->tlv = snd_emu10k1_db_linear;
1085 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE;
1086 } else {
1087 ctl->min = 0;
1088 ctl->max = 100;
1089 ctl->tlv = snd_emu10k1_db_scale1;
1090 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
1091 }
1079} 1092}
1080 1093
1081static void __devinit 1094static void __devinit
@@ -1087,10 +1100,17 @@ snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl,
1087 ctl->vcount = ctl->count = 2; 1100 ctl->vcount = ctl->count = 2;
1088 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; 1101 ctl->gpr[0] = gpr + 0; ctl->value[0] = defval;
1089 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval; 1102 ctl->gpr[1] = gpr + 1; ctl->value[1] = defval;
1090 ctl->min = 0; 1103 if (high_res_gpr_volume) {
1091 ctl->max = 100; 1104 ctl->min = 0;
1092 ctl->tlv = snd_emu10k1_db_scale1; 1105 ctl->max = 0x7fffffff;
1093 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; 1106 ctl->tlv = snd_emu10k1_db_linear;
1107 ctl->translation = EMU10K1_GPR_TRANSLATION_NONE;
1108 } else {
1109 ctl->min = 0;
1110 ctl->max = 100;
1111 ctl->tlv = snd_emu10k1_db_scale1;
1112 ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100;
1113 }
1094} 1114}
1095 1115
1096static void __devinit 1116static void __devinit
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 170610e1d7da..1df25cf5ce38 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1097,6 +1097,7 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
1097 struct azx *chip = dev_id; 1097 struct azx *chip = dev_id;
1098 struct azx_dev *azx_dev; 1098 struct azx_dev *azx_dev;
1099 u32 status; 1099 u32 status;
1100 u8 sd_status;
1100 int i, ok; 1101 int i, ok;
1101 1102
1102 spin_lock(&chip->reg_lock); 1103 spin_lock(&chip->reg_lock);
@@ -1110,8 +1111,10 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
1110 for (i = 0; i < chip->num_streams; i++) { 1111 for (i = 0; i < chip->num_streams; i++) {
1111 azx_dev = &chip->azx_dev[i]; 1112 azx_dev = &chip->azx_dev[i];
1112 if (status & azx_dev->sd_int_sta_mask) { 1113 if (status & azx_dev->sd_int_sta_mask) {
1114 sd_status = azx_sd_readb(azx_dev, SD_STS);
1113 azx_sd_writeb(azx_dev, SD_STS, SD_INT_MASK); 1115 azx_sd_writeb(azx_dev, SD_STS, SD_INT_MASK);
1114 if (!azx_dev->substream || !azx_dev->running) 1116 if (!azx_dev->substream || !azx_dev->running ||
1117 !(sd_status & SD_INT_COMPLETE))
1115 continue; 1118 continue;
1116 /* check whether this IRQ is really acceptable */ 1119 /* check whether this IRQ is really acceptable */
1117 ok = azx_position_ok(chip, azx_dev); 1120 ok = azx_position_ok(chip, azx_dev);
@@ -1910,11 +1913,11 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
1910 if (WARN_ONCE(!azx_dev->period_bytes, 1913 if (WARN_ONCE(!azx_dev->period_bytes,
1911 "hda-intel: zero azx_dev->period_bytes")) 1914 "hda-intel: zero azx_dev->period_bytes"))
1912 return -1; /* this shouldn't happen! */ 1915 return -1; /* this shouldn't happen! */
1913 if (wallclk <= azx_dev->period_wallclk && 1916 if (wallclk < (azx_dev->period_wallclk * 5) / 4 &&
1914 pos % azx_dev->period_bytes > azx_dev->period_bytes / 2) 1917 pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
1915 /* NG - it's below the first next period boundary */ 1918 /* NG - it's below the first next period boundary */
1916 return bdl_pos_adj[chip->dev_index] ? 0 : -1; 1919 return bdl_pos_adj[chip->dev_index] ? 0 : -1;
1917 azx_dev->start_wallclk = wallclk; 1920 azx_dev->start_wallclk += wallclk;
1918 return 1; /* OK, it's fine */ 1921 return 1; /* OK, it's fine */
1919} 1922}
1920 1923
@@ -2279,16 +2282,23 @@ static int azx_dev_free(struct snd_device *device)
2279 * white/black-listing for position_fix 2282 * white/black-listing for position_fix
2280 */ 2283 */
2281static struct snd_pci_quirk position_fix_list[] __devinitdata = { 2284static struct snd_pci_quirk position_fix_list[] __devinitdata = {
2285 SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB),
2282 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB), 2286 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
2283 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), 2287 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
2284 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), 2288 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
2285 SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), 2289 SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
2286 SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
2287 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), 2290 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
2291 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
2292 SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
2293 SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
2294 SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
2295 SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB),
2296 SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB),
2288 SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), 2297 SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
2289 SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), 2298 SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
2290 SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), 2299 SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
2291 SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB), 2300 SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB),
2301 SND_PCI_QUIRK(0x1849, 0x0888, "775Dual-VSTA", POS_FIX_LPIB),
2292 SND_PCI_QUIRK(0x8086, 0x2503, "DG965OT AAD63733-203", POS_FIX_LPIB), 2302 SND_PCI_QUIRK(0x8086, 0x2503, "DG965OT AAD63733-203", POS_FIX_LPIB),
2293 SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), 2303 SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
2294 {} 2304 {}
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index e863649d31f5..2bf2cb5da956 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2975,6 +2975,8 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
2975 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), 2975 SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5),
2976 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), 2976 SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5),
2977 SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), 2977 SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD),
2978 SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD),
2979 SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD),
2978 SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), 2980 SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD),
2979 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), 2981 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD),
2980 {} 2982 {}
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 53538b0f9991..fc767b6b4785 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7025,6 +7025,14 @@ static struct hda_input_mux alc889A_mb31_capture_source = {
7025 }, 7025 },
7026}; 7026};
7027 7027
7028static struct hda_input_mux alc889A_imac91_capture_source = {
7029 .num_items = 2,
7030 .items = {
7031 { "Mic", 0x01 },
7032 { "Line", 0x2 }, /* Not sure! */
7033 },
7034};
7035
7028/* 7036/*
7029 * 2ch mode 7037 * 2ch mode
7030 */ 7038 */
@@ -7486,15 +7494,8 @@ static struct snd_kcontrol_new alc885_macmini3_mixer[] = {
7486}; 7494};
7487 7495
7488static struct snd_kcontrol_new alc885_imac91_mixer[] = { 7496static struct snd_kcontrol_new alc885_imac91_mixer[] = {
7489 HDA_CODEC_VOLUME("Line-Out Playback Volume", 0x0c, 0x00, HDA_OUTPUT), 7497 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
7490 HDA_BIND_MUTE ("Line-Out Playback Switch", 0x0c, 0x02, HDA_INPUT), 7498 HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 0x02, HDA_INPUT),
7491 HDA_CODEC_MUTE ("Speaker Playback Switch", 0x14, 0x00, HDA_OUTPUT),
7492 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
7493 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
7494 HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
7495 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT),
7496 HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT),
7497 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0x00, HDA_INPUT),
7498 { } /* end */ 7499 { } /* end */
7499}; 7500};
7500 7501
@@ -7995,61 +7996,56 @@ static struct hda_verb alc885_mbp3_init_verbs[] = {
7995 7996
7996/* iMac 9,1 */ 7997/* iMac 9,1 */
7997static struct hda_verb alc885_imac91_init_verbs[] = { 7998static struct hda_verb alc885_imac91_init_verbs[] = {
7998 /* Line-Out mixer: unmute input/output amp left and right (volume = 0) */ 7999 /* Internal Speaker Pin (0x0c) */
7999 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, 8000 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, (PIN_OUT | AC_PINCTL_VREF_50) },
8000 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 8001 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8001 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 8002 {0x18, AC_VERB_SET_CONNECT_SEL, 0x00},
8002 /* Rear mixer */ 8003 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, (PIN_OUT | AC_PINCTL_VREF_50) },
8003 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, 8004 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8004 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 8005 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x00},
8005 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, 8006 /* HP Pin: Rear */
8006 /* HP Pin: output 0 (0x0c) */
8007 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 8007 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8008 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 8008 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8009 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, 8009 {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
8010 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, 8010 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, (ALC880_HP_EVENT | AC_USRSP_EN)},
8011 /* Internal Speakers: output 0 (0x0d) */ 8011 /* Line in Rear */
8012 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 8012 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, AC_PINCTL_VREF_50},
8013 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 8013 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
8014 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
8015 /* Mic (rear) pin: input vref at 80% */
8016 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
8017 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
8018 /* Front Mic pin: input vref at 80% */ 8014 /* Front Mic pin: input vref at 80% */
8019 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, 8015 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
8020 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 8016 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
8021 /* Line In pin: use output 1 when in LineOut mode */ 8017 /* Rear mixer */
8022 {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 8018 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
8023 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 8019 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8024 {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, 8020 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
8025 8021 /* Line-Out mixer: unmute input/output amp left and right (volume = 0) */
8026 /* FIXME: use matrix-type input source selection */ 8022 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
8027 /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ 8023 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8028 /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ 8024 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
8025 /* 0x24 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
8029 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 8026 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
8030 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, 8027 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
8031 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, 8028 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
8032 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, 8029 {0x24, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
8033 /* Input mixer2 */ 8030 /* 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
8034 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 8031 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
8035 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, 8032 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
8036 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, 8033 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
8037 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, 8034 {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
8038 /* Input mixer3 */ 8035 /* 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In */
8039 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 8036 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
8040 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, 8037 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
8041 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, 8038 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
8042 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, 8039 {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
8043 /* ADC1: mute amp left and right */ 8040 /* 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
8044 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 8041 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8045 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, 8042 {0x07, AC_VERB_SET_CONNECT_SEL, 0x00},
8046 /* ADC2: mute amp left and right */ 8043 /* 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
8047 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 8044 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8048 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, 8045 {0x08, AC_VERB_SET_CONNECT_SEL, 0x00},
8049 /* ADC3: mute amp left and right */ 8046 /* 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In */
8050 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 8047 {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
8051 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, 8048 {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
8052
8053 { } 8049 { }
8054}; 8050};
8055 8051
@@ -8118,7 +8114,7 @@ static void alc885_imac91_setup(struct hda_codec *codec)
8118 struct alc_spec *spec = codec->spec; 8114 struct alc_spec *spec = codec->spec;
8119 8115
8120 spec->autocfg.hp_pins[0] = 0x14; 8116 spec->autocfg.hp_pins[0] = 0x14;
8121 spec->autocfg.speaker_pins[0] = 0x15; 8117 spec->autocfg.speaker_pins[0] = 0x18;
8122 spec->autocfg.speaker_pins[1] = 0x1a; 8118 spec->autocfg.speaker_pins[1] = 0x1a;
8123} 8119}
8124 8120
@@ -9480,6 +9476,10 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = {
9480 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24), 9476 SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24),
9481 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24), 9477 SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24),
9482 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3), 9478 SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3),
9479 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31),
9480 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_ASUS_A7M),
9481 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC885_MBP3),
9482 SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC885_MBA21),
9483 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31), 9483 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31),
9484 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), 9484 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3),
9485 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), 9485 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24),
@@ -9627,14 +9627,14 @@ static struct alc_config_preset alc882_presets[] = {
9627 .init_hook = alc885_imac24_init_hook, 9627 .init_hook = alc885_imac24_init_hook,
9628 }, 9628 },
9629 [ALC885_IMAC91] = { 9629 [ALC885_IMAC91] = {
9630 .mixers = { alc885_imac91_mixer, alc882_chmode_mixer }, 9630 .mixers = {alc885_imac91_mixer},
9631 .init_verbs = { alc885_imac91_init_verbs, 9631 .init_verbs = { alc885_imac91_init_verbs,
9632 alc880_gpio1_init_verbs }, 9632 alc880_gpio1_init_verbs },
9633 .num_dacs = ARRAY_SIZE(alc882_dac_nids), 9633 .num_dacs = ARRAY_SIZE(alc882_dac_nids),
9634 .dac_nids = alc882_dac_nids, 9634 .dac_nids = alc882_dac_nids,
9635 .channel_mode = alc885_mbp_4ch_modes, 9635 .channel_mode = alc885_mba21_ch_modes,
9636 .num_channel_mode = ARRAY_SIZE(alc885_mbp_4ch_modes), 9636 .num_channel_mode = ARRAY_SIZE(alc885_mba21_ch_modes),
9637 .input_mux = &alc882_capture_source, 9637 .input_mux = &alc889A_imac91_capture_source,
9638 .dig_out_nid = ALC882_DIGOUT_NID, 9638 .dig_out_nid = ALC882_DIGOUT_NID,
9639 .dig_in_nid = ALC882_DIGIN_NID, 9639 .dig_in_nid = ALC882_DIGIN_NID,
9640 .unsol_event = alc_automute_amp_unsol_event, 9640 .unsol_event = alc_automute_amp_unsol_event,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a0e06d82da1f..f1e7babd6920 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2078,12 +2078,12 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
2078 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2000, 2078 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2000,
2079 "Intel D965", STAC_D965_3ST), 2079 "Intel D965", STAC_D965_3ST),
2080 /* Dell 3 stack systems */ 2080 /* Dell 3 stack systems */
2081 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f7, "Dell XPS M1730", STAC_DELL_3ST),
2082 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01dd, "Dell Dimension E520", STAC_DELL_3ST), 2081 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01dd, "Dell Dimension E520", STAC_DELL_3ST),
2083 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ed, "Dell ", STAC_DELL_3ST), 2082 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ed, "Dell ", STAC_DELL_3ST),
2084 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f4, "Dell ", STAC_DELL_3ST), 2083 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f4, "Dell ", STAC_DELL_3ST),
2085 /* Dell 3 stack systems with verb table in BIOS */ 2084 /* Dell 3 stack systems with verb table in BIOS */
2086 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), 2085 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
2086 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f7, "Dell XPS M1730", STAC_DELL_BIOS),
2087 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), 2087 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS),
2088 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), 2088 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS),
2089 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS), 2089 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS),