From 345b65c30c3a8b88e01817a4ae7c8465fdc1ee8c Mon Sep 17 00:00:00 2001 From: Julian Wollrath Date: Wed, 9 Nov 2011 10:02:40 +0100 Subject: [PATCH] --- yaml --- r: 275302 b: refs/heads/master c: f7f9bdfadfda07afb904a9767468e38c2d1a6033 h: refs/heads/master v: v3 --- [refs] | 2 +- .../sound/alsa/HD-Audio-Models.txt | 1 + trunk/MAINTAINERS | 2 +- trunk/include/linux/mfd/wm8994/registers.h | 15 ------- trunk/sound/pci/hda/patch_sigmatel.c | 11 +++++ trunk/sound/soc/codecs/wm8994.c | 43 ++++++------------- 6 files changed, 28 insertions(+), 46 deletions(-) diff --git a/[refs] b/[refs] index 9977f15ca3a6..90a7ff1ecc49 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bcca5fa6d786755abe91f5856c9647a2ca2a51b6 +refs/heads/master: f7f9bdfadfda07afb904a9767468e38c2d1a6033 diff --git a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt index 4f3443230d89..edad99abec21 100644 --- a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt @@ -349,6 +349,7 @@ STAC92HD83* ref Reference board mic-ref Reference board with power management for ports dell-s14 Dell laptop + dell-vostro-3500 Dell Vostro 3500 laptop hp HP laptops with (inverted) mute-LED hp-dv7-4000 HP dv-7 4000 auto BIOS setup (default) diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index c802e5fa2d11..4808256446f2 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -6122,7 +6122,7 @@ F: sound/ SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) M: Liam Girdwood M: Mark Brown -T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git L: alsa-devel@alsa-project.org (moderated for non-subscribers) W: http://alsa-project.org/main/index.php/ASoC S: Supported diff --git a/trunk/include/linux/mfd/wm8994/registers.h b/trunk/include/linux/mfd/wm8994/registers.h index 83a9caec0e43..fae295048a8b 100644 --- a/trunk/include/linux/mfd/wm8994/registers.h +++ b/trunk/include/linux/mfd/wm8994/registers.h @@ -1962,21 +1962,6 @@ #define WM8958_MICB2_DISCH_SHIFT 0 /* MICB2_DISCH */ #define WM8958_MICB2_DISCH_WIDTH 1 /* MICB2_DISCH */ -/* - * R210 (0xD2) - Mic Detect 3 - */ -#define WM8958_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */ -#define WM8958_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */ -#define WM8958_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */ -#define WM8958_MICD_VALID 0x0002 /* MICD_VALID */ -#define WM8958_MICD_VALID_MASK 0x0002 /* MICD_VALID */ -#define WM8958_MICD_VALID_SHIFT 1 /* MICD_VALID */ -#define WM8958_MICD_VALID_WIDTH 1 /* MICD_VALID */ -#define WM8958_MICD_STS 0x0001 /* MICD_STS */ -#define WM8958_MICD_STS_MASK 0x0001 /* MICD_STS */ -#define WM8958_MICD_STS_SHIFT 0 /* MICD_STS */ -#define WM8958_MICD_STS_WIDTH 1 /* MICD_STS */ - /* * R76 (0x4C) - Charge Pump (1) */ diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 4e715fefebef..edc2b7bc177c 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -95,6 +95,7 @@ enum { STAC_92HD83XXX_REF, STAC_92HD83XXX_PWR_REF, STAC_DELL_S14, + STAC_DELL_VOSTRO_3500, STAC_92HD83XXX_HP, STAC_92HD83XXX_HP_cNB11_INTQUAD, STAC_HP_DV7_4000, @@ -1659,6 +1660,12 @@ static const unsigned int dell_s14_pin_configs[10] = { 0x40f000f0, 0x40f000f0, }; +static const unsigned int dell_vostro_3500_pin_configs[10] = { + 0x02a11020, 0x0221101f, 0x400000f0, 0x90170110, + 0x400000f1, 0x400000f2, 0x400000f3, 0x90a60160, + 0x400000f4, 0x400000f5, +}; + static const unsigned int hp_dv7_4000_pin_configs[10] = { 0x03a12050, 0x0321201f, 0x40f000f0, 0x90170110, 0x40f000f0, 0x40f000f0, 0x90170110, 0xd5a30140, @@ -1675,6 +1682,7 @@ static const unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs, [STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs, [STAC_DELL_S14] = dell_s14_pin_configs, + [STAC_DELL_VOSTRO_3500] = dell_vostro_3500_pin_configs, [STAC_92HD83XXX_HP_cNB11_INTQUAD] = hp_cNB11_intquad_pin_configs, [STAC_HP_DV7_4000] = hp_dv7_4000_pin_configs, }; @@ -1684,6 +1692,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { [STAC_92HD83XXX_REF] = "ref", [STAC_92HD83XXX_PWR_REF] = "mic-ref", [STAC_DELL_S14] = "dell-s14", + [STAC_DELL_VOSTRO_3500] = "dell-vostro-3500", [STAC_92HD83XXX_HP] = "hp", [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", [STAC_HP_DV7_4000] = "hp-dv7-4000", @@ -1697,6 +1706,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { "DFI LanParty", STAC_92HD83XXX_REF), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba, "unknown Dell", STAC_DELL_S14), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028, + "Dell Vostro 3500", STAC_DELL_VOSTRO_3500), SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x3600, "HP", STAC_92HD83XXX_HP), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656, diff --git a/trunk/sound/soc/codecs/wm8994.c b/trunk/sound/soc/codecs/wm8994.c index 9c982e47eb99..6b73efd26991 100644 --- a/trunk/sound/soc/codecs/wm8994.c +++ b/trunk/sound/soc/codecs/wm8994.c @@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = { static int wm8994_readable(struct snd_soc_codec *codec, unsigned int reg) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); - struct wm8994 *control = codec->control_data; + struct wm8994 *control = wm8994->control_data; switch (reg) { case WM8994_GPIO_1: @@ -3030,34 +3030,19 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) { struct wm8994_priv *wm8994 = data; struct snd_soc_codec *codec = wm8994->codec; - int reg, count; - - /* We may occasionally read a detection without an impedence - * range being provided - if that happens loop again. - */ - count = 10; - do { - reg = snd_soc_read(codec, WM8958_MIC_DETECT_3); - if (reg < 0) { - dev_err(codec->dev, - "Failed to read mic detect status: %d\n", - reg); - return IRQ_NONE; - } - - if (!(reg & WM8958_MICD_VALID)) { - dev_dbg(codec->dev, "Mic detect data not valid\n"); - goto out; - } - - if (!(reg & WM8958_MICD_STS) || (reg & WM8958_MICD_LVL_MASK)) - break; + int reg; - msleep(1); - } while (count--); + reg = snd_soc_read(codec, WM8958_MIC_DETECT_3); + if (reg < 0) { + dev_err(codec->dev, "Failed to read mic detect status: %d\n", + reg); + return IRQ_NONE; + } - if (count == 0) - dev_warn(codec->dev, "No impedence range reported for jack\n"); + if (!(reg & WM8958_MICD_VALID)) { + dev_dbg(codec->dev, "Mic detect data not valid\n"); + goto out; + } #ifndef CONFIG_SND_SOC_WM8994_MODULE trace_snd_soc_jack_irq(dev_name(codec->dev)); @@ -3195,9 +3180,9 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) wm8994_request_irq(codec->control_data, WM8994_IRQ_FIFOS_ERR, wm8994_fifo_error, "FIFO error", codec); - wm8994_request_irq(codec->control_data, WM8994_IRQ_TEMP_WARN, + wm8994_request_irq(wm8994->control_data, WM8994_IRQ_TEMP_WARN, wm8994_temp_warn, "Thermal warning", codec); - wm8994_request_irq(codec->control_data, WM8994_IRQ_TEMP_SHUT, + wm8994_request_irq(wm8994->control_data, WM8994_IRQ_TEMP_SHUT, wm8994_temp_shut, "Thermal shutdown", codec); ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_DCS_DONE,