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
8414871b
Commit
8414871b
authored
Oct 29, 2002
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: sound/usb fixups due to USB structure changes.
parent
64d163db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
sound/usb/usbaudio.c
sound/usb/usbaudio.c
+6
-6
sound/usb/usbmidi.c
sound/usb/usbmidi.c
+14
-14
No files found.
sound/usb/usbaudio.c
View file @
8414871b
...
...
@@ -1937,11 +1937,11 @@ static int snd_usb_roland_ua100_hack(snd_usb_audio_t *chip)
.
type
=
QUIRK_MIDI_FIXED_ENDPOINT
,
.
data
=
&
ep_quirk
};
struct
usb_
config_descriptor
*
cfg
=
chip
->
dev
->
actconfig
;
struct
usb_
host_config
*
cfg
=
chip
->
dev
->
actconfig
;
struct
usb_interface
*
iface
;
int
err
;
if
(
cfg
->
bNumInterfaces
!=
3
)
{
if
(
cfg
->
desc
.
bNumInterfaces
!=
3
)
{
snd_printdd
(
KERN_ERR
"invalid UA-100 descriptor
\n
"
);
return
-
ENXIO
;
}
...
...
@@ -2134,18 +2134,18 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
struct
usb_interface
*
intf
,
const
struct
usb_device_id
*
usb_id
)
{
struct
usb_
config_descriptor
*
config
=
dev
->
actconfig
;
struct
usb_
host_config
*
config
=
dev
->
actconfig
;
const
snd_usb_audio_quirk_t
*
quirk
=
(
const
snd_usb_audio_quirk_t
*
)
usb_id
->
driver_info
;
int
i
;
snd_card_t
*
card
;
snd_usb_audio_t
*
chip
;
int
ifnum
=
intf
->
altsetting
->
bInterfaceNumber
;
int
ifnum
=
intf
->
altsetting
->
desc
.
bInterfaceNumber
;
if
(
quirk
&&
quirk
->
ifnum
!=
QUIRK_ANY_INTERFACE
&&
ifnum
!=
quirk
->
ifnum
)
goto
__err_val
;
if
(
usb_set_configuration
(
dev
,
config
->
bConfigurationValue
)
<
0
)
{
snd_printk
(
KERN_ERR
"cannot set configuration (value 0x%x)
\n
"
,
config
->
bConfigurationValue
);
if
(
usb_set_configuration
(
dev
,
config
->
desc
.
bConfigurationValue
)
<
0
)
{
snd_printk
(
KERN_ERR
"cannot set configuration (value 0x%x)
\n
"
,
config
->
desc
.
bConfigurationValue
);
goto
__err_val
;
}
...
...
sound/usb/usbmidi.c
View file @
8414871b
...
...
@@ -517,7 +517,7 @@ static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep)
static
struct
usb_endpoint_descriptor
*
snd_usbmidi_get_int_epd
(
snd_usb_midi_t
*
umidi
)
{
struct
usb_interface
*
intf
;
struct
usb_
interface_descriptor
*
intfd
;
struct
usb_
host_interface
*
intfd
;
if
(
umidi
->
chip
->
dev
->
descriptor
.
idVendor
!=
0x0582
)
return
NULL
;
...
...
@@ -545,7 +545,7 @@ static struct usb_endpoint_descriptor* snd_usbmidi_get_int_epd(snd_usb_midi_t* u
static
struct
usb_endpoint_descriptor
*
snd_usbmidi_get_midiman_int_epd
(
snd_usb_midi_t
*
umidi
)
{
struct
usb_interface
*
intf
=
umidi
->
iface
;
if
(
!
intf
||
intf
->
altsetting
[
0
].
bNumEndpoints
<
1
)
if
(
!
intf
||
intf
->
altsetting
[
0
].
desc
.
bNumEndpoints
<
1
)
return
NULL
;
return
&
intf
->
altsetting
[
0
].
endpoint
[
0
].
desc
;
}
...
...
@@ -774,9 +774,9 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
snd_usb_midi_endpoint_info_t
*
endpoints
)
{
struct
usb_interface
*
intf
;
struct
usb_
interface_descriptor
*
intfd
;
struct
usb_
host_interface
*
intfd
;
struct
usb_ms_header_descriptor
*
ms_header
;
struct
usb_
endpoint_descriptor
*
ep
;
struct
usb_
host_endpoint
*
ep
;
struct
usb_ms_endpoint_descriptor
*
ms_ep
;
int
i
,
epidx
;
...
...
@@ -795,9 +795,9 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
printk
(
KERN_WARNING
"snd-usb-midi: MIDIStreaming interface descriptor not found
\n
"
);
epidx
=
0
;
for
(
i
=
0
;
i
<
intfd
->
bNumEndpoints
;
++
i
)
{
for
(
i
=
0
;
i
<
intfd
->
desc
.
bNumEndpoints
;
++
i
)
{
ep
=
&
intfd
->
endpoint
[
i
];
if
((
ep
->
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
)
if
((
ep
->
desc
.
bmAttributes
&
USB_ENDPOINT_XFERTYPE_MASK
)
!=
USB_ENDPOINT_XFER_BULK
)
continue
;
ms_ep
=
(
struct
usb_ms_endpoint_descriptor
*
)
ep
->
extra
;
if
(
ep
->
extralen
<
4
||
...
...
@@ -806,22 +806,22 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
ms_ep
->
bDescriptorSubtype
!=
MS_GENERAL
)
continue
;
if
(
endpoints
[
epidx
].
epnum
!=
0
&&
endpoints
[
epidx
].
epnum
!=
(
ep
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
))
{
endpoints
[
epidx
].
epnum
!=
(
ep
->
desc
.
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
))
{
++
epidx
;
if
(
epidx
>=
MIDI_MAX_ENDPOINTS
)
{
printk
(
KERN_WARNING
"snd-usb-midi: too many endpoints
\n
"
);
break
;
}
}
endpoints
[
epidx
].
epnum
=
ep
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
ep
->
bEndpointAddress
&
USB_DIR_IN
)
{
endpoints
[
epidx
].
epnum
=
ep
->
desc
.
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
if
(
ep
->
desc
.
bEndpointAddress
&
USB_DIR_IN
)
{
endpoints
[
epidx
].
in_cables
=
(
1
<<
ms_ep
->
bNumEmbMIDIJack
)
-
1
;
}
else
{
endpoints
[
epidx
].
out_cables
=
(
1
<<
ms_ep
->
bNumEmbMIDIJack
)
-
1
;
}
printk
(
KERN_INFO
"snd-usb-midi: detected %d %s jack(s) on endpoint %d
\n
"
,
ms_ep
->
bNumEmbMIDIJack
,
ep
->
bEndpointAddress
&
USB_DIR_IN
?
"input"
:
"output"
,
ep
->
desc
.
bEndpointAddress
&
USB_DIR_IN
?
"input"
:
"output"
,
endpoints
[
epidx
].
epnum
);
}
return
0
;
...
...
@@ -835,7 +835,7 @@ static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi,
snd_usb_midi_endpoint_info_t
*
endpoint
)
{
struct
usb_interface
*
intf
;
struct
usb_
interface_descriptor
*
intfd
;
struct
usb_
host_interface
*
intfd
;
struct
usb_endpoint_descriptor
*
epd
;
if
(
endpoint
->
epnum
==
-
1
)
{
...
...
@@ -858,14 +858,14 @@ static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi,
snd_usb_midi_endpoint_info_t
*
endpoint
)
{
struct
usb_interface
*
intf
;
struct
usb_
interface_descriptor
*
intfd
;
struct
usb_
host_interface
*
intfd
;
uint8_t
*
cs_desc
;
intf
=
umidi
->
iface
;
if
(
!
intf
)
return
-
ENOENT
;
intfd
=
intf
->
altsetting
;
if
(
intfd
->
bNumEndpoints
<
1
)
if
(
intfd
->
desc
.
bNumEndpoints
<
1
)
return
-
ENOENT
;
for
(
cs_desc
=
intfd
->
extra
;
...
...
@@ -892,7 +892,7 @@ static int snd_usbmidi_create_endpoints_midiman(snd_usb_midi_t* umidi, int ports
{
snd_usb_midi_endpoint_info_t
ep_info
;
struct
usb_interface
*
intf
;
struct
usb_
interface_descriptor
*
intfd
;
struct
usb_
host_interface
*
intfd
;
struct
usb_endpoint_descriptor
*
epd
;
int
cable
,
err
;
...
...
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