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
ac1d5c67
Commit
ac1d5c67
authored
Oct 22, 2002
by
Jaroslav Kysela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA update
- usb midi driver rewritten to use rawmidi interface
parent
02bb5f56
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
388 additions
and
587 deletions
+388
-587
sound/usb/Makefile
sound/usb/Makefile
+1
-7
sound/usb/usbaudio.c
sound/usb/usbaudio.c
+0
-31
sound/usb/usbaudio.h
sound/usb/usbaudio.h
+3
-30
sound/usb/usbmidi.c
sound/usb/usbmidi.c
+384
-519
No files found.
sound/usb/Makefile
View file @
ac1d5c67
...
@@ -2,15 +2,9 @@
...
@@ -2,15 +2,9 @@
# Makefile for ALSA
# Makefile for ALSA
#
#
snd-usb-audio-objs
:=
usbaudio.o usbmixer.o
snd-usb-audio-objs
:=
usbaudio.o usbmixer.o usbmidi.o
ifeq
($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
snd-usb-midi-objs
:=
usbmidi.o
endif
# Toplevel Module Dependency
# Toplevel Module Dependency
obj-$(CONFIG_SND_USB_AUDIO)
+=
snd-usb-audio.o
obj-$(CONFIG_SND_USB_AUDIO)
+=
snd-usb-audio.o
ifeq
($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
obj-$(CONFIG_SND_USB_AUDIO)
+=
snd-usb-midi.o
endif
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
sound/usb/usbaudio.c
View file @
ac1d5c67
...
@@ -1833,11 +1833,6 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, unsigned char *buffer, i
...
@@ -1833,11 +1833,6 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, unsigned char *buffer, i
/*
/*
* parse audio control descriptor and create pcm/midi streams
* parse audio control descriptor and create pcm/midi streams
*/
*/
static
int
snd_usb_create_midi_interface
(
snd_usb_audio_t
*
chip
,
struct
usb_interface
*
iface
,
const
snd_usb_audio_quirk_t
*
quirk
);
static
int
snd_usb_create_streams
(
snd_usb_audio_t
*
chip
,
int
ctrlif
,
static
int
snd_usb_create_streams
(
snd_usb_audio_t
*
chip
,
int
ctrlif
,
unsigned
char
*
buffer
,
int
buflen
)
unsigned
char
*
buffer
,
int
buflen
)
{
{
...
@@ -1896,32 +1891,6 @@ static int snd_usb_create_streams(snd_usb_audio_t *chip, int ctrlif,
...
@@ -1896,32 +1891,6 @@ static int snd_usb_create_streams(snd_usb_audio_t *chip, int ctrlif,
return
0
;
return
0
;
}
}
static
int
snd_usb_create_midi_interface
(
snd_usb_audio_t
*
chip
,
struct
usb_interface
*
iface
,
const
snd_usb_audio_quirk_t
*
quirk
)
{
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
snd_seq_device_t
*
seq_device
;
snd_usb_midi_t
*
umidi
;
int
err
;
err
=
snd_seq_device_new
(
chip
->
card
,
chip
->
next_seq_device
,
SNDRV_SEQ_DEV_ID_USBMIDI
,
sizeof
(
snd_usb_midi_t
),
&
seq_device
);
if
(
err
<
0
)
return
err
;
chip
->
next_seq_device
++
;
strcpy
(
seq_device
->
name
,
chip
->
card
->
shortname
);
umidi
=
(
snd_usb_midi_t
*
)
SNDRV_SEQ_DEVICE_ARGPTR
(
seq_device
);
umidi
->
chip
=
chip
;
umidi
->
iface
=
iface
;
umidi
->
ifnum
=
iface
->
altsetting
->
bInterfaceNumber
;
umidi
->
quirk
=
quirk
;
umidi
->
seq_client
=
-
1
;
#endif
return
0
;
}
static
inline
int
snd_usb_create_quirk
(
snd_usb_audio_t
*
chip
,
static
inline
int
snd_usb_create_quirk
(
snd_usb_audio_t
*
chip
,
struct
usb_interface
*
iface
,
struct
usb_interface
*
iface
,
const
snd_usb_audio_quirk_t
*
quirk
)
const
snd_usb_audio_quirk_t
*
quirk
)
...
...
sound/usb/usbaudio.h
View file @
ac1d5c67
...
@@ -123,8 +123,6 @@
...
@@ -123,8 +123,6 @@
/* maximum number of endpoints per interface */
/* maximum number of endpoints per interface */
#define MIDI_MAX_ENDPOINTS 2
#define MIDI_MAX_ENDPOINTS 2
#define SNDRV_SEQ_DEV_ID_USBMIDI "usb-midi"
/*
/*
*/
*/
...
@@ -140,9 +138,7 @@ struct snd_usb_audio {
...
@@ -140,9 +138,7 @@ struct snd_usb_audio {
struct
list_head
pcm_list
;
/* list of pcm streams */
struct
list_head
pcm_list
;
/* list of pcm streams */
int
pcm_devs
;
int
pcm_devs
;
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
int
next_midi_device
;
int
next_seq_device
;
#endif
};
};
/*
/*
...
@@ -176,31 +172,6 @@ struct snd_usb_midi_endpoint_info {
...
@@ -176,31 +172,6 @@ struct snd_usb_midi_endpoint_info {
/* for QUIRK_MIDI_MIDIMAN, data is the number of ports */
/* for QUIRK_MIDI_MIDIMAN, data is the number of ports */
/*
* USB MIDI sequencer device data
*/
typedef
struct
snd_usb_midi
snd_usb_midi_t
;
typedef
struct
snd_usb_midi_endpoint
snd_usb_midi_endpoint_t
;
typedef
struct
snd_usb_midi_out_endpoint
snd_usb_midi_out_endpoint_t
;
typedef
struct
snd_usb_midi_in_endpoint
snd_usb_midi_in_endpoint_t
;
struct
snd_usb_midi
{
/* filled by usbaudio.c */
snd_usb_audio_t
*
chip
;
struct
usb_interface
*
iface
;
int
ifnum
;
const
snd_usb_audio_quirk_t
*
quirk
;
/* used internally in usbmidi.c */
int
seq_client
;
struct
snd_usb_midi_endpoint
{
snd_usb_midi_out_endpoint_t
*
out
;
snd_usb_midi_in_endpoint_t
*
in
;
snd_rawmidi_t
*
rmidi
[
0x10
];
}
endpoints
[
MIDI_MAX_ENDPOINTS
];
};
/*
/*
*/
*/
...
@@ -215,4 +186,6 @@ void *snd_usb_find_csint_desc(void *descstart, int desclen, void *after, u8 dsub
...
@@ -215,4 +186,6 @@ void *snd_usb_find_csint_desc(void *descstart, int desclen, void *after, u8 dsub
int
snd_usb_create_mixer
(
snd_usb_audio_t
*
chip
,
int
ctrlif
,
unsigned
char
*
buffer
,
int
buflen
);
int
snd_usb_create_mixer
(
snd_usb_audio_t
*
chip
,
int
ctrlif
,
unsigned
char
*
buffer
,
int
buflen
);
int
snd_usb_create_midi_interface
(
snd_usb_audio_t
*
chip
,
struct
usb_interface
*
iface
,
const
snd_usb_audio_quirk_t
*
quirk
);
#endif
/* __USBAUDIO_H */
#endif
/* __USBAUDIO_H */
sound/usb/usbmidi.c
View file @
ac1d5c67
This diff is collapsed.
Click to expand it.
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