Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
1baa705b
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看板
提交
1baa705b
编写于
5月 21, 2005
作者:
J
James Courtier-Dutton
提交者:
Jaroslav Kysela
5月 29, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ALSA] Tidy up card recognition.
CA0106 driver Signed-off-by:
N
James Courtier-Dutton
<
James@superbug.co.uk
>
上级
8f55fbb0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
28 deletion
+43
-28
sound/pci/ca0106/ca0106.h
sound/pci/ca0106/ca0106.h
+8
-0
sound/pci/ca0106/ca0106_main.c
sound/pci/ca0106/ca0106_main.c
+35
-28
未找到文件。
sound/pci/ca0106/ca0106.h
浏览文件 @
1baa705b
...
...
@@ -508,9 +508,17 @@ struct snd_ca0106_pcm {
unsigned
short
running
;
};
typedef
struct
{
u32
serial
;
char
*
name
;
int
ac97
;
int
gpio_type
;
}
ca0106_details_t
;
// definition of the chip-specific record
struct
snd_ca0106
{
snd_card_t
*
card
;
ca0106_details_t
*
details
;
struct
pci_dev
*
pci
;
unsigned
long
port
;
...
...
sound/pci/ca0106/ca0106_main.c
浏览文件 @
1baa705b
...
...
@@ -161,18 +161,29 @@ MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard.");
#include "ca0106.h"
typedef
struct
{
u32
serial
;
char
*
name
;
}
ca0106_names_t
;
static
ca0106_names_t
ca0106_chip_names
[]
=
{
{
0x10021102
,
"AudigyLS [SB0310]"
}
,
{
0x10051102
,
"AudigyLS [SB0310b]"
}
,
/* Unknown AudigyLS that also says SB0310 on it */
{
0x10061102
,
"Live! 7.1 24bit [SB0410]"
}
,
/* New Sound Blaster Live! 7.1 24bit. This does not have an AC97. 53SB041000001 */
{
0x10071102
,
"Live! 7.1 24bit [SB0413]"
}
,
/* New Dell Sound Blaster Live! 7.1 24bit. This does not have an AC97. */
{
0x10091462
,
"MSI K8N Diamond MB [SB0438]"
},
/* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */
{
0
,
"AudigyLS [Unknown]"
}
static
ca0106_details_t
ca0106_chip_details
[]
=
{
/* AudigyLS[SB0310] */
{
.
serial
=
0x10021102
,
.
name
=
"AudigyLS [SB0310]"
,
.
ac97
=
1
}
,
/* Unknown AudigyLS that also says SB0310 on it */
{
.
serial
=
0x10051102
,
.
name
=
"AudigyLS [SB0310b]"
,
.
ac97
=
1
}
,
/* New Sound Blaster Live! 7.1 24bit. This does not have an AC97. 53SB041000001 */
{
.
serial
=
0x10061102
,
.
name
=
"Live! 7.1 24bit [SB0410]"
,
.
gpio_type
=
1
}
,
/* New Dell Sound Blaster Live! 7.1 24bit. This does not have an AC97. */
{
.
serial
=
0x10071102
,
.
name
=
"Live! 7.1 24bit [SB0413]"
,
.
gpio_type
=
1
}
,
/* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */
{
.
serial
=
0x10091462
,
.
name
=
"MSI K8N Diamond MB [SB0438]"
,
.
gpio_type
=
1
}
,
{
.
serial
=
0
,
.
name
=
"AudigyLS [Unknown]"
}
};
/* hardware definition */
...
...
@@ -994,6 +1005,7 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
ca0106_t
**
rchip
)
{
ca0106_t
*
chip
;
ca0106_details_t
*
c
;
int
err
;
int
ch
;
static
snd_device_ops_t
ops
=
{
...
...
@@ -1055,6 +1067,15 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
printk
(
KERN_INFO
"Model %04x Rev %08x Serial %08x
\n
"
,
chip
->
model
,
chip
->
revision
,
chip
->
serial
);
#endif
strcpy
(
card
->
driver
,
"CA0106"
);
strcpy
(
card
->
shortname
,
"CA0106"
);
for
(
c
=
ca0106_chip_details
;
c
->
serial
;
c
++
)
{
if
(
c
->
serial
==
chip
->
serial
)
break
;
}
chip
->
details
=
c
;
sprintf
(
card
->
longname
,
"%s at 0x%lx irq %i"
,
c
->
name
,
chip
->
port
,
chip
->
irq
);
outl
(
0
,
chip
->
port
+
INTE
);
...
...
@@ -1139,9 +1160,7 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
snd_ca0106_ptr_write
(
chip
,
CAPTURE_SOURCE
,
0x0
,
0x333300e4
);
/* Select MIC, Line in, TAD in, AUX in */
chip
->
capture_source
=
3
;
/* Set CAPTURE_SOURCE */
if
((
chip
->
serial
==
0x10061102
)
||
(
chip
->
serial
==
0x10071102
)
||
(
chip
->
serial
==
0x10091462
))
{
/* The SB0410 and SB0413 use GPIO differently. */
if
(
chip
->
details
->
gpio_type
==
1
)
{
/* The SB0410 and SB0413 use GPIO differently. */
/* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */
outl
(
0x0
,
chip
->
port
+
GPIO
);
//outl(0x00f0e000, chip->port+GPIO); /* Analog */
...
...
@@ -1173,7 +1192,6 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
static
int
dev
;
snd_card_t
*
card
;
ca0106_t
*
chip
;
ca0106_names_t
*
c
;
int
err
;
if
(
dev
>=
SNDRV_CARDS
)
...
...
@@ -1208,9 +1226,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
snd_card_free
(
card
);
return
err
;
}
if
((
chip
->
serial
!=
0x10061102
)
&&
(
chip
->
serial
!=
0x10071102
)
&&
(
chip
->
serial
!=
0x10091462
)
)
{
/* The SB0410 and SB0413 do not have an ac97 chip. */
if
(
chip
->
details
->
ac97
==
1
)
{
/* The SB0410 and SB0413 do not have an AC97 chip. */
if
((
err
=
snd_ca0106_ac97
(
chip
))
<
0
)
{
snd_card_free
(
card
);
return
err
;
...
...
@@ -1223,15 +1239,6 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
snd_ca0106_proc_init
(
chip
);
strcpy
(
card
->
driver
,
"CA0106"
);
strcpy
(
card
->
shortname
,
"CA0106"
);
for
(
c
=
ca0106_chip_names
;
c
->
serial
;
c
++
)
{
if
(
c
->
serial
==
chip
->
serial
)
break
;
}
sprintf
(
card
->
longname
,
"%s at 0x%lx irq %i"
,
c
->
name
,
chip
->
port
,
chip
->
irq
);
if
((
err
=
snd_card_register
(
card
))
<
0
)
{
snd_card_free
(
card
);
return
err
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录