Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4586b2b5
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4586b2b5
编写于
11月 09, 2011
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/hda' into topic/hda
上级
5c0ebfbe
f7f9bdfa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
71 addition
and
51 deletion
+71
-51
Documentation/sound/alsa/HD-Audio-Models.txt
Documentation/sound/alsa/HD-Audio-Models.txt
+1
-0
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_conexant.c
+0
-1
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/patch_sigmatel.c
+11
-0
sound/usb/mixer.c
sound/usb/mixer.c
+59
-50
未找到文件。
Documentation/sound/alsa/HD-Audio-Models.txt
浏览文件 @
4586b2b5
...
...
@@ -337,6 +337,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)
...
...
sound/pci/hda/patch_conexant.c
浏览文件 @
4586b2b5
...
...
@@ -3062,7 +3062,6 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {
SND_PCI_QUIRK
(
0x1043
,
0x1993
,
"Asus U50F"
,
CXT5066_ASUS
),
SND_PCI_QUIRK
(
0x1179
,
0xff1e
,
"Toshiba Satellite C650D"
,
CXT5066_IDEAPAD
),
SND_PCI_QUIRK
(
0x1179
,
0xff50
,
"Toshiba Satellite P500-PSPGSC-01800T"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x1179
,
0xffe0
,
"Toshiba Satellite Pro T130-15F"
,
CXT5066_OLPC_XO_1_5
),
SND_PCI_QUIRK
(
0x14f1
,
0x0101
,
"Conexant Reference board"
,
CXT5066_LAPTOP
),
SND_PCI_QUIRK
(
0x152d
,
0x0833
,
"OLPC XO-1.5"
,
CXT5066_OLPC_XO_1_5
),
...
...
sound/pci/hda/patch_sigmatel.c
浏览文件 @
4586b2b5
...
...
@@ -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
,
...
...
sound/usb/mixer.c
浏览文件 @
4586b2b5
...
...
@@ -765,10 +765,60 @@ static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
* interface to ALSA control for feature/mixer units
*/
/* volume control quirks */
static
void
volume_control_quirks
(
struct
usb_mixer_elem_info
*
cval
,
struct
snd_kcontrol
*
kctl
)
{
switch
(
cval
->
mixer
->
chip
->
usb_id
)
{
case
USB_ID
(
0x0471
,
0x0101
):
case
USB_ID
(
0x0471
,
0x0104
):
case
USB_ID
(
0x0471
,
0x0105
):
case
USB_ID
(
0x0672
,
0x1041
):
/* quirk for UDA1321/N101.
* note that detection between firmware 2.1.1.7 (N101)
* and later 2.1.1.21 is not very clear from datasheets.
* I hope that the min value is -15360 for newer firmware --jk
*/
if
(
!
strcmp
(
kctl
->
id
.
name
,
"PCM Playback Volume"
)
&&
cval
->
min
==
-
15616
)
{
snd_printk
(
KERN_INFO
"set volume quirk for UDA1321/N101 chip
\n
"
);
cval
->
max
=
-
256
;
}
break
;
case
USB_ID
(
0x046d
,
0x09a4
):
if
(
!
strcmp
(
kctl
->
id
.
name
,
"Mic Capture Volume"
))
{
snd_printk
(
KERN_INFO
"set volume quirk for QuickCam E3500
\n
"
);
cval
->
min
=
6080
;
cval
->
max
=
8768
;
cval
->
res
=
192
;
}
break
;
case
USB_ID
(
0x046d
,
0x0808
):
case
USB_ID
(
0x046d
,
0x0809
):
case
USB_ID
(
0x046d
,
0x0991
):
/* Most audio usb devices lie about volume resolution.
* Most Logitech webcams have res = 384.
* Proboly there is some logitech magic behind this number --fishor
*/
if
(
!
strcmp
(
kctl
->
id
.
name
,
"Mic Capture Volume"
))
{
snd_printk
(
KERN_INFO
"set resolution quirk: cval->res = 384
\n
"
);
cval
->
res
=
384
;
}
break
;
}
}
/*
* retrieve the minimum and maximum values for the specified control
*/
static
int
get_min_max
(
struct
usb_mixer_elem_info
*
cval
,
int
default_min
)
static
int
get_min_max_with_quirks
(
struct
usb_mixer_elem_info
*
cval
,
int
default_min
,
struct
snd_kcontrol
*
kctl
)
{
/* for failsafe */
cval
->
min
=
default_min
;
...
...
@@ -844,6 +894,9 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
cval
->
initialized
=
1
;
}
if
(
kctl
)
volume_control_quirks
(
cval
,
kctl
);
/* USB descriptions contain the dB scale in 1/256 dB unit
* while ALSA TLV contains in 1/100 dB unit
*/
...
...
@@ -864,6 +917,7 @@ static int get_min_max(struct usb_mixer_elem_info *cval, int default_min)
return
0
;
}
#define get_min_max(cval, def) get_min_max_with_quirks(cval, def, NULL)
/* get a feature/mixer unit info */
static
int
mixer_ctl_feature_info
(
struct
snd_kcontrol
*
kcontrol
,
struct
snd_ctl_elem_info
*
uinfo
)
...
...
@@ -882,7 +936,7 @@ static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_
uinfo
->
value
.
integer
.
max
=
1
;
}
else
{
if
(
!
cval
->
initialized
)
{
get_min_max
(
cval
,
0
);
get_min_max
_with_quirks
(
cval
,
0
,
kcontrol
);
if
(
cval
->
initialized
&&
cval
->
dBmin
>=
cval
->
dBmax
)
{
kcontrol
->
vd
[
0
].
access
&=
~
(
SNDRV_CTL_ELEM_ACCESS_TLV_READ
|
...
...
@@ -1045,9 +1099,6 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
cval
->
ch_readonly
=
readonly_mask
;
}
/* get min/max values */
get_min_max
(
cval
,
0
);
/* if all channels in the mask are marked read-only, make the control
* read-only. set_cur_mix_value() will check the mask again and won't
* issue write commands to read-only channels. */
...
...
@@ -1069,6 +1120,9 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
len
=
snd_usb_copy_string_desc
(
state
,
nameid
,
kctl
->
id
.
name
,
sizeof
(
kctl
->
id
.
name
));
/* get min/max values */
get_min_max_with_quirks
(
cval
,
0
,
kctl
);
switch
(
control
)
{
case
UAC_FU_MUTE
:
case
UAC_FU_VOLUME
:
...
...
@@ -1118,51 +1172,6 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
break
;
}
/* volume control quirks */
switch
(
state
->
chip
->
usb_id
)
{
case
USB_ID
(
0x0471
,
0x0101
):
case
USB_ID
(
0x0471
,
0x0104
):
case
USB_ID
(
0x0471
,
0x0105
):
case
USB_ID
(
0x0672
,
0x1041
):
/* quirk for UDA1321/N101.
* note that detection between firmware 2.1.1.7 (N101)
* and later 2.1.1.21 is not very clear from datasheets.
* I hope that the min value is -15360 for newer firmware --jk
*/
if
(
!
strcmp
(
kctl
->
id
.
name
,
"PCM Playback Volume"
)
&&
cval
->
min
==
-
15616
)
{
snd_printk
(
KERN_INFO
"set volume quirk for UDA1321/N101 chip
\n
"
);
cval
->
max
=
-
256
;
}
break
;
case
USB_ID
(
0x046d
,
0x09a4
):
if
(
!
strcmp
(
kctl
->
id
.
name
,
"Mic Capture Volume"
))
{
snd_printk
(
KERN_INFO
"set volume quirk for QuickCam E3500
\n
"
);
cval
->
min
=
6080
;
cval
->
max
=
8768
;
cval
->
res
=
192
;
}
break
;
case
USB_ID
(
0x046d
,
0x0808
):
case
USB_ID
(
0x046d
,
0x0809
):
case
USB_ID
(
0x046d
,
0x0991
):
/* Most audio usb devices lie about volume resolution.
* Most Logitech webcams have res = 384.
* Proboly there is some logitech magic behind this number --fishor
*/
if
(
!
strcmp
(
kctl
->
id
.
name
,
"Mic Capture Volume"
))
{
snd_printk
(
KERN_INFO
"set resolution quirk: cval->res = 384
\n
"
);
cval
->
res
=
384
;
}
break
;
}
range
=
(
cval
->
max
-
cval
->
min
)
/
cval
->
res
;
/* Are there devices with volume range more than 255? I use a bit more
* to be sure. 384 is a resolution magic number found on Logitech
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录