Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cd8faac3
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cd8faac3
编写于
1月 05, 2009
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'topic/usbaudio' into for-linus
上级
8924c671
913ae5a2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
34 deletion
+30
-34
sound/usb/caiaq/caiaq-device.c
sound/usb/caiaq/caiaq-device.c
+2
-2
sound/usb/usbaudio.c
sound/usb/usbaudio.c
+4
-4
sound/usb/usbmidi.c
sound/usb/usbmidi.c
+18
-21
sound/usb/usbmixer.c
sound/usb/usbmixer.c
+2
-3
sound/usb/usx2y/us122l.c
sound/usb/usx2y/us122l.c
+2
-2
sound/usb/usx2y/usbusx2y.c
sound/usb/usx2y/usbusx2y.c
+2
-2
未找到文件。
sound/usb/caiaq/caiaq-device.c
浏览文件 @
cd8faac3
...
...
@@ -446,7 +446,7 @@ static int __devinit snd_probe(struct usb_interface *intf,
if
(
!
card
)
return
-
ENOMEM
;
dev_set_drvdata
(
&
intf
->
dev
,
card
);
usb_set_intfdata
(
intf
,
card
);
ret
=
init_card
(
caiaqdev
(
card
));
if
(
ret
<
0
)
{
log
(
"unable to init card! (ret=%d)
\n
"
,
ret
);
...
...
@@ -460,7 +460,7 @@ static int __devinit snd_probe(struct usb_interface *intf,
static
void
snd_disconnect
(
struct
usb_interface
*
intf
)
{
struct
snd_usb_caiaqdev
*
dev
;
struct
snd_card
*
card
=
dev_get_drvdata
(
&
intf
->
dev
);
struct
snd_card
*
card
=
usb_get_intfdata
(
intf
);
debug
(
"%s(%p)
\n
"
,
__func__
,
intf
);
...
...
sound/usb/usbaudio.c
浏览文件 @
cd8faac3
...
...
@@ -3709,7 +3709,7 @@ static int usb_audio_probe(struct usb_interface *intf,
void
*
chip
;
chip
=
snd_usb_audio_probe
(
interface_to_usbdev
(
intf
),
intf
,
id
);
if
(
chip
)
{
dev_set_drvdata
(
&
intf
->
dev
,
chip
);
usb_set_intfdata
(
intf
,
chip
);
return
0
;
}
else
return
-
EIO
;
...
...
@@ -3718,13 +3718,13 @@ static int usb_audio_probe(struct usb_interface *intf,
static
void
usb_audio_disconnect
(
struct
usb_interface
*
intf
)
{
snd_usb_audio_disconnect
(
interface_to_usbdev
(
intf
),
dev_get_drvdata
(
&
intf
->
dev
));
usb_get_intfdata
(
intf
));
}
#ifdef CONFIG_PM
static
int
usb_audio_suspend
(
struct
usb_interface
*
intf
,
pm_message_t
message
)
{
struct
snd_usb_audio
*
chip
=
dev_get_drvdata
(
&
intf
->
dev
);
struct
snd_usb_audio
*
chip
=
usb_get_intfdata
(
intf
);
struct
list_head
*
p
;
struct
snd_usb_stream
*
as
;
...
...
@@ -3744,7 +3744,7 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message)
static
int
usb_audio_resume
(
struct
usb_interface
*
intf
)
{
struct
snd_usb_audio
*
chip
=
dev_get_drvdata
(
&
intf
->
dev
);
struct
snd_usb_audio
*
chip
=
usb_get_intfdata
(
intf
);
if
(
chip
==
(
void
*
)
-
1L
)
return
0
;
...
...
sound/usb/usbmidi.c
浏览文件 @
cd8faac3
...
...
@@ -1392,8 +1392,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
for
(
i
=
0
;
i
<
intfd
->
bNumEndpoints
;
++
i
)
{
hostep
=
&
hostif
->
endpoint
[
i
];
ep
=
get_ep_desc
(
hostep
);
if
((
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
&&
(
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_INT
)
if
(
!
usb_endpoint_xfer_bulk
(
ep
)
&&
!
usb_endpoint_xfer_int
(
ep
))
continue
;
ms_ep
=
(
struct
usb_ms_endpoint_descriptor
*
)
hostep
->
extra
;
if
(
hostep
->
extralen
<
4
||
...
...
@@ -1401,15 +1400,15 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
ms_ep
->
bDescriptorType
!=
USB_DT_CS_ENDPOINT
||
ms_ep
->
bDescriptorSubtype
!=
MS_GENERAL
)
continue
;
if
(
(
ep
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
==
USB_DIR_OUT
)
{
if
(
usb_endpoint_dir_out
(
ep
)
)
{
if
(
endpoints
[
epidx
].
out_ep
)
{
if
(
++
epidx
>=
MIDI_MAX_ENDPOINTS
)
{
snd_printk
(
KERN_WARNING
"too many endpoints
\n
"
);
break
;
}
}
endpoints
[
epidx
].
out_ep
=
ep
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
(
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
==
USB_ENDPOINT_XFER_INT
)
endpoints
[
epidx
].
out_ep
=
usb_endpoint_num
(
ep
)
;
if
(
usb_endpoint_xfer_int
(
ep
)
)
endpoints
[
epidx
].
out_interval
=
ep
->
bInterval
;
else
if
(
snd_usb_get_speed
(
umidi
->
chip
->
dev
)
==
USB_SPEED_LOW
)
/*
...
...
@@ -1428,8 +1427,8 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
break
;
}
}
endpoints
[
epidx
].
in_ep
=
ep
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
(
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
==
USB_ENDPOINT_XFER_INT
)
endpoints
[
epidx
].
in_ep
=
usb_endpoint_num
(
ep
)
;
if
(
usb_endpoint_xfer_int
(
ep
)
)
endpoints
[
epidx
].
in_interval
=
ep
->
bInterval
;
else
if
(
snd_usb_get_speed
(
umidi
->
chip
->
dev
)
==
USB_SPEED_LOW
)
endpoints
[
epidx
].
in_interval
=
1
;
...
...
@@ -1495,20 +1494,20 @@ static int snd_usbmidi_detect_endpoints(struct snd_usb_midi* umidi,
for
(
i
=
0
;
i
<
intfd
->
bNumEndpoints
;
++
i
)
{
epd
=
get_endpoint
(
hostif
,
i
);
if
(
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
&&
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_INT
)
if
(
!
usb_endpoint_xfer_bulk
(
epd
)
&&
!
usb_endpoint_xfer_int
(
epd
)
)
continue
;
if
(
out_eps
<
max_endpoints
&&
(
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
==
USB_DIR_OUT
)
{
endpoint
[
out_eps
].
out_ep
=
epd
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
==
USB_ENDPOINT_XFER_INT
)
usb_endpoint_dir_out
(
epd
)
)
{
endpoint
[
out_eps
].
out_ep
=
usb_endpoint_num
(
epd
)
;
if
(
usb_endpoint_xfer_int
(
epd
)
)
endpoint
[
out_eps
].
out_interval
=
epd
->
bInterval
;
++
out_eps
;
}
if
(
in_eps
<
max_endpoints
&&
(
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
==
USB_DIR_IN
)
{
endpoint
[
in_eps
].
in_ep
=
epd
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
==
USB_ENDPOINT_XFER_INT
)
usb_endpoint_dir_in
(
epd
)
)
{
endpoint
[
in_eps
].
in_ep
=
usb_endpoint_num
(
epd
)
;
if
(
usb_endpoint_xfer_int
(
epd
)
)
endpoint
[
in_eps
].
in_interval
=
epd
->
bInterval
;
++
in_eps
;
}
...
...
@@ -1607,21 +1606,19 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi,
}
epd
=
get_endpoint
(
hostif
,
0
);
if
((
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
!=
USB_DIR_IN
||
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_INT
)
{
if
(
!
usb_endpoint_dir_in
(
epd
)
||
!
usb_endpoint_xfer_int
(
epd
))
{
snd_printdd
(
KERN_ERR
"endpoint[0] isn't interrupt
\n
"
);
return
-
ENXIO
;
}
epd
=
get_endpoint
(
hostif
,
2
);
if
((
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
!=
USB_DIR_OUT
||
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
)
{
if
(
!
usb_endpoint_dir_out
(
epd
)
||
!
usb_endpoint_xfer_bulk
(
epd
))
{
snd_printdd
(
KERN_ERR
"endpoint[2] isn't bulk output
\n
"
);
return
-
ENXIO
;
}
if
(
endpoint
->
out_cables
>
0x0001
)
{
epd
=
get_endpoint
(
hostif
,
4
);
if
(
(
epd
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
!=
USB_DIR_OUT
||
(
epd
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
)
{
if
(
!
usb_endpoint_dir_out
(
epd
)
||
!
usb_endpoint_xfer_bulk
(
epd
)
)
{
snd_printdd
(
KERN_ERR
"endpoint[4] isn't bulk output
\n
"
);
return
-
ENXIO
;
}
...
...
sound/usb/usbmixer.c
浏览文件 @
cd8faac3
...
...
@@ -1755,11 +1755,10 @@ static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer)
if
(
get_iface_desc
(
hostif
)
->
bNumEndpoints
<
1
)
return
0
;
ep
=
get_endpoint
(
hostif
,
0
);
if
((
ep
->
bEndpointAddress
&
USB_ENDPOINT_DIR_MASK
)
!=
USB_DIR_IN
||
(
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_INT
)
if
(
!
usb_endpoint_dir_in
(
ep
)
||
!
usb_endpoint_xfer_int
(
ep
))
return
0
;
epnum
=
ep
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
epnum
=
usb_endpoint_num
(
ep
)
;
buffer_length
=
le16_to_cpu
(
ep
->
wMaxPacketSize
);
transfer_buffer
=
kmalloc
(
buffer_length
,
GFP_KERNEL
);
if
(
!
transfer_buffer
)
...
...
sound/usb/usx2y/us122l.c
浏览文件 @
cd8faac3
...
...
@@ -589,7 +589,7 @@ static int snd_us122l_suspend(struct usb_interface *intf, pm_message_t message)
struct
us122l
*
us122l
;
struct
list_head
*
p
;
card
=
dev_get_drvdata
(
&
intf
->
dev
);
card
=
usb_get_intfdata
(
intf
);
if
(
!
card
)
return
0
;
snd_power_change_state
(
card
,
SNDRV_CTL_POWER_D3hot
);
...
...
@@ -615,7 +615,7 @@ static int snd_us122l_resume(struct usb_interface *intf)
struct
list_head
*
p
;
int
err
;
card
=
dev_get_drvdata
(
&
intf
->
dev
);
card
=
usb_get_intfdata
(
intf
);
if
(
!
card
)
return
0
;
...
...
sound/usb/usx2y/usbusx2y.c
浏览文件 @
cd8faac3
...
...
@@ -392,7 +392,7 @@ static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_i
void
*
chip
;
chip
=
usX2Y_usb_probe
(
interface_to_usbdev
(
intf
),
intf
,
id
);
if
(
chip
)
{
dev_set_drvdata
(
&
intf
->
dev
,
chip
);
usb_set_intfdata
(
intf
,
chip
);
return
0
;
}
else
return
-
EIO
;
...
...
@@ -401,7 +401,7 @@ static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_i
static
void
snd_usX2Y_disconnect
(
struct
usb_interface
*
intf
)
{
usX2Y_usb_disconnect
(
interface_to_usbdev
(
intf
),
dev_get_drvdata
(
&
intf
->
dev
));
usb_get_intfdata
(
intf
));
}
MODULE_DEVICE_TABLE
(
usb
,
snd_usX2Y_usb_id_table
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录