Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e8d7bd34
Commit
e8d7bd34
authored
Jan 15, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/hda' into for-linus
parents
eff317d0
1b0652eb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
206 additions
and
34 deletions
+206
-34
Documentation/sound/alsa/HD-Audio-Models.txt
Documentation/sound/alsa/HD-Audio-Models.txt
+10
-2
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+62
-1
sound/pci/hda/hda_local.h
sound/pci/hda/hda_local.h
+3
-0
sound/pci/hda/patch_nvhdmi.c
sound/pci/hda/patch_nvhdmi.c
+2
-0
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_realtek.c
+1
-0
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_sigmatel.c
+128
-31
No files found.
Documentation/sound/alsa/HD-Audio-Models.txt
View file @
e8d7bd34
...
@@ -275,7 +275,8 @@ STAC9200
...
@@ -275,7 +275,8 @@ STAC9200
dell-m25 Dell Inspiron E1505n
dell-m25 Dell Inspiron E1505n
dell-m26 Dell Inspiron 1501
dell-m26 Dell Inspiron 1501
dell-m27 Dell Inspiron E1705/9400
dell-m27 Dell Inspiron E1705/9400
gateway Gateway laptops with EAPD control
gateway-m4 Gateway laptops with EAPD control
gateway-m4-2 Gateway laptops with EAPD control
panasonic Panasonic CF-74
panasonic Panasonic CF-74
STAC9205/9254
STAC9205/9254
...
@@ -302,6 +303,7 @@ STAC9220/9221
...
@@ -302,6 +303,7 @@ STAC9220/9221
macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
imac-intel Intel iMac (eq. type 2)
imac-intel Intel iMac (eq. type 2)
imac-intel-20 Intel iMac (newer version) (eq. type 3)
imac-intel-20 Intel iMac (newer version) (eq. type 3)
ecs202 ECS/PC chips
dell-d81 Dell (unknown)
dell-d81 Dell (unknown)
dell-d82 Dell (unknown)
dell-d82 Dell (unknown)
dell-m81 Dell (unknown)
dell-m81 Dell (unknown)
...
@@ -310,9 +312,13 @@ STAC9220/9221
...
@@ -310,9 +312,13 @@ STAC9220/9221
STAC9202/9250/9251
STAC9202/9250/9251
==================
==================
ref Reference board, base config
ref Reference board, base config
m1 Some Gateway MX series laptops (NX560XL)
m1-2 Some Gateway MX series laptops (MX6453)
m2 Some Gateway MX series laptops (M255)
m2-2 Some Gateway MX series laptops
m2-2 Some Gateway MX series laptops
m3 Some Gateway MX series laptops
m5 Some Gateway MX series laptops (MP6954)
m6 Some Gateway NX series laptops
m6 Some Gateway NX series laptops
pa6 Gateway NX860 series
STAC9227/9228/9229/927x
STAC9227/9228/9229/927x
=======================
=======================
...
@@ -329,6 +335,7 @@ STAC92HD71B*
...
@@ -329,6 +335,7 @@ STAC92HD71B*
dell-m4-1 Dell desktops
dell-m4-1 Dell desktops
dell-m4-2 Dell desktops
dell-m4-2 Dell desktops
dell-m4-3 Dell desktops
dell-m4-3 Dell desktops
hp-m4 HP dv laptops
STAC92HD73*
STAC92HD73*
===========
===========
...
@@ -337,6 +344,7 @@ STAC92HD73*
...
@@ -337,6 +344,7 @@ STAC92HD73*
dell-m6-amic Dell desktops/laptops with analog mics
dell-m6-amic Dell desktops/laptops with analog mics
dell-m6-dmic Dell desktops/laptops with digital mics
dell-m6-dmic Dell desktops/laptops with digital mics
dell-m6 Dell desktops/laptops with both type of mics
dell-m6 Dell desktops/laptops with both type of mics
dell-eq Dell desktops/laptops
STAC92HD83*
STAC92HD83*
===========
===========
...
...
sound/pci/hda/hda_codec.c
View file @
e8d7bd34
...
@@ -2723,6 +2723,67 @@ int snd_hda_check_board_config(struct hda_codec *codec,
...
@@ -2723,6 +2723,67 @@ int snd_hda_check_board_config(struct hda_codec *codec,
}
}
EXPORT_SYMBOL_HDA
(
snd_hda_check_board_config
);
EXPORT_SYMBOL_HDA
(
snd_hda_check_board_config
);
/**
* snd_hda_check_board_codec_sid_config - compare the current codec
subsystem ID with the
config table
This is important for Gateway notebooks with SB450 HDA Audio
where the vendor ID of the PCI device is:
ATI Technologies Inc SB450 HDA Audio [1002:437b]
and the vendor/subvendor are found only at the codec.
* @codec: the HDA codec
* @num_configs: number of config enums
* @models: array of model name strings
* @tbl: configuration table, terminated by null entries
*
* Compares the modelname or PCI subsystem id of the current codec with the
* given configuration table. If a matching entry is found, returns its
* config value (supposed to be 0 or positive).
*
* If no entries are matching, the function returns a negative value.
*/
int
snd_hda_check_board_codec_sid_config
(
struct
hda_codec
*
codec
,
int
num_configs
,
const
char
**
models
,
const
struct
snd_pci_quirk
*
tbl
)
{
const
struct
snd_pci_quirk
*
q
;
/* Search for codec ID */
for
(
q
=
tbl
;
q
->
subvendor
;
q
++
)
{
unsigned
long
vendorid
=
(
q
->
subdevice
)
|
(
q
->
subvendor
<<
16
);
if
(
vendorid
==
codec
->
subsystem_id
)
break
;
}
if
(
!
q
->
subvendor
)
return
-
1
;
tbl
=
q
;
if
(
tbl
->
value
>=
0
&&
tbl
->
value
<
num_configs
)
{
#ifdef CONFIG_SND_DEBUG_DETECT
char
tmp
[
10
];
const
char
*
model
=
NULL
;
if
(
models
)
model
=
models
[
tbl
->
value
];
if
(
!
model
)
{
sprintf
(
tmp
,
"#%d"
,
tbl
->
value
);
model
=
tmp
;
}
snd_printdd
(
KERN_INFO
"hda_codec: model '%s' is selected "
"for config %x:%x (%s)
\n
"
,
model
,
tbl
->
subvendor
,
tbl
->
subdevice
,
(
tbl
->
name
?
tbl
->
name
:
"Unknown device"
));
#endif
return
tbl
->
value
;
}
return
-
1
;
}
EXPORT_SYMBOL_HDA
(
snd_hda_check_board_codec_sid_config
);
/**
/**
* snd_hda_add_new_ctls - create controls from the array
* snd_hda_add_new_ctls - create controls from the array
* @codec: the HDA codec
* @codec: the HDA codec
...
@@ -2815,7 +2876,7 @@ void snd_hda_power_down(struct hda_codec *codec)
...
@@ -2815,7 +2876,7 @@ void snd_hda_power_down(struct hda_codec *codec)
return
;
return
;
if
(
power_save
(
codec
))
{
if
(
power_save
(
codec
))
{
codec
->
power_transition
=
1
;
/* avoid reentrance */
codec
->
power_transition
=
1
;
/* avoid reentrance */
schedule_delayed_work
(
&
codec
->
power_work
,
queue_delayed_work
(
codec
->
bus
->
workq
,
&
codec
->
power_work
,
msecs_to_jiffies
(
power_save
(
codec
)
*
1000
));
msecs_to_jiffies
(
power_save
(
codec
)
*
1000
));
}
}
}
}
...
...
sound/pci/hda/hda_local.h
View file @
e8d7bd34
...
@@ -296,6 +296,9 @@ void snd_print_pcm_bits(int pcm, char *buf, int buflen);
...
@@ -296,6 +296,9 @@ void snd_print_pcm_bits(int pcm, char *buf, int buflen);
int
snd_hda_check_board_config
(
struct
hda_codec
*
codec
,
int
num_configs
,
int
snd_hda_check_board_config
(
struct
hda_codec
*
codec
,
int
num_configs
,
const
char
**
modelnames
,
const
char
**
modelnames
,
const
struct
snd_pci_quirk
*
pci_list
);
const
struct
snd_pci_quirk
*
pci_list
);
int
snd_hda_check_board_codec_sid_config
(
struct
hda_codec
*
codec
,
int
num_configs
,
const
char
**
models
,
const
struct
snd_pci_quirk
*
tbl
);
int
snd_hda_add_new_ctls
(
struct
hda_codec
*
codec
,
int
snd_hda_add_new_ctls
(
struct
hda_codec
*
codec
,
struct
snd_kcontrol_new
*
knew
);
struct
snd_kcontrol_new
*
knew
);
...
...
sound/pci/hda/patch_nvhdmi.c
View file @
e8d7bd34
...
@@ -160,6 +160,7 @@ static int patch_nvhdmi(struct hda_codec *codec)
...
@@ -160,6 +160,7 @@ static int patch_nvhdmi(struct hda_codec *codec)
*/
*/
static
struct
hda_codec_preset
snd_hda_preset_nvhdmi
[]
=
{
static
struct
hda_codec_preset
snd_hda_preset_nvhdmi
[]
=
{
{
.
id
=
0x10de0002
,
.
name
=
"MCP78 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0002
,
.
name
=
"MCP78 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0006
,
.
name
=
"MCP78 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0007
,
.
name
=
"MCP7A HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0007
,
.
name
=
"MCP7A HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0067
,
.
name
=
"MCP67 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de0067
,
.
name
=
"MCP67 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de8001
,
.
name
=
"MCP73 HDMI"
,
.
patch
=
patch_nvhdmi
},
{
.
id
=
0x10de8001
,
.
name
=
"MCP73 HDMI"
,
.
patch
=
patch_nvhdmi
},
...
@@ -167,6 +168,7 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = {
...
@@ -167,6 +168,7 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = {
};
};
MODULE_ALIAS
(
"snd-hda-codec-id:10de0002"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0002"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0006"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0007"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0007"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0067"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de0067"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de8001"
);
MODULE_ALIAS
(
"snd-hda-codec-id:10de8001"
);
...
...
sound/pci/hda/patch_realtek.c
View file @
e8d7bd34
...
@@ -10573,6 +10573,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
...
@@ -10573,6 +10573,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
SND_PCI_QUIRK
(
0x10cf
,
0x142d
,
"Fujitsu Lifebook E8410"
,
ALC262_FUJITSU
),
SND_PCI_QUIRK
(
0x10cf
,
0x142d
,
"Fujitsu Lifebook E8410"
,
ALC262_FUJITSU
),
SND_PCI_QUIRK
(
0x144d
,
0xc032
,
"Samsung Q1 Ultra"
,
ALC262_ULTRA
),
SND_PCI_QUIRK
(
0x144d
,
0xc032
,
"Samsung Q1 Ultra"
,
ALC262_ULTRA
),
SND_PCI_QUIRK
(
0x144d
,
0xc039
,
"Samsung Q1U EL"
,
ALC262_ULTRA
),
SND_PCI_QUIRK
(
0x144d
,
0xc039
,
"Samsung Q1U EL"
,
ALC262_ULTRA
),
SND_PCI_QUIRK
(
0x144d
,
0xc510
,
"Samsung Q45"
,
ALC262_HIPPO
),
SND_PCI_QUIRK
(
0x17aa
,
0x384e
,
"Lenovo 3000 y410"
,
ALC262_LENOVO_3000
),
SND_PCI_QUIRK
(
0x17aa
,
0x384e
,
"Lenovo 3000 y410"
,
ALC262_LENOVO_3000
),
SND_PCI_QUIRK
(
0x17ff
,
0x0560
,
"Benq ED8"
,
ALC262_BENQ_ED8
),
SND_PCI_QUIRK
(
0x17ff
,
0x0560
,
"Benq ED8"
,
ALC262_BENQ_ED8
),
SND_PCI_QUIRK
(
0x17ff
,
0x058d
,
"Benq T31-16"
,
ALC262_BENQ_T31
),
SND_PCI_QUIRK
(
0x17ff
,
0x058d
,
"Benq T31-16"
,
ALC262_BENQ_T31
),
...
...
sound/pci/hda/patch_sigmatel.c
View file @
e8d7bd34
...
@@ -55,7 +55,8 @@ enum {
...
@@ -55,7 +55,8 @@ enum {
STAC_9200_DELL_M25
,
STAC_9200_DELL_M25
,
STAC_9200_DELL_M26
,
STAC_9200_DELL_M26
,
STAC_9200_DELL_M27
,
STAC_9200_DELL_M27
,
STAC_9200_GATEWAY
,
STAC_9200_M4
,
STAC_9200_M4_2
,
STAC_9200_PANASONIC
,
STAC_9200_PANASONIC
,
STAC_9200_MODELS
STAC_9200_MODELS
};
};
...
@@ -89,14 +90,19 @@ enum {
...
@@ -89,14 +90,19 @@ enum {
STAC_DELL_M4_2
,
STAC_DELL_M4_2
,
STAC_DELL_M4_3
,
STAC_DELL_M4_3
,
STAC_HP_M4
,
STAC_HP_M4
,
STAC_HP_DV5
,
STAC_92HD71BXX_MODELS
STAC_92HD71BXX_MODELS
};
};
enum
{
enum
{
STAC_925x_REF
,
STAC_925x_REF
,
STAC_M1
,
STAC_M1_2
,
STAC_M2
,
STAC_M2_2
,
STAC_M2_2
,
STAC_MA6
,
STAC_M3
,
STAC_PA6
,
STAC_M5
,
STAC_M6
,
STAC_925x_MODELS
STAC_925x_MODELS
};
};
...
@@ -331,6 +337,10 @@ static unsigned int stac92hd83xxx_pwr_mapping[4] = {
...
@@ -331,6 +337,10 @@ static unsigned int stac92hd83xxx_pwr_mapping[4] = {
0x03
,
0x0c
,
0x10
,
0x40
,
0x03
,
0x0c
,
0x10
,
0x40
,
};
};
static
hda_nid_t
stac92hd83xxx_amp_nids
[
1
]
=
{
0xc
,
};
static
hda_nid_t
stac92hd71bxx_pwr_nids
[
3
]
=
{
static
hda_nid_t
stac92hd71bxx_pwr_nids
[
3
]
=
{
0x0a
,
0x0d
,
0x0f
0x0a
,
0x0d
,
0x0f
};
};
...
@@ -875,6 +885,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = {
...
@@ -875,6 +885,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = {
static
struct
hda_verb
stac925x_core_init
[]
=
{
static
struct
hda_verb
stac925x_core_init
[]
=
{
/* set dac0mux for dac converter */
/* set dac0mux for dac converter */
{
0x06
,
AC_VERB_SET_CONNECT_SEL
,
0x00
},
{
0x06
,
AC_VERB_SET_CONNECT_SEL
,
0x00
},
/* unmute and set max the selector */
{
0x0e
,
AC_VERB_SET_AMP_GAIN_MUTE
,
0xb07f
},
{}
{}
};
};
...
@@ -1334,6 +1346,15 @@ static unsigned int ref9200_pin_configs[8] = {
...
@@ -1334,6 +1346,15 @@ static unsigned int ref9200_pin_configs[8] = {
0x02a19020
,
0x01a19021
,
0x90100140
,
0x01813122
,
0x02a19020
,
0x01a19021
,
0x90100140
,
0x01813122
,
};
};
static
unsigned
int
gateway9200_m4_pin_configs
[
8
]
=
{
0x400000fe
,
0x404500f4
,
0x400100f0
,
0x90110010
,
0x400100f1
,
0x02a1902e
,
0x500000f2
,
0x500000f3
,
};
static
unsigned
int
gateway9200_m4_2_pin_configs
[
8
]
=
{
0x400000fe
,
0x404500f4
,
0x400100f0
,
0x90110010
,
0x400100f1
,
0x02a1902e
,
0x500000f2
,
0x500000f3
,
};
/*
/*
STAC 9200 pin configs for
STAC 9200 pin configs for
102801A8
102801A8
...
@@ -1464,6 +1485,8 @@ static unsigned int *stac9200_brd_tbl[STAC_9200_MODELS] = {
...
@@ -1464,6 +1485,8 @@ static unsigned int *stac9200_brd_tbl[STAC_9200_MODELS] = {
[
STAC_9200_DELL_M25
]
=
dell9200_m25_pin_configs
,
[
STAC_9200_DELL_M25
]
=
dell9200_m25_pin_configs
,
[
STAC_9200_DELL_M26
]
=
dell9200_m26_pin_configs
,
[
STAC_9200_DELL_M26
]
=
dell9200_m26_pin_configs
,
[
STAC_9200_DELL_M27
]
=
dell9200_m27_pin_configs
,
[
STAC_9200_DELL_M27
]
=
dell9200_m27_pin_configs
,
[
STAC_9200_M4
]
=
gateway9200_m4_pin_configs
,
[
STAC_9200_M4_2
]
=
gateway9200_m4_2_pin_configs
,
[
STAC_9200_PANASONIC
]
=
ref9200_pin_configs
,
[
STAC_9200_PANASONIC
]
=
ref9200_pin_configs
,
};
};
...
@@ -1480,7 +1503,8 @@ static const char *stac9200_models[STAC_9200_MODELS] = {
...
@@ -1480,7 +1503,8 @@ static const char *stac9200_models[STAC_9200_MODELS] = {
[
STAC_9200_DELL_M25
]
=
"dell-m25"
,
[
STAC_9200_DELL_M25
]
=
"dell-m25"
,
[
STAC_9200_DELL_M26
]
=
"dell-m26"
,
[
STAC_9200_DELL_M26
]
=
"dell-m26"
,
[
STAC_9200_DELL_M27
]
=
"dell-m27"
,
[
STAC_9200_DELL_M27
]
=
"dell-m27"
,
[
STAC_9200_GATEWAY
]
=
"gateway"
,
[
STAC_9200_M4
]
=
"gateway-m4"
,
[
STAC_9200_M4_2
]
=
"gateway-m4-2"
,
[
STAC_9200_PANASONIC
]
=
"panasonic"
,
[
STAC_9200_PANASONIC
]
=
"panasonic"
,
};
};
...
@@ -1550,11 +1574,9 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
...
@@ -1550,11 +1574,9 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
/* Panasonic */
/* Panasonic */
SND_PCI_QUIRK
(
0x10f7
,
0x8338
,
"Panasonic CF-74"
,
STAC_9200_PANASONIC
),
SND_PCI_QUIRK
(
0x10f7
,
0x8338
,
"Panasonic CF-74"
,
STAC_9200_PANASONIC
),
/* Gateway machines needs EAPD to be set on resume */
/* Gateway machines needs EAPD to be set on resume */
SND_PCI_QUIRK
(
0x107b
,
0x0205
,
"Gateway S-7110M"
,
STAC_9200_GATEWAY
),
SND_PCI_QUIRK
(
0x107b
,
0x0205
,
"Gateway S-7110M"
,
STAC_9200_M4
),
SND_PCI_QUIRK
(
0x107b
,
0x0317
,
"Gateway MT3423, MX341*"
,
SND_PCI_QUIRK
(
0x107b
,
0x0317
,
"Gateway MT3423, MX341*"
,
STAC_9200_M4_2
),
STAC_9200_GATEWAY
),
SND_PCI_QUIRK
(
0x107b
,
0x0318
,
"Gateway ML3019, MT3707"
,
STAC_9200_M4_2
),
SND_PCI_QUIRK
(
0x107b
,
0x0318
,
"Gateway ML3019, MT3707"
,
STAC_9200_GATEWAY
),
/* OQO Mobile */
/* OQO Mobile */
SND_PCI_QUIRK
(
0x1106
,
0x3288
,
"OQO Model 2"
,
STAC_9200_OQO
),
SND_PCI_QUIRK
(
0x1106
,
0x3288
,
"OQO Model 2"
,
STAC_9200_OQO
),
{}
/* terminator */
{}
/* terminator */
...
@@ -1565,44 +1587,85 @@ static unsigned int ref925x_pin_configs[8] = {
...
@@ -1565,44 +1587,85 @@ static unsigned int ref925x_pin_configs[8] = {
0x90a70320
,
0x02214210
,
0x01019020
,
0x9033032e
,
0x90a70320
,
0x02214210
,
0x01019020
,
0x9033032e
,
};
};
static
unsigned
int
stac925x
_MA6
_pin_configs
[
8
]
=
{
static
unsigned
int
stac925x
M1
_pin_configs
[
8
]
=
{
0x40c003f
0
,
0x424503f2
,
0x01813022
,
0x02a19021
,
0x40c003f
4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x
90a70320
,
0x90100211
,
0x400003f1
,
0x9033032e
,
0x
40a000f0
,
0x90100210
,
0x400003f1
,
0x9033032e
,
};
};
static
unsigned
int
stac925x_PA6_pin_configs
[
8
]
=
{
static
unsigned
int
stac925xM1_2_pin_configs
[
8
]
=
{
0x40c003f0
,
0x424503f2
,
0x01813022
,
0x02a19021
,
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x50a103f0
,
0x90100211
,
0x400003f1
,
0x9033032e
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x9033032e
,
};
static
unsigned
int
stac925xM2_pin_configs
[
8
]
=
{
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x9033032e
,
};
};
static
unsigned
int
stac925xM2_2_pin_configs
[
8
]
=
{
static
unsigned
int
stac925xM2_2_pin_configs
[
8
]
=
{
0x40c003f3
,
0x424503f2
,
0x04180011
,
0x02a19020
,
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x50a103f0
,
0x90100212
,
0x400003f1
,
0x9033032e
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x9033032e
,
};
static
unsigned
int
stac925xM3_pin_configs
[
8
]
=
{
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x503303f3
,
};
static
unsigned
int
stac925xM5_pin_configs
[
8
]
=
{
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x9033032e
,
};
static
unsigned
int
stac925xM6_pin_configs
[
8
]
=
{
0x40c003f4
,
0x424503f2
,
0x400000f3
,
0x02a19020
,
0x40a000f0
,
0x90100210
,
0x400003f1
,
0x90330320
,
};
};
static
unsigned
int
*
stac925x_brd_tbl
[
STAC_925x_MODELS
]
=
{
static
unsigned
int
*
stac925x_brd_tbl
[
STAC_925x_MODELS
]
=
{
[
STAC_REF
]
=
ref925x_pin_configs
,
[
STAC_REF
]
=
ref925x_pin_configs
,
[
STAC_M1
]
=
stac925xM1_pin_configs
,
[
STAC_M1_2
]
=
stac925xM1_2_pin_configs
,
[
STAC_M2
]
=
stac925xM2_pin_configs
,
[
STAC_M2_2
]
=
stac925xM2_2_pin_configs
,
[
STAC_M2_2
]
=
stac925xM2_2_pin_configs
,
[
STAC_MA6
]
=
stac925x_MA6_pin_configs
,
[
STAC_M3
]
=
stac925xM3_pin_configs
,
[
STAC_PA6
]
=
stac925x_PA6_pin_configs
,
[
STAC_M5
]
=
stac925xM5_pin_configs
,
[
STAC_M6
]
=
stac925xM6_pin_configs
,
};
};
static
const
char
*
stac925x_models
[
STAC_925x_MODELS
]
=
{
static
const
char
*
stac925x_models
[
STAC_925x_MODELS
]
=
{
[
STAC_REF
]
=
"ref"
,
[
STAC_REF
]
=
"ref"
,
[
STAC_M1
]
=
"m1"
,
[
STAC_M1_2
]
=
"m1-2"
,
[
STAC_M2
]
=
"m2"
,
[
STAC_M2_2
]
=
"m2-2"
,
[
STAC_M2_2
]
=
"m2-2"
,
[
STAC_MA6
]
=
"m6"
,
[
STAC_M3
]
=
"m3"
,
[
STAC_PA6
]
=
"pa6"
,
[
STAC_M5
]
=
"m5"
,
[
STAC_M6
]
=
"m6"
,
};
static
struct
snd_pci_quirk
stac925x_codec_id_cfg_tbl
[]
=
{
SND_PCI_QUIRK
(
0x107b
,
0x0316
,
"Gateway M255"
,
STAC_M2
),
SND_PCI_QUIRK
(
0x107b
,
0x0366
,
"Gateway MP6954"
,
STAC_M5
),
SND_PCI_QUIRK
(
0x107b
,
0x0461
,
"Gateway NX560XL"
,
STAC_M1
),
SND_PCI_QUIRK
(
0x107b
,
0x0681
,
"Gateway NX860"
,
STAC_M2
),
SND_PCI_QUIRK
(
0x107b
,
0x0367
,
"Gateway MX6453"
,
STAC_M1_2
),
/* Not sure about the brand name for those */
SND_PCI_QUIRK
(
0x107b
,
0x0281
,
"Gateway mobile"
,
STAC_M1
),
SND_PCI_QUIRK
(
0x107b
,
0x0507
,
"Gateway mobile"
,
STAC_M3
),
SND_PCI_QUIRK
(
0x107b
,
0x0281
,
"Gateway mobile"
,
STAC_M6
),
SND_PCI_QUIRK
(
0x107b
,
0x0685
,
"Gateway mobile"
,
STAC_M2_2
),
{}
/* terminator */
};
};
static
struct
snd_pci_quirk
stac925x_cfg_tbl
[]
=
{
static
struct
snd_pci_quirk
stac925x_cfg_tbl
[]
=
{
/* SigmaTel reference board */
/* SigmaTel reference board */
SND_PCI_QUIRK
(
PCI_VENDOR_ID_INTEL
,
0x2668
,
"DFI LanParty"
,
STAC_REF
),
SND_PCI_QUIRK
(
PCI_VENDOR_ID_INTEL
,
0x2668
,
"DFI LanParty"
,
STAC_REF
),
SND_PCI_QUIRK
(
0x8384
,
0x7632
,
"Stac9202 Reference Board"
,
STAC_REF
),
SND_PCI_QUIRK
(
0x8384
,
0x7632
,
"Stac9202 Reference Board"
,
STAC_REF
),
SND_PCI_QUIRK
(
0x107b
,
0x0316
,
"Gateway M255"
,
STAC_REF
),
SND_PCI_QUIRK
(
0x107b
,
0x0366
,
"Gateway MP6954"
,
STAC_REF
),
/* Default table for unknown ID */
SND_PCI_QUIRK
(
0x107b
,
0x0461
,
"Gateway NX560XL"
,
STAC_MA6
),
SND_PCI_QUIRK
(
0x1002
,
0x437b
,
"Gateway mobile"
,
STAC_M2_2
),
SND_PCI_QUIRK
(
0x107b
,
0x0681
,
"Gateway NX860"
,
STAC_PA6
),
SND_PCI_QUIRK
(
0x1002
,
0x437b
,
"Gateway MX6453"
,
STAC_M2_2
),
{}
/* terminator */
{}
/* terminator */
};
};
...
@@ -1682,7 +1745,7 @@ static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
...
@@ -1682,7 +1745,7 @@ static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
static
struct
snd_pci_quirk
stac92hd83xxx_cfg_tbl
[]
=
{
static
struct
snd_pci_quirk
stac92hd83xxx_cfg_tbl
[]
=
{
/* SigmaTel reference board */
/* SigmaTel reference board */
SND_PCI_QUIRK
(
PCI_VENDOR_ID_INTEL
,
0x2668
,
SND_PCI_QUIRK
(
PCI_VENDOR_ID_INTEL
,
0x2668
,
"DFI LanParty"
,
STAC_92HD
71B
XX_REF
),
"DFI LanParty"
,
STAC_92HD
83X
XX_REF
),
{}
/* terminator */
{}
/* terminator */
};
};
...
@@ -1716,6 +1779,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
...
@@ -1716,6 +1779,7 @@ static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
[
STAC_DELL_M4_2
]
=
dell_m4_2_pin_configs
,
[
STAC_DELL_M4_2
]
=
dell_m4_2_pin_configs
,
[
STAC_DELL_M4_3
]
=
dell_m4_3_pin_configs
,
[
STAC_DELL_M4_3
]
=
dell_m4_3_pin_configs
,
[
STAC_HP_M4
]
=
NULL
,
[
STAC_HP_M4
]
=
NULL
,
[
STAC_HP_DV5
]
=
NULL
,
};
};
static
const
char
*
stac92hd71bxx_models
[
STAC_92HD71BXX_MODELS
]
=
{
static
const
char
*
stac92hd71bxx_models
[
STAC_92HD71BXX_MODELS
]
=
{
...
@@ -1724,6 +1788,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
...
@@ -1724,6 +1788,7 @@ static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
[
STAC_DELL_M4_2
]
=
"dell-m4-2"
,
[
STAC_DELL_M4_2
]
=
"dell-m4-2"
,
[
STAC_DELL_M4_3
]
=
"dell-m4-3"
,
[
STAC_DELL_M4_3
]
=
"dell-m4-3"
,
[
STAC_HP_M4
]
=
"hp-m4"
,
[
STAC_HP_M4
]
=
"hp-m4"
,
[
STAC_HP_DV5
]
=
"hp-dv5"
,
};
};
static
struct
snd_pci_quirk
stac92hd71bxx_cfg_tbl
[]
=
{
static
struct
snd_pci_quirk
stac92hd71bxx_cfg_tbl
[]
=
{
...
@@ -1736,6 +1801,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
...
@@ -1736,6 +1801,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
"HP dv7"
,
STAC_HP_M4
),
"HP dv7"
,
STAC_HP_M4
),
SND_PCI_QUIRK
(
PCI_VENDOR_ID_HP
,
0x30fc
,
SND_PCI_QUIRK
(
PCI_VENDOR_ID_HP
,
0x30fc
,
"HP dv7"
,
STAC_HP_M4
),
"HP dv7"
,
STAC_HP_M4
),
SND_PCI_QUIRK
(
PCI_VENDOR_ID_HP
,
0x3603
,
"HP dv5"
,
STAC_HP_DV5
),
SND_PCI_QUIRK
(
PCI_VENDOR_ID_HP
,
0x361a
,
SND_PCI_QUIRK
(
PCI_VENDOR_ID_HP
,
0x361a
,
"unknown HP"
,
STAC_HP_M4
),
"unknown HP"
,
STAC_HP_M4
),
SND_PCI_QUIRK
(
PCI_VENDOR_ID_DELL
,
0x0233
,
SND_PCI_QUIRK
(
PCI_VENDOR_ID_DELL
,
0x0233
,
...
@@ -4163,8 +4230,19 @@ static void stac92xx_hp_detect(struct hda_codec *codec)
...
@@ -4163,8 +4230,19 @@ static void stac92xx_hp_detect(struct hda_codec *codec)
continue
;
continue
;
if
(
presence
)
if
(
presence
)
stac92xx_set_pinctl
(
codec
,
cfg
->
hp_pins
[
i
],
val
);
stac92xx_set_pinctl
(
codec
,
cfg
->
hp_pins
[
i
],
val
);
#if 0 /* FIXME */
/* Resetting the pinctl like below may lead to (a sort of) regressions
* on some devices since they use the HP pin actually for line/speaker
* outs although the default pin config shows a different pin (that is
* wrong and useless).
*
* So, it's basically a problem of default pin configs, likely a BIOS issue.
* But, disabling the code below just works around it, and I'm too tired of
* bug reports with such devices...
*/
else
else
stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val);
stac92xx_reset_pinctl(codec, cfg->hp_pins[i], val);
#endif /* FIXME */
}
}
}
}
...
@@ -4390,7 +4468,8 @@ static int patch_stac9200(struct hda_codec *codec)
...
@@ -4390,7 +4468,8 @@ static int patch_stac9200(struct hda_codec *codec)
spec
->
num_adcs
=
1
;
spec
->
num_adcs
=
1
;
spec
->
num_pwrs
=
0
;
spec
->
num_pwrs
=
0
;
if
(
spec
->
board_config
==
STAC_9200_GATEWAY
||
if
(
spec
->
board_config
==
STAC_9200_M4
||
spec
->
board_config
==
STAC_9200_M4_2
||
spec
->
board_config
==
STAC_9200_OQO
)
spec
->
board_config
==
STAC_9200_OQO
)
spec
->
init
=
stac9200_eapd_init
;
spec
->
init
=
stac9200_eapd_init
;
else
else
...
@@ -4408,6 +4487,12 @@ static int patch_stac9200(struct hda_codec *codec)
...
@@ -4408,6 +4487,12 @@ static int patch_stac9200(struct hda_codec *codec)
return
err
;
return
err
;
}
}
/* CF-74 has no headphone detection, and the driver should *NOT*
* do detection and HP/speaker toggle because the hardware does it.
*/
if
(
spec
->
board_config
==
STAC_9200_PANASONIC
)
spec
->
hp_detect
=
0
;
codec
->
patch_ops
=
stac92xx_patch_ops
;
codec
->
patch_ops
=
stac92xx_patch_ops
;
return
0
;
return
0
;
...
@@ -4425,7 +4510,17 @@ static int patch_stac925x(struct hda_codec *codec)
...
@@ -4425,7 +4510,17 @@ static int patch_stac925x(struct hda_codec *codec)
codec
->
spec
=
spec
;
codec
->
spec
=
spec
;
spec
->
num_pins
=
ARRAY_SIZE
(
stac925x_pin_nids
);
spec
->
num_pins
=
ARRAY_SIZE
(
stac925x_pin_nids
);
spec
->
pin_nids
=
stac925x_pin_nids
;
spec
->
pin_nids
=
stac925x_pin_nids
;
spec
->
board_config
=
snd_hda_check_board_config
(
codec
,
STAC_925x_MODELS
,
/* Check first for codec ID */
spec
->
board_config
=
snd_hda_check_board_codec_sid_config
(
codec
,
STAC_925x_MODELS
,
stac925x_models
,
stac925x_codec_id_cfg_tbl
);
/* Now checks for PCI ID, if codec ID is not found */
if
(
spec
->
board_config
<
0
)
spec
->
board_config
=
snd_hda_check_board_config
(
codec
,
STAC_925x_MODELS
,
stac925x_models
,
stac925x_models
,
stac925x_cfg_tbl
);
stac925x_cfg_tbl
);
again:
again:
...
@@ -4672,6 +4767,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
...
@@ -4672,6 +4767,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
spec
->
dmux_nids
=
stac92hd83xxx_dmux_nids
;
spec
->
dmux_nids
=
stac92hd83xxx_dmux_nids
;
spec
->
adc_nids
=
stac92hd83xxx_adc_nids
;
spec
->
adc_nids
=
stac92hd83xxx_adc_nids
;
spec
->
pwr_nids
=
stac92hd83xxx_pwr_nids
;
spec
->
pwr_nids
=
stac92hd83xxx_pwr_nids
;
spec
->
amp_nids
=
stac92hd83xxx_amp_nids
;
spec
->
pwr_mapping
=
stac92hd83xxx_pwr_mapping
;
spec
->
pwr_mapping
=
stac92hd83xxx_pwr_mapping
;
spec
->
num_pwrs
=
ARRAY_SIZE
(
stac92hd83xxx_pwr_nids
);
spec
->
num_pwrs
=
ARRAY_SIZE
(
stac92hd83xxx_pwr_nids
);
spec
->
multiout
.
dac_nids
=
spec
->
dac_nids
;
spec
->
multiout
.
dac_nids
=
spec
->
dac_nids
;
...
@@ -4689,6 +4785,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
...
@@ -4689,6 +4785,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
spec
->
num_pins
=
ARRAY_SIZE
(
stac92hd83xxx_pin_nids
);
spec
->
num_pins
=
ARRAY_SIZE
(
stac92hd83xxx_pin_nids
);
spec
->
num_dmuxes
=
ARRAY_SIZE
(
stac92hd83xxx_dmux_nids
);
spec
->
num_dmuxes
=
ARRAY_SIZE
(
stac92hd83xxx_dmux_nids
);
spec
->
num_adcs
=
ARRAY_SIZE
(
stac92hd83xxx_adc_nids
);
spec
->
num_adcs
=
ARRAY_SIZE
(
stac92hd83xxx_adc_nids
);
spec
->
num_amps
=
ARRAY_SIZE
(
stac92hd83xxx_amp_nids
);
spec
->
num_dmics
=
STAC92HD83XXX_NUM_DMICS
;
spec
->
num_dmics
=
STAC92HD83XXX_NUM_DMICS
;
spec
->
dinput_mux
=
&
stac92hd83xxx_dmux
;
spec
->
dinput_mux
=
&
stac92hd83xxx_dmux
;
spec
->
pin_nids
=
stac92hd83xxx_pin_nids
;
spec
->
pin_nids
=
stac92hd83xxx_pin_nids
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment