From f0613d5752d8f7d1d02e6d40947f38877fdf9c90 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 9 Oct 2009 17:44:08 +0200 Subject: ALSA: hda - Add full rates/formats support for Nvidia HDMI Allow Nvidia HDMI to support more possible sample rates and formats. At best, the really supported rates and formats should be determined together with the negotiation with the HDMI receiver, but it's currently not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3 standard in this regard). As a compromise, we enable all bits, assuming that all recent devices do support such rates/formats. Tested-by: Alan Alan Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_nvhdmi.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index c8435c9a97f..23ad9398311 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c @@ -29,6 +29,9 @@ #include "hda_codec.h" #include "hda_local.h" +/* define below to restrict the supported rates and formats */ +#define LIMITED_RATE_FMT_SUPPORT + struct nvhdmi_spec { struct hda_multi_out multiout; @@ -60,6 +63,22 @@ static struct hda_verb nvhdmi_basic_init[] = { {} /* terminator */ }; +#ifdef LIMITED_RATE_FMT_SUPPORT +/* support only the safe format and rate */ +#define SUPPORTED_RATES SNDRV_PCM_RATE_48000 +#define SUPPORTED_MAXBPS 16 +#define SUPPORTED_FORMATS SNDRV_PCM_FMTBIT_S16_LE +#else +/* support all rates and formats */ +#define SUPPORTED_RATES \ + (SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\ + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\ + SNDRV_PCM_RATE_192000) +#define SUPPORTED_MAXBPS 24 +#define SUPPORTED_FORMATS \ + (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE) +#endif + /* * Controls */ @@ -258,9 +277,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch = { .channels_min = 2, .channels_max = 8, .nid = Nv_Master_Convert_nid, - .rates = SNDRV_PCM_RATE_48000, - .maxbps = 16, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SUPPORTED_RATES, + .maxbps = SUPPORTED_MAXBPS, + .formats = SUPPORTED_FORMATS, .ops = { .open = nvhdmi_dig_playback_pcm_open, .close = nvhdmi_dig_playback_pcm_close_8ch, @@ -273,9 +292,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_2ch = { .channels_min = 2, .channels_max = 2, .nid = Nv_Master_Convert_nid, - .rates = SNDRV_PCM_RATE_48000, - .maxbps = 16, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SUPPORTED_RATES, + .maxbps = SUPPORTED_MAXBPS, + .formats = SUPPORTED_FORMATS, .ops = { .open = nvhdmi_dig_playback_pcm_open, .close = nvhdmi_dig_playback_pcm_close_2ch, -- cgit v1.2.3 From 43189a38dada053b820fafc47de8ba665dd3a618 Mon Sep 17 00:00:00 2001 From: Robert Hancock Date: Fri, 9 Oct 2009 22:08:58 -0600 Subject: ALSA: ice1724: Fix surround on Chaintech AV-710 Fix the num_total_dacs setting for Chaintech AV710. The existing comment that only PSDOUT0 is connected is correct, but since the card is using packed AC97 mode to send 6 channels to the codec, num_total_dacs should be set to 6 and not 2. This allows 6-channel surround to work. Also clarify a comment regarding the additional WM8728 codec on this card (it's connected to the SPDIF output and always receives the same data). Signed-off-by: Robert Hancock Signed-off-by: Takashi Iwai --- sound/pci/ice1712/amp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c index 37564300b50..6da21a2bcad 100644 --- a/sound/pci/ice1712/amp.c +++ b/sound/pci/ice1712/amp.c @@ -52,11 +52,13 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice) /* only use basic functionality for now */ - ice->num_total_dacs = 2; /* only PSDOUT0 is connected */ + /* VT1616 6ch codec connected to PSDOUT0 using packed mode */ + ice->num_total_dacs = 6; ice->num_total_adcs = 2; - /* Chaintech AV-710 has another codecs, which need initialization */ - /* initialize WM8728 codec */ + /* Chaintech AV-710 has another WM8728 codec connected to PSDOUT4 + (shared with the SPDIF output). Mixer control for this codec + is not yet supported. */ if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) { for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) wm_put(ice, wm_inits[i], wm_inits[i+1]); -- cgit v1.2.3 From bd3c200e6d5495343c91db66d2acf1853b57a141 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sun, 11 Oct 2009 11:37:22 +0200 Subject: ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@ If two streams are started immediately after one another (such as a playback and a recording stream), the call to set hw params fails with EBUSY. This patch makes the call succeed, so playback and recording will work properly. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- sound/pci/ice1712/ice1724.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 76b717dae4b..10fc92c0557 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -648,7 +648,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate, (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) { /* running? we cannot change the rate now... */ spin_unlock_irqrestore(&ice->reg_lock, flags); - return -EBUSY; + return ((rate == ice->cur_rate) && !force) ? 0 : -EBUSY; } if (!force && is_pro_rate_locked(ice)) { spin_unlock_irqrestore(&ice->reg_lock, flags); -- cgit v1.2.3 From 2d9c648295d7bc376305337d29f540a5e411f632 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 13 Oct 2009 08:06:55 +0200 Subject: ALSA: hda - Fix overflow of spec->init_verbs in patch_realtek.c ALC861-VD lenovo model causes overflow of spec->init_verbs entries due to the recent changes. Simply increase the array size to avoid the overflow. Reported-by: Luca Tettamanti Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 470fd74a0a1..c08ca660dab 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -275,7 +275,7 @@ struct alc_spec { struct snd_kcontrol_new *cap_mixer; /* capture mixer */ unsigned int beep_amp; /* beep amp value, set via set_beep_amp() */ - const struct hda_verb *init_verbs[5]; /* initialization verbs + const struct hda_verb *init_verbs[10]; /* initialization verbs * don't forget NULL * termination! */ -- cgit v1.2.3 From 9c6b8dcefe9a39f36ba11bdd523c0ac5246514c9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 13 Oct 2009 09:34:28 +0200 Subject: ALSA: bt87x - Add a whitelist for Pinnacle PCTV (11bd:0012) Signed-off-by: Takashi Iwai --- sound/pci/bt87x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 24585c6c6d0..4e2b925a94c 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c @@ -808,6 +808,8 @@ static struct pci_device_id snd_bt87x_ids[] = { BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1002, 0x0001, GENERIC), /* Leadtek Winfast tv 2000xp delux */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x107d, 0x6606, GENERIC), + /* Pinnacle PCTV */ + BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x11bd, 0x0012, GENERIC), /* Voodoo TV 200 */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x121a, 0x3000, GENERIC), /* Askey Computer Corp. MagicTView'99 */ -- cgit v1.2.3 From 54930531a00af5a1c33361a02e67dd1802110465 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 11 Oct 2009 17:38:29 +0200 Subject: ALSA: hda - Fix mute sound with STAC9227/9228 codecs On FSC laptops, the sound gets muted gradually when the volume is chnaged. This is due to the wrong volume-knob widget setup. The delta bit (bit 7) shouldn't be set for these devices. This patch adds a new quirk to set the value 0x7f to the widget 0x24 instead of 0xff. Reference: Novell bnc#546006 http://bugzilla.novell.com/show_bug.cgi?id=546006 Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/HD-Audio-Models.txt | 1 + sound/pci/hda/patch_sigmatel.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index a2643cfe793..4bf953b55b8 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt @@ -359,6 +359,7 @@ STAC9227/9228/9229/927x 5stack-no-fp D965 5stack without front panel dell-3stack Dell Dimension E520 dell-bios Fixes with Dell BIOS setup + volknob Fixes with volume-knob widget 0x24 auto BIOS setup (default) STAC92HD71B* diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index a9b26828a65..75736827425 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -158,6 +158,7 @@ enum { STAC_D965_5ST_NO_FP, STAC_DELL_3ST, STAC_DELL_BIOS, + STAC_927X_VOLKNOB, STAC_927X_MODELS }; @@ -915,6 +916,14 @@ static struct hda_verb stac927x_core_init[] = { {} }; +static struct hda_verb stac927x_volknob_core_init[] = { + /* don't set delta bit */ + {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f}, + /* enable analog pc beep path */ + {0x01, AC_VERB_SET_DIGI_CONVERT_2, 1 << 5}, + {} +}; + static struct hda_verb stac9205_core_init[] = { /* set master volume and direct control */ { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, @@ -1999,6 +2008,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = { [STAC_D965_5ST_NO_FP] = d965_5st_no_fp_pin_configs, [STAC_DELL_3ST] = dell_3st_pin_configs, [STAC_DELL_BIOS] = NULL, + [STAC_927X_VOLKNOB] = NULL, }; static const char *stac927x_models[STAC_927X_MODELS] = { @@ -2010,6 +2020,7 @@ static const char *stac927x_models[STAC_927X_MODELS] = { [STAC_D965_5ST_NO_FP] = "5stack-no-fp", [STAC_DELL_3ST] = "dell-3stack", [STAC_DELL_BIOS] = "dell-bios", + [STAC_927X_VOLKNOB] = "volknob", }; static struct snd_pci_quirk stac927x_cfg_tbl[] = { @@ -2045,6 +2056,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { "Intel D965", STAC_D965_5ST), SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2500, "Intel D965", STAC_D965_5ST), + /* volume-knob fixes */ + SND_PCI_QUIRK_VENDOR(0x10cf, "FSC", STAC_927X_VOLKNOB), {} /* terminator */ }; @@ -5616,6 +5629,10 @@ static int patch_stac927x(struct hda_codec *codec) spec->dmux_nids = stac927x_dmux_nids; spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); break; + case STAC_927X_VOLKNOB: + spec->num_dmics = 0; + spec->init = stac927x_volknob_core_init; + break; default: spec->num_dmics = 0; spec->init = stac927x_core_init; -- cgit v1.2.3 From ccca7cdc1b8dd2e7b67e9289a6abf117b11cbe6b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 13 Oct 2009 15:32:21 +0200 Subject: ALSA: hda - Fix volume-knob setup for Dell laptops with STAC9228 The volume-knob widget needs to be set with 0x7f instead of 0xff for Dell laptops with STAC9228 codec, too, like the previous commit. Reference: Novell bnc#545013 http://bugzilla.novell.com/show_bug.cgi?id=545013 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 75736827425..66c0876bf73 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -908,6 +908,16 @@ static struct hda_verb d965_core_init[] = { {} }; +static struct hda_verb dell_3st_core_init[] = { + /* don't set delta bit */ + {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f}, + /* unmute node 0x1b */ + {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, + /* select node 0x03 as DAC */ + {0x0b, AC_VERB_SET_CONNECT_SEL, 0x01}, + {} +}; + static struct hda_verb stac927x_core_init[] = { /* set master volume and direct control */ { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, @@ -5625,7 +5635,7 @@ static int patch_stac927x(struct hda_codec *codec) spec->dmic_nids = stac927x_dmic_nids; spec->num_dmics = STAC927X_NUM_DMICS; - spec->init = d965_core_init; + spec->init = dell_3st_core_init; spec->dmux_nids = stac927x_dmux_nids; spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); break; -- cgit v1.2.3 From 29a4f2d31c03756bf24883e567a8c3b4ee5df1f4 Mon Sep 17 00:00:00 2001 From: Philby John Date: Tue, 13 Oct 2009 16:30:22 +0530 Subject: ALSA: aaci: ARM1176 aaci-pl041 AC97 register read timeout After a reboot on an ARM1176 which amounts to a softreset, it has been noted that the ALSA driver does not get registered and the probe fails with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process of reading from a register the SL1TxBusy bit is set indicating that the transceiver is busy and remains so until the default timeout occurs. Set the Power down register 0x26 to an arbitrary value as specified in the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take their default state. Signed-off-by: Philby John Signed-off-by: Takashi Iwai --- sound/arm/aaci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index dc78272fc39..1f0f8213e2d 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -937,6 +937,7 @@ static int __devinit aaci_probe_ac97(struct aaci *aaci) struct snd_ac97 *ac97; int ret; + writel(0, aaci->base + AC97_POWERDOWN); /* * Assert AACIRESET for 2us */ -- cgit v1.2.3 From 491dc0437d4c56d11f78113eca3953cff87314f3 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 13 Oct 2009 16:07:59 +0200 Subject: ALSA: hda - Allow all formats as default for Nvidia HDMI In the commit f0613d5752d8f7d1d02e6d40947f38877fdf9c90 ALSA: hda - Add full rates/formats support for Nvidia HDMI the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot to clear before commit. Let's enable all formats/rates as default. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_nvhdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 23ad9398311..9fb60276f5c 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c @@ -30,7 +30,7 @@ #include "hda_local.h" /* define below to restrict the supported rates and formats */ -#define LIMITED_RATE_FMT_SUPPORT +/* #define LIMITED_RATE_FMT_SUPPORT */ struct nvhdmi_spec { struct hda_multi_out multiout; -- cgit v1.2.3