aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ad1889.c2
-rw-r--r--sound/pci/atiixp.c2
-rw-r--r--sound/pci/atiixp_modem.c2
-rw-r--r--sound/pci/au88x0/au88x0.c3
-rw-r--r--sound/pci/bt87x.c3
-rw-r--r--sound/pci/ca0106/ca0106_main.c1
-rw-r--r--sound/pci/cs4281.c4
-rw-r--r--sound/pci/cs5530.c4
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_nvhdmi.c1
-rw-r--r--sound/pci/hda/patch_realtek.c189
-rw-r--r--sound/pci/hda/patch_sigmatel.c54
-rw-r--r--sound/pci/mixart/mixart.c3
13 files changed, 210 insertions, 60 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 92f3a976ef2..a7f38e63303 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -932,7 +932,7 @@ snd_ad1889_create(struct snd_card *card,
goto free_and_ret;
chip->bar = pci_resource_start(pci, 0);
- chip->iobase = ioremap_nocache(chip->bar, pci_resource_len(pci, 0));
+ chip->iobase = pci_ioremap_bar(pci, 0);
if (chip->iobase == NULL) {
printk(KERN_ERR PFX "unable to reserve region.\n");
err = -EBUSY;
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 085a52b8c80..226fe8237d3 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1609,7 +1609,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
return err;
}
chip->addr = pci_resource_start(pci, 0);
- chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
+ chip->remap_addr = pci_ioremap_bar(pci, 0);
if (chip->remap_addr == NULL) {
snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
snd_atiixp_free(chip);
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 2f106306c7f..0e6e5cc1c50 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1252,7 +1252,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
return err;
}
chip->addr = pci_resource_start(pci, 0);
- chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
+ chip->remap_addr = pci_ioremap_bar(pci, 0);
if (chip->remap_addr == NULL) {
snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
snd_atiixp_free(chip);
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 68368e49007..a36d4d1fd41 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -180,8 +180,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
if ((err = pci_request_regions(pci, CARD_NAME_SHORT)) != 0)
goto regions_out;
- chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
- pci_resource_len(pci, 0));
+ chip->mmio = pci_ioremap_bar(pci, 0);
if (!chip->mmio) {
printk(KERN_ERR "MMIO area remap failed.\n");
err = -ENOMEM;
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 3aa8d973540..1aa1c040254 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -749,8 +749,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
pci_disable_device(pci);
return err;
}
- chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
- pci_resource_len(pci, 0));
+ chip->mmio = pci_ioremap_bar(pci, 0);
if (!chip->mmio) {
snd_printk(KERN_ERR "cannot remap io memory\n");
err = -ENOMEM;
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index a7d89662acf..88fbf285d2b 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -759,7 +759,6 @@ static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream)
SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
SPCS_GENERATIONSTATUS | 0x00001200 |
0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT );
- }
#endif
return 0;
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index ef9308f7c45..192e7842e18 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1382,8 +1382,8 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
chip->ba0_addr = pci_resource_start(pci, 0);
chip->ba1_addr = pci_resource_start(pci, 1);
- chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0));
- chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1));
+ chip->ba0 = pci_ioremap_bar(pci, 0);
+ chip->ba1 = pci_ioremap_bar(pci, 1);
if (!chip->ba0 || !chip->ba1) {
snd_cs4281_free(chip);
return -ENOMEM;
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c
index 7ff8b68e997..6dea5b5cc77 100644
--- a/sound/pci/cs5530.c
+++ b/sound/pci/cs5530.c
@@ -2,7 +2,7 @@
* cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio
*
* (C) Copyright 2007 Ash Willis <ashwillis@programmer.net>
- * (C) Copyright 2003 Red Hat Inc <alan@redhat.com>
+ * (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
*
* This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did
* mess with it a bit. The chip seems to have to have trouble with full duplex
@@ -132,7 +132,7 @@ static int __devinit snd_cs5530_create(struct snd_card *card,
}
chip->pci_base = pci_resource_start(pci, 0);
- mem = ioremap_nocache(chip->pci_base, pci_resource_len(pci, 0));
+ mem = pci_ioremap_bar(pci, 0);
if (mem == NULL) {
kfree(chip);
pci_disable_device(pci);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 9f316c1b279..f080f8ce0ec 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2158,7 +2158,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
}
chip->addr = pci_resource_start(pci, 0);
- chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0));
+ chip->remap_addr = pci_ioremap_bar(pci, 0);
if (chip->remap_addr == NULL) {
snd_printk(KERN_ERR SFX "ioremap error\n");
err = -ENXIO;
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
index 1a65775d28e..2eed2c8b98d 100644
--- a/sound/pci/hda/patch_nvhdmi.c
+++ b/sound/pci/hda/patch_nvhdmi.c
@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec)
codec->pcm_info = info;
info->name = "NVIDIA HDMI";
+ info->pcm_type = HDA_PCM_TYPE_HDMI;
info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback;
return 0;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0b6e682c46d..4eceab9bd10 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -307,6 +307,13 @@ struct alc_spec {
/* for PLL fix */
hda_nid_t pll_nid;
unsigned int pll_coef_idx, pll_coef_bit;
+
+#ifdef SND_HDA_NEEDS_RESUME
+#define ALC_MAX_PINS 16
+ unsigned int num_pins;
+ hda_nid_t pin_nids[ALC_MAX_PINS];
+ unsigned int pin_cfgs[ALC_MAX_PINS];
+#endif
};
/*
@@ -822,6 +829,27 @@ static void alc_sku_automute(struct hda_codec *codec)
spec->jack_present ? 0 : PIN_OUT);
}
+static void alc_mic_automute(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+ unsigned int present;
+ unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC];
+ unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC];
+ unsigned int mix_nid = spec->capsrc_nids[0];
+ unsigned int capsrc_idx_mic, capsrc_idx_fmic;
+
+ capsrc_idx_mic = mic_nid - 0x18;
+ capsrc_idx_fmic = fmic_nid - 0x18;
+ present = snd_hda_codec_read(codec, mic_nid, 0,
+ AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+ snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
+ 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80));
+ snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
+ 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0));
+ snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic,
+ HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0);
+}
+
/* unsolicited event for HP jack sensing */
static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
{
@@ -829,10 +857,17 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
res >>= 28;
else
res >>= 26;
- if (res != ALC880_HP_EVENT)
- return;
+ if (res == ALC880_HP_EVENT)
+ alc_sku_automute(codec);
+ if (res == ALC880_MIC_EVENT)
+ alc_mic_automute(codec);
+}
+
+static void alc_inithook(struct hda_codec *codec)
+{
alc_sku_automute(codec);
+ alc_mic_automute(codec);
}
/* additional initialization for ALC888 variants */
@@ -1018,10 +1053,17 @@ do_sku:
else
return;
}
-
- snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
- AC_VERB_SET_UNSOLICITED_ENABLE,
- AC_USRSP_EN | ALC880_HP_EVENT);
+ if (spec->autocfg.hp_pins[0])
+ snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
+ AC_VERB_SET_UNSOLICITED_ENABLE,
+ AC_USRSP_EN | ALC880_HP_EVENT);
+
+ if (spec->autocfg.input_pins[AUTO_PIN_MIC] &&
+ spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC])
+ snd_hda_codec_write(codec,
+ spec->autocfg.input_pins[AUTO_PIN_MIC], 0,
+ AC_VERB_SET_UNSOLICITED_ENABLE,
+ AC_USRSP_EN | ALC880_MIC_EVENT);
spec->unsol_event = alc_sku_unsol_event;
}
@@ -2743,6 +2785,64 @@ static void alc_free(struct hda_codec *codec)
codec->spec = NULL; /* to be sure */
}
+#ifdef SND_HDA_NEEDS_RESUME
+static void store_pin_configs(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+ hda_nid_t nid, end_nid;
+
+ end_nid = codec->start_nid + codec->num_nodes;
+ for (nid = codec->start_nid; nid < end_nid; nid++) {
+ unsigned int wid_caps = get_wcaps(codec, nid);
+ unsigned int wid_type =
+ (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
+ if (wid_type != AC_WID_PIN)
+ continue;
+ if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids))
+ break;
+ spec->pin_nids[spec->num_pins] = nid;
+ spec->pin_cfgs[spec->num_pins] =
+ snd_hda_codec_read(codec, nid, 0,
+ AC_VERB_GET_CONFIG_DEFAULT, 0);
+ spec->num_pins++;
+ }
+}
+
+static void resume_pin_configs(struct hda_codec *codec)
+{
+ struct alc_spec *spec = codec->spec;
+ int i;
+
+ for (i = 0; i < spec->num_pins; i++) {
+ hda_nid_t pin_nid = spec->pin_nids[i];
+ unsigned int pin_config = spec->pin_cfgs[i];
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_CONFIG_DEFAULT_BYTES_0,
+ pin_config & 0x000000ff);
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_CONFIG_DEFAULT_BYTES_1,
+ (pin_config & 0x0000ff00) >> 8);
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_CONFIG_DEFAULT_BYTES_2,
+ (pin_config & 0x00ff0000) >> 16);
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_CONFIG_DEFAULT_BYTES_3,
+ pin_config >> 24);
+ }
+}
+
+static int alc_resume(struct hda_codec *codec)
+{
+ resume_pin_configs(codec);
+ codec->patch_ops.init(codec);
+ snd_hda_codec_resume_amp(codec);
+ snd_hda_codec_resume_cache(codec);
+ return 0;
+}
+#else
+#define store_pin_configs(codec)
+#endif
+
/*
*/
static struct hda_codec_ops alc_patch_ops = {
@@ -2751,6 +2851,9 @@ static struct hda_codec_ops alc_patch_ops = {
.init = alc_init,
.free = alc_free,
.unsol_event = alc_unsol_event,
+#ifdef SND_HDA_NEEDS_RESUME
+ .resume = alc_resume,
+#endif
#ifdef CONFIG_SND_HDA_POWER_SAVE
.check_power_status = alc_check_power_status,
#endif
@@ -3797,6 +3900,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
spec->num_mux_defs = 1;
spec->input_mux = &spec->private_imux;
+ store_pin_configs(codec);
return 1;
}
@@ -3808,7 +3912,7 @@ static void alc880_auto_init(struct hda_codec *codec)
alc880_auto_init_extra_out(codec);
alc880_auto_init_analog_input(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
/*
@@ -4961,7 +5065,7 @@ static struct hda_verb alc260_test_init_verbs[] = {
*/
static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
- const char *pfx)
+ const char *pfx, int *vol_bits)
{
hda_nid_t nid_vol;
unsigned long vol_val, sw_val;
@@ -4983,10 +5087,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
} else
return 0; /* N/A */
- snprintf(name, sizeof(name), "%s Playback Volume", pfx);
- err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val);
- if (err < 0)
- return err;
+ if (!(*vol_bits & (1 << nid_vol))) {
+ /* first control for the volume widget */
+ snprintf(name, sizeof(name), "%s Playback Volume", pfx);
+ err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val);
+ if (err < 0)
+ return err;
+ *vol_bits |= (1 << nid_vol);
+ }
snprintf(name, sizeof(name), "%s Playback Switch", pfx);
err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val);
if (err < 0)
@@ -5000,6 +5108,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec,
{
hda_nid_t nid;
int err;
+ int vols = 0;
spec->multiout.num_dacs = 1;
spec->multiout.dac_nids = spec->private_dac_nids;
@@ -5007,21 +5116,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec,
nid = cfg->line_out_pins[0];
if (nid) {
- err = alc260_add_playback_controls(spec, nid, "Front");
+ err = alc260_add_playback_controls(spec, nid, "Front", &vols);
if (err < 0)
return err;
}
nid = cfg->speaker_pins[0];
if (nid) {
- err = alc260_add_playback_controls(spec, nid, "Speaker");
+ err = alc260_add_playback_controls(spec, nid, "Speaker", &vols);
if (err < 0)
return err;
}
nid = cfg->hp_pins[0];
if (nid) {
- err = alc260_add_playback_controls(spec, nid, "Headphone");
+ err = alc260_add_playback_controls(spec, nid, "Headphone",
+ &vols);
if (err < 0)
return err;
}
@@ -5209,6 +5319,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec)
}
spec->num_mixers++;
+ store_pin_configs(codec);
return 1;
}
@@ -5219,7 +5330,7 @@ static void alc260_auto_init(struct hda_codec *codec)
alc260_auto_init_multi_out(codec);
alc260_auto_init_analog_input(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -6629,7 +6740,7 @@ static void alc882_auto_init(struct hda_codec *codec)
alc882_auto_init_analog_input(codec);
alc882_auto_init_input_src(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */
@@ -8306,8 +8417,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
+ SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V),
SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
- SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V),
SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
@@ -8758,7 +8869,7 @@ static void alc883_auto_init(struct hda_codec *codec)
alc883_auto_init_analog_input(codec);
alc883_auto_init_input_src(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
static int patch_alc883(struct hda_codec *codec)
@@ -8802,8 +8913,13 @@ static int patch_alc883(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0888:
- spec->stream_name_analog = "ALC888 Analog";
- spec->stream_name_digital = "ALC888 Digital";
+ if (codec->revision_id == 0x100101) {
+ spec->stream_name_analog = "ALC1200 Analog";
+ spec->stream_name_digital = "ALC1200 Digital";
+ } else {
+ spec->stream_name_analog = "ALC888 Analog";
+ spec->stream_name_digital = "ALC888 Digital";
+ }
break;
case 0x10ec0889:
spec->stream_name_analog = "ALC889 Analog";
@@ -10267,6 +10383,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec)
if (err < 0)
return err;
+ store_pin_configs(codec);
return 1;
}
@@ -10285,7 +10402,7 @@ static void alc262_auto_init(struct hda_codec *codec)
alc262_auto_init_analog_input(codec);
alc262_auto_init_input_src(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
/*
@@ -10343,7 +10460,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
ALC262_TOSHIBA_RX1),
- SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06),
+ SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA),
@@ -11401,6 +11518,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
if (err < 0)
return err;
+ store_pin_configs(codec);
return 1;
}
@@ -11417,7 +11535,7 @@ static void alc268_auto_init(struct hda_codec *codec)
alc268_auto_init_mono_speaker_out(codec);
alc268_auto_init_analog_input(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
/*
@@ -12184,6 +12302,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
spec->mixers[spec->num_mixers] = alc269_capture_mixer;
spec->num_mixers++;
+ store_pin_configs(codec);
return 1;
}
@@ -12200,7 +12319,7 @@ static void alc269_auto_init(struct hda_codec *codec)
alc269_auto_init_hp_out(codec);
alc269_auto_init_analog_input(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
/*
@@ -13270,6 +13389,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
spec->mixers[spec->num_mixers] = alc861_capture_mixer;
spec->num_mixers++;
+ store_pin_configs(codec);
return 1;
}
@@ -13281,7 +13401,7 @@ static void alc861_auto_init(struct hda_codec *codec)
alc861_auto_init_hp_out(codec);
alc861_auto_init_analog_input(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -14381,6 +14501,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
if (err < 0)
return err;
+ store_pin_configs(codec);
return 1;
}
@@ -14393,7 +14514,7 @@ static void alc861vd_auto_init(struct hda_codec *codec)
alc861vd_auto_init_analog_input(codec);
alc861vd_auto_init_input_src(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
static int patch_alc861vd(struct hda_codec *codec)
@@ -15667,7 +15788,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = {
static struct snd_pci_quirk alc662_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA),
- SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V),
+ SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V),
SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG),
SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701),
SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20),
@@ -15680,6 +15801,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1),
SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1),
SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1),
+ SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1),
SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2),
SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2),
SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2),
@@ -16211,6 +16333,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
spec->mixers[spec->num_mixers] = alc662_capture_mixer;
spec->num_mixers++;
+
+ store_pin_configs(codec);
return 1;
}
@@ -16223,7 +16347,7 @@ static void alc662_auto_init(struct hda_codec *codec)
alc662_auto_init_analog_input(codec);
alc662_auto_init_input_src(codec);
if (spec->unsol_event)
- alc_sku_automute(codec);
+ alc_inithook(codec);
}
static int patch_alc662(struct hda_codec *codec)
@@ -16268,6 +16392,9 @@ static int patch_alc662(struct hda_codec *codec)
if (codec->vendor_id == 0x10ec0663) {
spec->stream_name_analog = "ALC663 Analog";
spec->stream_name_digital = "ALC663 Digital";
+ } else if (codec->vendor_id == 0x10ec0272) {
+ spec->stream_name_analog = "ALC272 Analog";
+ spec->stream_name_digital = "ALC272 Digital";
} else {
spec->stream_name_analog = "ALC662 Analog";
spec->stream_name_digital = "ALC662 Digital";
@@ -16305,6 +16432,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = {
{ .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 },
{ .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 },
{ .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 },
+ { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
{ .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
.patch = patch_alc861 },
{ .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
@@ -16323,7 +16451,10 @@ struct hda_codec_preset snd_hda_preset_realtek[] = {
{ .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A",
.patch = patch_alc882 }, /* should be patch_alc883() in future */
{ .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 },
+ { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 },
{ .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 },
+ { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200",
+ .patch = patch_alc883 },
{ .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 },
{} /* terminator */
};
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c461baa83c2..788fdc6f326 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -322,8 +322,8 @@ static hda_nid_t stac92hd71bxx_mux_nids[2] = {
0x1a, 0x1b
};
-static hda_nid_t stac92hd71bxx_dmux_nids[1] = {
- 0x1c,
+static hda_nid_t stac92hd71bxx_dmux_nids[2] = {
+ 0x1c, 0x1d,
};
static hda_nid_t stac92hd71bxx_smux_nids[2] = {
@@ -861,20 +861,18 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* connect headphone jack to dac1 */
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
- { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */
/* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
};
-#define HD_DISABLE_PORTF 3
+#define HD_DISABLE_PORTF 2
static struct hda_verb stac92hd71bxx_analog_core_init[] = {
/* start of config #1 */
/* connect port 0f to audio mixer */
{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
- { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */
/* unmute right and left channels for node 0x0f */
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* start of config #2 */
@@ -883,10 +881,6 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = {
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* connect headphone jack to dac1 */
{ 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
- /* connect port 0d to audio mixer */
- { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2},
- /* unmute dac0 input in audio mixer */
- { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f},
/* unmute right and left channels for nodes 0x0a, 0xd */
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1107,6 +1101,7 @@ static struct snd_kcontrol_new stac92hd83xxx_mixer[] = {
static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
STAC_INPUT_SOURCE(2),
+ STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2),
HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT),
@@ -1119,8 +1114,17 @@ static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT),
*/
- HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
- HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
+ HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME("Import0 Mux Capture Volume", 0x17, 0x0, HDA_INPUT),
+
+ HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT),
+ HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT),
+
+ HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT),
+ HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT),
+
+ HDA_CODEC_MUTE("DAC1 Capture Switch", 0x17, 0x4, HDA_INPUT),
+ HDA_CODEC_VOLUME("DAC1 Capture Volume", 0x17, 0x4, HDA_INPUT),
{ } /* end */
};
@@ -1278,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
return err;
spec->multiout.share_spdif = 1;
}
- if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) {
+ if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) {
err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
if (err < 0)
return err;
@@ -1649,7 +1653,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
static unsigned int ref92hd71bxx_pin_configs[11] = {
0x02214030, 0x02a19040, 0x01a19020, 0x01014010,
- 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0,
+ 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0,
0x90a000f0, 0x01452050, 0x01452050,
};
@@ -2812,7 +2816,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
static const char *chname[4] = {
"Front", "Surround", NULL /*CLFE*/, "Side"
};
- hda_nid_t nid;
+ hda_nid_t nid = 0;
int i, err;
struct sigmatel_spec *spec = codec->spec;
@@ -3000,7 +3004,7 @@ static int stac92xx_auto_create_mono_output_ctls(struct hda_codec *codec)
/* labels for amp mux outputs */
static const char *stac92xx_amp_labels[3] = {
- "Front Microphone", "Microphone", "Line In"
+ "Front Microphone", "Microphone", "Line In",
};
/* create amp out controls mux on capable codecs */
@@ -4327,6 +4331,16 @@ static struct hda_codec_ops stac92hd71bxx_patch_ops = {
#endif
};
+static struct hda_input_mux stac92hd71bxx_dmux = {
+ .num_items = 4,
+ .items = {
+ { "Analog Inputs", 0x00 },
+ { "Mixer", 0x01 },
+ { "Digital Mic 1", 0x02 },
+ { "Digital Mic 2", 0x03 },
+ }
+};
+
static int patch_stac92hd71bxx(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
@@ -4341,6 +4355,8 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids);
spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids);
spec->pin_nids = stac92hd71bxx_pin_nids;
+ memcpy(&spec->private_dimux, &stac92hd71bxx_dmux,
+ sizeof(stac92hd71bxx_dmux));
spec->board_config = snd_hda_check_board_config(codec,
STAC_92HD71BXX_MODELS,
stac92hd71bxx_models,
@@ -4392,6 +4408,7 @@ again:
/* no output amps */
spec->num_pwrs = 0;
spec->mixer = stac92hd71bxx_analog_mixer;
+ spec->dinput_mux = &spec->private_dimux;
/* disable VSW */
spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
@@ -4409,12 +4426,13 @@ again:
spec->num_pwrs = 0;
/* fallthru */
default:
+ spec->dinput_mux = &spec->private_dimux;
spec->mixer = stac92hd71bxx_analog_mixer;
spec->init = stac92hd71bxx_analog_core_init;
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}
- spec->aloopback_mask = 0x20;
+ spec->aloopback_mask = 0x50;
spec->aloopback_shift = 0;
if (spec->board_config > STAC_92HD71BXX_REF) {
@@ -4456,6 +4474,10 @@ again:
spec->multiout.num_dacs = 1;
spec->multiout.hp_nid = 0x11;
spec->multiout.dac_nids = stac92hd71bxx_dac_nids;
+ if (spec->dinput_mux)
+ spec->private_dimux.num_items +=
+ spec->num_dmics -
+ (ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1);
err = stac92xx_parse_auto_config(codec, 0x21, 0x23);
if (!err) {
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index 2d0dce649a6..ae7601f353a 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1314,8 +1314,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
}
for (i = 0; i < 2; i++) {
mgr->mem[i].phys = pci_resource_start(pci, i);
- mgr->mem[i].virt = ioremap_nocache(mgr->mem[i].phys,
- pci_resource_len(pci, i));
+ mgr->mem[i].virt = pci_ioremap_bar(pci, i);
if (!mgr->mem[i].virt) {
printk(KERN_ERR "unable to remap resource 0x%lx\n",
mgr->mem[i].phys);