aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-09 11:20:13 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-09 11:20:13 -0500
commitd9f8e9c34150ebec2be07bb95b6a23d99ba1f6de (patch)
tree1e8c402df9b1154f4ca37eb5242f960ef7aab747 /sound
parent2ebfb8eeb8f244f9d25937d31a947895cf819e26 (diff)
parent8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (diff)
Merge branch 'topic/quirk-cleanup' into topic/misc
Diffstat (limited to 'sound')
-rw-r--r--sound/core/misc.c10
-rw-r--r--sound/pci/Kconfig4
-rw-r--r--sound/pci/hda/patch_realtek.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c54
-rw-r--r--sound/pci/oxygen/virtuoso.c3
-rw-r--r--sound/soc/atmel/atmel-pcm.c2
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c18
7 files changed, 52 insertions, 41 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 38524f615d94..a9710e0c97af 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -95,12 +95,14 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list)
95{ 95{
96 const struct snd_pci_quirk *q; 96 const struct snd_pci_quirk *q;
97 97
98 for (q = list; q->subvendor; q++) 98 for (q = list; q->subvendor; q++) {
99 if (q->subvendor == pci->subsystem_vendor && 99 if (q->subvendor != pci->subsystem_vendor)
100 (!q->subdevice || q->subdevice == pci->subsystem_device)) 100 continue;
101 if (!q->subdevice ||
102 (pci->subsystem_device & q->subdevice_mask) == q->subdevice)
101 return q; 103 return q;
104 }
102 return NULL; 105 return NULL;
103} 106}
104
105EXPORT_SYMBOL(snd_pci_quirk_lookup); 107EXPORT_SYMBOL(snd_pci_quirk_lookup);
106#endif 108#endif
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index 6e3a1848447c..82b9bddcdcd6 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -744,8 +744,8 @@ config SND_VIRTUOSO
744 select SND_OXYGEN_LIB 744 select SND_OXYGEN_LIB
745 help 745 help
746 Say Y here to include support for sound cards based on the 746 Say Y here to include support for sound cards based on the
747 Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X and 747 Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2 and D2X.
748 HDAV1.3 (Deluxe). 748 Support for the HDAV1.3 (Deluxe) is very experimental.
749 749
750 To compile this driver as a module, choose M here: the module 750 To compile this driver as a module, choose M here: the module
751 will be called snd-virtuoso. 751 will be called snd-virtuoso.
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 82dd08431970..5d249a547fbf 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8478 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), 8478 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
8479 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), 8479 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
8480 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), 8480 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
8481 SND_PCI_QUIRK(0x1071, 0x8227, "Mitac 82801H", ALC883_MITAC),
8481 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), 8482 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC),
8482 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), 8483 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
8483 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL), 8484 SND_PCI_QUIRK(0x10f1, 0x2350, "TYAN-S2350", ALC888_6ST_DELL),
@@ -8526,6 +8527,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8526 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), 8527 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
8527 SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL), 8528 SND_PCI_QUIRK(0x8086, 0x0001, "DG33BUC", ALC883_3ST_6ch_INTEL),
8528 SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL), 8529 SND_PCI_QUIRK(0x8086, 0x0002, "DG33FBC", ALC883_3ST_6ch_INTEL),
8530 SND_PCI_QUIRK(0x8086, 0x2503, "82801H", ALC883_MITAC),
8529 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL), 8531 SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC883_3ST_6ch_INTEL),
8530 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), 8532 SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
8531 {} 8533 {}
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c39deebb588f..3dd4eee70b7c 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -81,6 +81,7 @@ enum {
81 81
82enum { 82enum {
83 STAC_92HD83XXX_REF, 83 STAC_92HD83XXX_REF,
84 STAC_92HD83XXX_PWR_REF,
84 STAC_92HD83XXX_MODELS 85 STAC_92HD83XXX_MODELS
85}; 86};
86 87
@@ -334,7 +335,7 @@ static hda_nid_t stac92hd83xxx_slave_dig_outs[2] = {
334}; 335};
335 336
336static unsigned int stac92hd83xxx_pwr_mapping[4] = { 337static unsigned int stac92hd83xxx_pwr_mapping[4] = {
337 0x03, 0x0c, 0x10, 0x40, 338 0x03, 0x0c, 0x20, 0x40,
338}; 339};
339 340
340static hda_nid_t stac92hd83xxx_amp_nids[1] = { 341static hda_nid_t stac92hd83xxx_amp_nids[1] = {
@@ -841,10 +842,6 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = {
841}; 842};
842 843
843static struct hda_verb stac92hd83xxx_core_init[] = { 844static struct hda_verb stac92hd83xxx_core_init[] = {
844 /* start of config #1 */
845 { 0xe, AC_VERB_SET_CONNECT_SEL, 0x3},
846
847 /* start of config #2 */
848 { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0}, 845 { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0},
849 { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0}, 846 { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0},
850 { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1}, 847 { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1},
@@ -885,8 +882,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = {
885static struct hda_verb stac925x_core_init[] = { 882static struct hda_verb stac925x_core_init[] = {
886 /* set dac0mux for dac converter */ 883 /* set dac0mux for dac converter */
887 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, 884 { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
888 /* unmute and set max the selector */ 885 /* mute the master volume */
889 { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb01f }, 886 { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
890 {} 887 {}
891}; 888};
892 889
@@ -1138,6 +1135,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
1138}; 1135};
1139 1136
1140static struct snd_kcontrol_new stac925x_mixer[] = { 1137static struct snd_kcontrol_new stac925x_mixer[] = {
1138 HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT),
1139 HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT),
1141 STAC_INPUT_SOURCE(1), 1140 STAC_INPUT_SOURCE(1),
1142 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), 1141 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
1143 HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), 1142 HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT),
@@ -1736,10 +1735,12 @@ static unsigned int ref92hd83xxx_pin_configs[14] = {
1736 1735
1737static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { 1736static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = {
1738 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, 1737 [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs,
1738 [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs,
1739}; 1739};
1740 1740
1741static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { 1741static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
1742 [STAC_92HD83XXX_REF] = "ref", 1742 [STAC_92HD83XXX_REF] = "ref",
1743 [STAC_92HD83XXX_PWR_REF] = "mic-ref",
1743}; 1744};
1744 1745
1745static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { 1746static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
@@ -1799,6 +1800,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1799 "HP dv5", STAC_HP_M4), 1800 "HP dv5", STAC_HP_M4),
1800 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, 1801 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4,
1801 "HP dv7", STAC_HP_M4), 1802 "HP dv7", STAC_HP_M4),
1803 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7,
1804 "HP dv4", STAC_HP_DV5),
1802 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc, 1805 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc,
1803 "HP dv7", STAC_HP_M4), 1806 "HP dv7", STAC_HP_M4),
1804 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603, 1807 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3603,
@@ -3573,13 +3576,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
3573 err = stac92xx_auto_fill_dac_nids(codec); 3576 err = stac92xx_auto_fill_dac_nids(codec);
3574 if (err < 0) 3577 if (err < 0)
3575 return err; 3578 return err;
3579 err = stac92xx_auto_create_multi_out_ctls(codec,
3580 &spec->autocfg);
3581 if (err < 0)
3582 return err;
3576 } 3583 }
3577 3584
3578 err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);
3579
3580 if (err < 0)
3581 return err;
3582
3583 /* setup analog beep controls */ 3585 /* setup analog beep controls */
3584 if (spec->anabeep_nid > 0) { 3586 if (spec->anabeep_nid > 0) {
3585 err = stac92xx_auto_create_beep_ctls(codec, 3587 err = stac92xx_auto_create_beep_ctls(codec,
@@ -4753,7 +4755,9 @@ static struct hda_input_mux stac92hd83xxx_dmux = {
4753static int patch_stac92hd83xxx(struct hda_codec *codec) 4755static int patch_stac92hd83xxx(struct hda_codec *codec)
4754{ 4756{
4755 struct sigmatel_spec *spec; 4757 struct sigmatel_spec *spec;
4758 hda_nid_t conn[STAC92HD83_DAC_COUNT + 1];
4756 int err; 4759 int err;
4760 int num_dacs;
4757 4761
4758 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 4762 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
4759 if (spec == NULL) 4763 if (spec == NULL)
@@ -4772,15 +4776,16 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
4772 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids); 4776 spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
4773 spec->multiout.dac_nids = spec->dac_nids; 4777 spec->multiout.dac_nids = spec->dac_nids;
4774 4778
4775 spec->init = stac92hd83xxx_core_init;
4776 switch (codec->vendor_id) {
4777 case 0x111d7605:
4778 break;
4779 default:
4780 spec->num_pwrs--;
4781 spec->init++; /* switch to config #2 */
4782 }
4783 4779
4780 /* set port 0xe to select the last DAC
4781 */
4782 num_dacs = snd_hda_get_connections(codec, 0x0e,
4783 conn, STAC92HD83_DAC_COUNT + 1) - 1;
4784
4785 snd_hda_codec_write_cache(codec, 0xe, 0,
4786 AC_VERB_SET_CONNECT_SEL, num_dacs);
4787
4788 spec->init = stac92hd83xxx_core_init;
4784 spec->mixer = stac92hd83xxx_mixer; 4789 spec->mixer = stac92hd83xxx_mixer;
4785 spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids); 4790 spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids);
4786 spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids); 4791 spec->num_dmuxes = ARRAY_SIZE(stac92hd83xxx_dmux_nids);
@@ -4806,6 +4811,15 @@ again:
4806 return err; 4811 return err;
4807 } 4812 }
4808 4813
4814 switch (codec->vendor_id) {
4815 case 0x111d7604:
4816 case 0x111d7605:
4817 if (spec->board_config == STAC_92HD83XXX_PWR_REF)
4818 break;
4819 spec->num_pwrs = 0;
4820 break;
4821 }
4822
4809 err = stac92xx_parse_auto_config(codec, 0x1d, 0); 4823 err = stac92xx_parse_auto_config(codec, 0x1d, 0);
4810 if (!err) { 4824 if (!err) {
4811 if (spec->board_config < 0) { 4825 if (spec->board_config < 0) {
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index e9e829e83d7a..18c7c91786bc 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -683,7 +683,7 @@ static void xonar_hdav_uart_input(struct oxygen *chip)
683 if (chip->uart_input_count >= 2 && 683 if (chip->uart_input_count >= 2 &&
684 chip->uart_input[chip->uart_input_count - 2] == 'O' && 684 chip->uart_input[chip->uart_input_count - 2] == 'O' &&
685 chip->uart_input[chip->uart_input_count - 1] == 'K') { 685 chip->uart_input[chip->uart_input_count - 1] == 'K') {
686 printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:"); 686 printk(KERN_DEBUG "message from Xonar HDAV HDMI chip received:\n");
687 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 687 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
688 chip->uart_input, chip->uart_input_count); 688 chip->uart_input, chip->uart_input_count);
689 chip->uart_input_count = 0; 689 chip->uart_input_count = 0;
@@ -908,6 +908,7 @@ static const struct oxygen_model model_xonar_hdav = {
908 .dac_channels = 8, 908 .dac_channels = 8,
909 .dac_volume_min = 0x0f, 909 .dac_volume_min = 0x0f,
910 .dac_volume_max = 0xff, 910 .dac_volume_max = 0xff,
911 .misc_flags = OXYGEN_MISC_MIDI,
911 .function_flags = OXYGEN_FUNCTION_2WIRE, 912 .function_flags = OXYGEN_FUNCTION_2WIRE,
912 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, 913 .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
913 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, 914 .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c
index 1fac5efd285b..3dcdc4e3cfa0 100644
--- a/sound/soc/atmel/atmel-pcm.c
+++ b/sound/soc/atmel/atmel-pcm.c
@@ -44,8 +44,6 @@
44#include <sound/pcm_params.h> 44#include <sound/pcm_params.h>
45#include <sound/soc.h> 45#include <sound/soc.h>
46 46
47#include <mach/hardware.h>
48
49#include "atmel-pcm.h" 47#include "atmel-pcm.h"
50 48
51 49
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index bcec3f60bad9..acf39a646b2f 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -183,16 +183,6 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
183}; 183};
184 184
185/** 185/**
186 * mpc8610_hpcd_machine: ASoC machine data
187 */
188static struct snd_soc_card mpc8610_hpcd_machine = {
189 .probe = mpc8610_hpcd_machine_probe,
190 .remove = mpc8610_hpcd_machine_remove,
191 .name = "MPC8610 HPCD",
192 .num_links = 1,
193};
194
195/**
196 * mpc8610_hpcd_probe: OF probe function for the fabric driver 186 * mpc8610_hpcd_probe: OF probe function for the fabric driver
197 * 187 *
198 * This function gets called when an SSI node is found in the device tree. 188 * This function gets called when an SSI node is found in the device tree.
@@ -455,7 +445,11 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
455 machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */ 445 machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */
456 machine_data->dai.ops = &mpc8610_hpcd_ops; 446 machine_data->dai.ops = &mpc8610_hpcd_ops;
457 447
458 mpc8610_hpcd_machine.dai_link = &machine_data->dai; 448 machine_data->machine.probe = mpc8610_hpcd_machine_probe;
449 machine_data->machine.remove = mpc8610_hpcd_machine_remove;
450 machine_data->machine.name = "MPC8610 HPCD";
451 machine_data->machine.num_links = 1;
452 machine_data->machine.dai_link = &machine_data->dai;
459 453
460 /* Allocate a new audio platform device structure */ 454 /* Allocate a new audio platform device structure */
461 sound_device = platform_device_alloc("soc-audio", -1); 455 sound_device = platform_device_alloc("soc-audio", -1);
@@ -465,7 +459,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
465 goto error; 459 goto error;
466 } 460 }
467 461
468 machine_data->sound_devdata.card = &mpc8610_hpcd_machine; 462 machine_data->sound_devdata.card = &machine_data->machine;
469 machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; 463 machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
470 machine_data->machine.platform = &fsl_soc_platform; 464 machine_data->machine.platform = &fsl_soc_platform;
471 465