aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-12-03 06:27:47 -0500
committerTakashi Iwai <tiwai@suse.de>2010-12-03 06:27:47 -0500
commit4c98ec1170b9c03d5e0f57688ce9f5cecffbd22b (patch)
treeeed444adb986ccc0cabb36f9b112494d83cbed29
parentdc427170750f7be9ddedf16ca049b5cb827bd880 (diff)
parent3a253445e327d0295bbe51bcbec5f44f86b54a8c (diff)
Merge branch 'fix/hda' into topic/hda
-rw-r--r--sound/core/oss/pcm_oss.c19
-rw-r--r--sound/pci/hda/patch_conexant.c31
-rw-r--r--sound/pci/hda/patch_realtek.c1
-rw-r--r--sound/pci/hda/patch_sigmatel.c2
4 files changed, 30 insertions, 23 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 5c8c7dff8ede..b753ec661fcf 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1510,16 +1510,19 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
1510static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file) 1510static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
1511{ 1511{
1512 struct snd_pcm_substream *substream; 1512 struct snd_pcm_substream *substream;
1513 struct snd_pcm_runtime *runtime;
1514 int i;
1513 1515
1514 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; 1516 for (i = 0; i < 2; i++) {
1515 if (substream != NULL) { 1517 substream = pcm_oss_file->streams[i];
1516 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); 1518 if (!substream)
1517 substream->runtime->oss.prepare = 1; 1519 continue;
1518 } 1520 runtime = substream->runtime;
1519 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
1520 if (substream != NULL) {
1521 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL); 1521 snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
1522 substream->runtime->oss.prepare = 1; 1522 runtime->oss.prepare = 1;
1523 runtime->oss.buffer_used = 0;
1524 runtime->oss.prev_hw_ptr_period = 0;
1525 runtime->oss.period_ptr = 0;
1523 } 1526 }
1524 return 0; 1527 return 0;
1525} 1528}
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 846d1ead47fd..e652b34b1bd9 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2116,8 +2116,8 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
2116 struct conexant_spec *spec = codec->spec; 2116 struct conexant_spec *spec = codec->spec;
2117 unsigned int pinctl; 2117 unsigned int pinctl;
2118 2118
2119 snd_printdd("CXT5066: update speaker, hp_present=%d\n", 2119 snd_printdd("CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n",
2120 spec->hp_present); 2120 spec->hp_present, spec->cur_eapd);
2121 2121
2122 /* Port A (HP) */ 2122 /* Port A (HP) */
2123 pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; 2123 pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0;
@@ -2125,11 +2125,20 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
2125 pinctl); 2125 pinctl);
2126 2126
2127 /* Port D (HP/LO) */ 2127 /* Port D (HP/LO) */
2128 pinctl = ((spec->hp_present & 2) && spec->cur_eapd) 2128 if (spec->dell_automute) {
2129 ? spec->port_d_mode : 0; 2129 /* DELL AIO Port Rule: PortA> PortD> IntSpk */
2130 /* Mute if Port A is connected on Thinkpad */ 2130 pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
2131 if (spec->thinkpad && (spec->hp_present & 1)) 2131 ? PIN_OUT : 0;
2132 pinctl = 0; 2132 } else if (spec->thinkpad) {
2133 if (spec->cur_eapd)
2134 pinctl = spec->port_d_mode;
2135 /* Mute dock line-out if Port A (laptop HP) is present */
2136 if (spec->hp_present& 1)
2137 pinctl = 0;
2138 } else {
2139 pinctl = ((spec->hp_present & 2) && spec->cur_eapd)
2140 ? spec->port_d_mode : 0;
2141 }
2133 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2142 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2134 pinctl); 2143 pinctl);
2135 2144
@@ -2137,14 +2146,6 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
2137 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 2146 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
2138 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2147 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2139 pinctl); 2148 pinctl);
2140
2141 if (spec->dell_automute) {
2142 /* DELL AIO Port Rule: PortA > PortD > IntSpk */
2143 pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
2144 ? PIN_OUT : 0;
2145 snd_hda_codec_write(codec, 0x1c, 0,
2146 AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl);
2147 }
2148} 2149}
2149 2150
2150/* turn on/off EAPD (+ mute HP) as a master switch */ 2151/* turn on/off EAPD (+ mute HP) as a master switch */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 65a9edeee9ea..0badedab1335 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4603,6 +4603,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = {
4603 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), 4603 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU),
4604 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW), 4604 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW),
4605 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), 4605 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG),
4606 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG),
4606 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), 4607 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG),
4607 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW), 4608 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW),
4608 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), 4609 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 5c710807dfe5..efa4225f5fd6 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1627,6 +1627,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
1627static struct snd_pci_quirk stac92hd73xx_codec_id_cfg_tbl[] = { 1627static struct snd_pci_quirk stac92hd73xx_codec_id_cfg_tbl[] = {
1628 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a1, 1628 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a1,
1629 "Alienware M17x", STAC_ALIENWARE_M17X), 1629 "Alienware M17x", STAC_ALIENWARE_M17X),
1630 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x043a,
1631 "Alienware M17x", STAC_ALIENWARE_M17X),
1630 {} /* terminator */ 1632 {} /* terminator */
1631}; 1633};
1632 1634