aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-10-13 10:09:56 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-13 10:09:56 -0400
commitfb66ebd88471cd2cc1205536dfc781b2f4c1d6b5 (patch)
treeff153022eb8d85fba13b976adac4435a75740c73 /sound
parent29a4f2d31c03756bf24883e567a8c3b4ee5df1f4 (diff)
parent491dc0437d4c56d11f78113eca3953cff87314f3 (diff)
Merge branch 'fix/hda' into for-linus
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_nvhdmi.c31
-rw-r--r--sound/pci/hda/patch_realtek.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c29
3 files changed, 54 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c
index c8435c9a97f9..9fb60276f5c9 100644
--- a/sound/pci/hda/patch_nvhdmi.c
+++ b/sound/pci/hda/patch_nvhdmi.c
@@ -29,6 +29,9 @@
29#include "hda_codec.h" 29#include "hda_codec.h"
30#include "hda_local.h" 30#include "hda_local.h"
31 31
32/* define below to restrict the supported rates and formats */
33/* #define LIMITED_RATE_FMT_SUPPORT */
34
32struct nvhdmi_spec { 35struct nvhdmi_spec {
33 struct hda_multi_out multiout; 36 struct hda_multi_out multiout;
34 37
@@ -60,6 +63,22 @@ static struct hda_verb nvhdmi_basic_init[] = {
60 {} /* terminator */ 63 {} /* terminator */
61}; 64};
62 65
66#ifdef LIMITED_RATE_FMT_SUPPORT
67/* support only the safe format and rate */
68#define SUPPORTED_RATES SNDRV_PCM_RATE_48000
69#define SUPPORTED_MAXBPS 16
70#define SUPPORTED_FORMATS SNDRV_PCM_FMTBIT_S16_LE
71#else
72/* support all rates and formats */
73#define SUPPORTED_RATES \
74 (SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
75 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\
76 SNDRV_PCM_RATE_192000)
77#define SUPPORTED_MAXBPS 24
78#define SUPPORTED_FORMATS \
79 (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE)
80#endif
81
63/* 82/*
64 * Controls 83 * Controls
65 */ 84 */
@@ -258,9 +277,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch = {
258 .channels_min = 2, 277 .channels_min = 2,
259 .channels_max = 8, 278 .channels_max = 8,
260 .nid = Nv_Master_Convert_nid, 279 .nid = Nv_Master_Convert_nid,
261 .rates = SNDRV_PCM_RATE_48000, 280 .rates = SUPPORTED_RATES,
262 .maxbps = 16, 281 .maxbps = SUPPORTED_MAXBPS,
263 .formats = SNDRV_PCM_FMTBIT_S16_LE, 282 .formats = SUPPORTED_FORMATS,
264 .ops = { 283 .ops = {
265 .open = nvhdmi_dig_playback_pcm_open, 284 .open = nvhdmi_dig_playback_pcm_open,
266 .close = nvhdmi_dig_playback_pcm_close_8ch, 285 .close = nvhdmi_dig_playback_pcm_close_8ch,
@@ -273,9 +292,9 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_2ch = {
273 .channels_min = 2, 292 .channels_min = 2,
274 .channels_max = 2, 293 .channels_max = 2,
275 .nid = Nv_Master_Convert_nid, 294 .nid = Nv_Master_Convert_nid,
276 .rates = SNDRV_PCM_RATE_48000, 295 .rates = SUPPORTED_RATES,
277 .maxbps = 16, 296 .maxbps = SUPPORTED_MAXBPS,
278 .formats = SNDRV_PCM_FMTBIT_S16_LE, 297 .formats = SUPPORTED_FORMATS,
279 .ops = { 298 .ops = {
280 .open = nvhdmi_dig_playback_pcm_open, 299 .open = nvhdmi_dig_playback_pcm_open,
281 .close = nvhdmi_dig_playback_pcm_close_2ch, 300 .close = nvhdmi_dig_playback_pcm_close_2ch,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 470fd74a0a1a..c08ca660daba 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -275,7 +275,7 @@ struct alc_spec {
275 struct snd_kcontrol_new *cap_mixer; /* capture mixer */ 275 struct snd_kcontrol_new *cap_mixer; /* capture mixer */
276 unsigned int beep_amp; /* beep amp value, set via set_beep_amp() */ 276 unsigned int beep_amp; /* beep amp value, set via set_beep_amp() */
277 277
278 const struct hda_verb *init_verbs[5]; /* initialization verbs 278 const struct hda_verb *init_verbs[10]; /* initialization verbs
279 * don't forget NULL 279 * don't forget NULL
280 * termination! 280 * termination!
281 */ 281 */
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a9b26828a651..66c0876bf734 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -158,6 +158,7 @@ enum {
158 STAC_D965_5ST_NO_FP, 158 STAC_D965_5ST_NO_FP,
159 STAC_DELL_3ST, 159 STAC_DELL_3ST,
160 STAC_DELL_BIOS, 160 STAC_DELL_BIOS,
161 STAC_927X_VOLKNOB,
161 STAC_927X_MODELS 162 STAC_927X_MODELS
162}; 163};
163 164
@@ -907,6 +908,16 @@ static struct hda_verb d965_core_init[] = {
907 {} 908 {}
908}; 909};
909 910
911static struct hda_verb dell_3st_core_init[] = {
912 /* don't set delta bit */
913 {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f},
914 /* unmute node 0x1b */
915 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
916 /* select node 0x03 as DAC */
917 {0x0b, AC_VERB_SET_CONNECT_SEL, 0x01},
918 {}
919};
920
910static struct hda_verb stac927x_core_init[] = { 921static struct hda_verb stac927x_core_init[] = {
911 /* set master volume and direct control */ 922 /* set master volume and direct control */
912 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 923 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
@@ -915,6 +926,14 @@ static struct hda_verb stac927x_core_init[] = {
915 {} 926 {}
916}; 927};
917 928
929static struct hda_verb stac927x_volknob_core_init[] = {
930 /* don't set delta bit */
931 {0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0x7f},
932 /* enable analog pc beep path */
933 {0x01, AC_VERB_SET_DIGI_CONVERT_2, 1 << 5},
934 {}
935};
936
918static struct hda_verb stac9205_core_init[] = { 937static struct hda_verb stac9205_core_init[] = {
919 /* set master volume and direct control */ 938 /* set master volume and direct control */
920 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 939 { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
@@ -1999,6 +2018,7 @@ static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = {
1999 [STAC_D965_5ST_NO_FP] = d965_5st_no_fp_pin_configs, 2018 [STAC_D965_5ST_NO_FP] = d965_5st_no_fp_pin_configs,
2000 [STAC_DELL_3ST] = dell_3st_pin_configs, 2019 [STAC_DELL_3ST] = dell_3st_pin_configs,
2001 [STAC_DELL_BIOS] = NULL, 2020 [STAC_DELL_BIOS] = NULL,
2021 [STAC_927X_VOLKNOB] = NULL,
2002}; 2022};
2003 2023
2004static const char *stac927x_models[STAC_927X_MODELS] = { 2024static const char *stac927x_models[STAC_927X_MODELS] = {
@@ -2010,6 +2030,7 @@ static const char *stac927x_models[STAC_927X_MODELS] = {
2010 [STAC_D965_5ST_NO_FP] = "5stack-no-fp", 2030 [STAC_D965_5ST_NO_FP] = "5stack-no-fp",
2011 [STAC_DELL_3ST] = "dell-3stack", 2031 [STAC_DELL_3ST] = "dell-3stack",
2012 [STAC_DELL_BIOS] = "dell-bios", 2032 [STAC_DELL_BIOS] = "dell-bios",
2033 [STAC_927X_VOLKNOB] = "volknob",
2013}; 2034};
2014 2035
2015static struct snd_pci_quirk stac927x_cfg_tbl[] = { 2036static struct snd_pci_quirk stac927x_cfg_tbl[] = {
@@ -2045,6 +2066,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
2045 "Intel D965", STAC_D965_5ST), 2066 "Intel D965", STAC_D965_5ST),
2046 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2500, 2067 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2500,
2047 "Intel D965", STAC_D965_5ST), 2068 "Intel D965", STAC_D965_5ST),
2069 /* volume-knob fixes */
2070 SND_PCI_QUIRK_VENDOR(0x10cf, "FSC", STAC_927X_VOLKNOB),
2048 {} /* terminator */ 2071 {} /* terminator */
2049}; 2072};
2050 2073
@@ -5612,10 +5635,14 @@ static int patch_stac927x(struct hda_codec *codec)
5612 spec->dmic_nids = stac927x_dmic_nids; 5635 spec->dmic_nids = stac927x_dmic_nids;
5613 spec->num_dmics = STAC927X_NUM_DMICS; 5636 spec->num_dmics = STAC927X_NUM_DMICS;
5614 5637
5615 spec->init = d965_core_init; 5638 spec->init = dell_3st_core_init;
5616 spec->dmux_nids = stac927x_dmux_nids; 5639 spec->dmux_nids = stac927x_dmux_nids;
5617 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); 5640 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
5618 break; 5641 break;
5642 case STAC_927X_VOLKNOB:
5643 spec->num_dmics = 0;
5644 spec->init = stac927x_volknob_core_init;
5645 break;
5619 default: 5646 default:
5620 spec->num_dmics = 0; 5647 spec->num_dmics = 0;
5621 spec->init = stac927x_core_init; 5648 spec->init = stac927x_core_init;