Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ice1724 - Fix ESI Maya44 capture source control
  ALSA: pcm - Use pgprot_noncached() for MIPS non-coherent archs
  ALSA: virtuoso: fix Xonar D1/DX front panel microphone
  ALSA: hda - Add hp-dv4 model for IDT 92HD71bx
  ALSA: hda - Fix mute-LED GPIO pin for HP dv series
  ALSA: hda: Fix 0 dB for Lenovo models using Conexant CX20549 (Venice)
  • Loading branch information
Linus Torvalds committed May 13, 2010
2 parents aa86f26 + 105ce39 commit fc8e38f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
7 changes: 7 additions & 0 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#include <sound/timer.h>
#include <sound/minors.h>
#include <asm/io.h>
#if defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
#include <dma-coherence.h>
#endif

/*
* Compatibility
Expand Down Expand Up @@ -3184,6 +3187,10 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
substream->runtime->dma_area,
substream->runtime->dma_addr,
area->vm_end - area->vm_start);
#elif defined(CONFIG_MIPS) && defined(CONFIG_DMA_NONCOHERENT)
if (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV &&
!plat_device_is_coherent(substream->dma_buffer.dev.dev))
area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
#endif /* ARCH_HAS_DMA_MMAP_COHERENT */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
Expand Down
7 changes: 4 additions & 3 deletions sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,9 +1197,10 @@ static int patch_cxt5045(struct hda_codec *codec)
case 0x103c:
case 0x1631:
case 0x1734:
/* HP, Packard Bell, & Fujitsu-Siemens laptops have really bad
* sound over 0dB on NID 0x17. Fix max PCM level to 0 dB
* (originally it has 0x2b steps with 0dB offset 0x14)
case 0x17aa:
/* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have
* really bad sound over 0dB on NID 0x17. Fix max PCM level to
* 0 dB (originally it has 0x2b steps with 0dB offset 0x14)
*/
snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
(0x14 << AC_AMPCAP_OFFSET_SHIFT) |
Expand Down
15 changes: 13 additions & 2 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ enum {
STAC_DELL_M4_2,
STAC_DELL_M4_3,
STAC_HP_M4,
STAC_HP_DV4,
STAC_HP_DV5,
STAC_HP_HDX,
STAC_HP_DV4_1222NR,
Expand Down Expand Up @@ -1691,6 +1692,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
[STAC_DELL_M4_2] = dell_m4_2_pin_configs,
[STAC_DELL_M4_3] = dell_m4_3_pin_configs,
[STAC_HP_M4] = NULL,
[STAC_HP_DV4] = NULL,
[STAC_HP_DV5] = NULL,
[STAC_HP_HDX] = NULL,
[STAC_HP_DV4_1222NR] = NULL,
Expand All @@ -1703,6 +1705,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
[STAC_DELL_M4_2] = "dell-m4-2",
[STAC_DELL_M4_3] = "dell-m4-3",
[STAC_HP_M4] = "hp-m4",
[STAC_HP_DV4] = "hp-dv4",
[STAC_HP_DV5] = "hp-dv5",
[STAC_HP_HDX] = "hp-hdx",
[STAC_HP_DV4_1222NR] = "hp-dv4-1222nr",
Expand All @@ -1721,7 +1724,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3080,
"HP", STAC_HP_DV5),
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x30f0,
"HP dv4-7", STAC_HP_DV5),
"HP dv4-7", STAC_HP_DV4),
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3600,
"HP dv4-7", STAC_HP_DV5),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3610,
Expand Down Expand Up @@ -4766,6 +4769,9 @@ static void set_hp_led_gpio(struct hda_codec *codec)
struct sigmatel_spec *spec = codec->spec;
unsigned int gpio;

if (spec->gpio_led)
return;

gpio = snd_hda_param_read(codec, codec->afg, AC_PAR_GPIO_CAP);
gpio &= AC_GPIO_IO_COUNT;
if (gpio > 3)
Expand Down Expand Up @@ -5675,6 +5681,9 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
spec->num_smuxes = 1;
spec->num_dmuxes = 1;
/* fallthrough */
case STAC_HP_DV4:
spec->gpio_led = 0x01;
/* fallthrough */
case STAC_HP_DV5:
snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN);
Expand All @@ -5688,6 +5697,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
spec->num_dmics = 1;
spec->num_dmuxes = 1;
spec->num_smuxes = 1;
spec->gpio_led = 0x08;
break;
}

Expand Down Expand Up @@ -5744,7 +5754,8 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
}

/* enable bass on HP dv7 */
if (spec->board_config == STAC_HP_DV5) {
if (spec->board_config == STAC_HP_DV4 ||
spec->board_config == STAC_HP_DV5) {
unsigned int cap;
cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP);
cap &= AC_GPIO_IO_COUNT;
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/ice1712/maya44.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static int maya_gpio_sw_put(struct snd_kcontrol *kcontrol,

/* known working input slots (0-4) */
#define MAYA_LINE_IN 1 /* in-2 */
#define MAYA_MIC_IN 4 /* in-5 */
#define MAYA_MIC_IN 3 /* in-4 */

static void wm8776_select_input(struct snd_maya44 *chip, int idx, int line)
{
Expand Down Expand Up @@ -393,8 +393,8 @@ static int maya_rec_src_put(struct snd_kcontrol *kcontrol,
int changed;

mutex_lock(&chip->mutex);
changed = maya_set_gpio_bits(chip->ice, GPIO_MIC_RELAY,
sel ? GPIO_MIC_RELAY : 0);
changed = maya_set_gpio_bits(chip->ice, 1 << GPIO_MIC_RELAY,
sel ? (1 << GPIO_MIC_RELAY) : 0);
wm8776_select_input(chip, 0, sel ? MAYA_MIC_IN : MAYA_LINE_IN);
mutex_unlock(&chip->mutex);
return changed;
Expand Down
3 changes: 3 additions & 0 deletions sound/pci/oxygen/xonar_cs43xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <sound/pcm_params.h>
#include <sound/tlv.h>
#include "xonar.h"
#include "cm9780.h"
#include "cs4398.h"
#include "cs4362a.h"

Expand Down Expand Up @@ -172,6 +173,8 @@ static void xonar_d1_init(struct oxygen *chip)
oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA,
GPIO_D1_FRONT_PANEL | GPIO_D1_INPUT_ROUTE);

oxygen_ac97_set_bits(chip, 0, CM9780_JACK, CM9780_FMIC2MIC);

xonar_init_cs53x1(chip);
xonar_enable_output(chip);

Expand Down

0 comments on commit fc8e38f

Please sign in to comment.