diff options
author | Daniel Mack <zonque@gmail.com> | 2011-09-12 12:54:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-09-14 11:07:02 -0400 |
commit | e8e8babf561c9560f37b9bd80407ebaf90ad2ca4 (patch) | |
tree | bcb7899519e35b094ab1f89d3c929ae4f8935c00 /sound/usb/quirks.c | |
parent | 358e2bd4a97780f5522e1666c8188a3a60a0d03c (diff) |
ALSA: snd-usb: re-order code
Move code from endpoint.c into a new file called stream.c and rename
functions so that their names actually reflect what they're doing.
This way, endpoint.c will be available to functions that hold all the
endpoint logic.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r-- | sound/usb/quirks.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index cf61b0340026..556edea28b90 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "endpoint.h" | 34 | #include "endpoint.h" |
35 | #include "pcm.h" | 35 | #include "pcm.h" |
36 | #include "clock.h" | 36 | #include "clock.h" |
37 | #include "stream.h" | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * handle the quirks for the contained interfaces | 40 | * handle the quirks for the contained interfaces |
@@ -106,7 +107,7 @@ static int create_standard_audio_quirk(struct snd_usb_audio *chip, | |||
106 | 107 | ||
107 | alts = &iface->altsetting[0]; | 108 | alts = &iface->altsetting[0]; |
108 | altsd = get_iface_desc(alts); | 109 | altsd = get_iface_desc(alts); |
109 | err = snd_usb_parse_audio_endpoints(chip, altsd->bInterfaceNumber); | 110 | err = snd_usb_parse_audio_interface(chip, altsd->bInterfaceNumber); |
110 | if (err < 0) { | 111 | if (err < 0) { |
111 | snd_printk(KERN_ERR "cannot setup if %d: error %d\n", | 112 | snd_printk(KERN_ERR "cannot setup if %d: error %d\n", |
112 | altsd->bInterfaceNumber, err); | 113 | altsd->bInterfaceNumber, err); |
@@ -147,7 +148,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, | |||
147 | 148 | ||
148 | stream = (fp->endpoint & USB_DIR_IN) | 149 | stream = (fp->endpoint & USB_DIR_IN) |
149 | ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; | 150 | ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; |
150 | err = snd_usb_add_audio_endpoint(chip, stream, fp); | 151 | err = snd_usb_add_audio_stream(chip, stream, fp); |
151 | if (err < 0) { | 152 | if (err < 0) { |
152 | kfree(fp); | 153 | kfree(fp); |
153 | kfree(rate_table); | 154 | kfree(rate_table); |
@@ -254,7 +255,7 @@ static int create_uaxx_quirk(struct snd_usb_audio *chip, | |||
254 | 255 | ||
255 | stream = (fp->endpoint & USB_DIR_IN) | 256 | stream = (fp->endpoint & USB_DIR_IN) |
256 | ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; | 257 | ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; |
257 | err = snd_usb_add_audio_endpoint(chip, stream, fp); | 258 | err = snd_usb_add_audio_stream(chip, stream, fp); |
258 | if (err < 0) { | 259 | if (err < 0) { |
259 | kfree(fp); | 260 | kfree(fp); |
260 | return err; | 261 | return err; |