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
Kirill Smelkov
linux
Commits
cd8faac3
Commit
cd8faac3
authored
Jan 05, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/usbaudio' into for-linus
parents
8924c671
913ae5a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
34 deletions
+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
No files found.
sound/usb/caiaq/caiaq-device.c
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
);
...
...
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