diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:47:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:47:46 -0500 |
commit | a421018e8c10e5593a1fee076af72a66c3fe8ca3 (patch) | |
tree | 2854511845d0e07d33726a13eda6de1059a5c9df /sound/usb/usx2y/usbusx2yaudio.c | |
parent | 3ad1f3b35e8309ec93454dbf89beaafcdb5312da (diff) | |
parent | 86e1d57e4f24ca27ce813bdc2afaac4adafcbaf4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (294 commits)
S3C64XX: Staticise platform data for PCM devices
ASoC: Rename controls with a / in wm_hubs
snd-fm801: autodetect SF64-PCR (tuner-only) card
ALSA: tea575x-tuner: fix mute
ASoC: au1x: dbdma2: plug memleak in pcm device creation error path
ASoC: au1x: dbdma2: fix oops on soc device removal.
ALSA: hda - Fix memory leaks in the previous patch
ALSA: hda - Add ALC661/259, ALC892/888VD support
ALSA: opti9xx: remove snd_opti9xx fields
ALSA: aaci - Clean up duplicate code
ALSA: usb - Fix mixer map for Hercules Gamesurround Muse Pocket LT
ALSA: hda - Add position_fix quirk for HP dv3
ALSA: hda - Add a pin-fix for FSC Amilo Pi1505
ALSA: hda - Fix Cxt5047 test mode
ASoC: pxa/raumfeld: adopt new snd_soc_dai_set_pll() API
ASoC: sh: fsi: Add runtime PM support
sh: ms7724se: Add runtime PM support for FSI
ALSA: hda - Add a position_fix quirk for MSI Wind U115
ALSA: opti-miro: add PnP detection
ALSA: opti-miro: separate comon probing code
...
Diffstat (limited to 'sound/usb/usx2y/usbusx2yaudio.c')
-rw-r--r-- | sound/usb/usx2y/usbusx2yaudio.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 9efd27f6b52f..74a67a85aa81 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -199,7 +199,7 @@ static int usX2Y_urb_submit(struct snd_usX2Y_substream *subs, struct urb *urb, i | |||
199 | return -ENODEV; | 199 | return -ENODEV; |
200 | urb->start_frame = (frame + NRURBS * nr_of_packs()); // let hcd do rollover sanity checks | 200 | urb->start_frame = (frame + NRURBS * nr_of_packs()); // let hcd do rollover sanity checks |
201 | urb->hcpriv = NULL; | 201 | urb->hcpriv = NULL; |
202 | urb->dev = subs->usX2Y->chip.dev; /* we need to set this at each time */ | 202 | urb->dev = subs->usX2Y->dev; /* we need to set this at each time */ |
203 | if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { | 203 | if ((err = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { |
204 | snd_printk(KERN_ERR "usb_submit_urb() returned %i\n", err); | 204 | snd_printk(KERN_ERR "usb_submit_urb() returned %i\n", err); |
205 | return err; | 205 | return err; |
@@ -300,7 +300,7 @@ static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, | |||
300 | "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" | 300 | "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" |
301 | "Most propably some urb of usb-frame %i is still missing.\n" | 301 | "Most propably some urb of usb-frame %i is still missing.\n" |
302 | "Cause could be too long delays in usb-hcd interrupt handling.\n", | 302 | "Cause could be too long delays in usb-hcd interrupt handling.\n", |
303 | usb_get_current_frame_number(usX2Y->chip.dev), | 303 | usb_get_current_frame_number(usX2Y->dev), |
304 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", | 304 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", |
305 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); | 305 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); |
306 | usX2Y_clients_stop(usX2Y); | 306 | usX2Y_clients_stop(usX2Y); |
@@ -313,7 +313,7 @@ static void i_usX2Y_urb_complete(struct urb *urb) | |||
313 | 313 | ||
314 | if (unlikely(atomic_read(&subs->state) < state_PREPARED)) { | 314 | if (unlikely(atomic_read(&subs->state) < state_PREPARED)) { |
315 | snd_printdd("hcd_frame=%i ep=%i%s status=%i start_frame=%i\n", | 315 | snd_printdd("hcd_frame=%i ep=%i%s status=%i start_frame=%i\n", |
316 | usb_get_current_frame_number(usX2Y->chip.dev), | 316 | usb_get_current_frame_number(usX2Y->dev), |
317 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", | 317 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", |
318 | urb->status, urb->start_frame); | 318 | urb->status, urb->start_frame); |
319 | return; | 319 | return; |
@@ -424,7 +424,7 @@ static int usX2Y_urbs_allocate(struct snd_usX2Y_substream *subs) | |||
424 | int i; | 424 | int i; |
425 | unsigned int pipe; | 425 | unsigned int pipe; |
426 | int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; | 426 | int is_playback = subs == subs->usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
427 | struct usb_device *dev = subs->usX2Y->chip.dev; | 427 | struct usb_device *dev = subs->usX2Y->dev; |
428 | 428 | ||
429 | pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : | 429 | pipe = is_playback ? usb_sndisocpipe(dev, subs->endpoint) : |
430 | usb_rcvisocpipe(dev, subs->endpoint); | 430 | usb_rcvisocpipe(dev, subs->endpoint); |
@@ -500,7 +500,7 @@ static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) | |||
500 | unsigned long pack; | 500 | unsigned long pack; |
501 | if (0 == i) | 501 | if (0 == i) |
502 | atomic_set(&subs->state, state_STARTING3); | 502 | atomic_set(&subs->state, state_STARTING3); |
503 | urb->dev = usX2Y->chip.dev; | 503 | urb->dev = usX2Y->dev; |
504 | urb->transfer_flags = URB_ISO_ASAP; | 504 | urb->transfer_flags = URB_ISO_ASAP; |
505 | for (pack = 0; pack < nr_of_packs(); pack++) { | 505 | for (pack = 0; pack < nr_of_packs(); pack++) { |
506 | urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack; | 506 | urb->iso_frame_desc[pack].offset = subs->maxpacksize * pack; |
@@ -692,7 +692,7 @@ static int usX2Y_rate_set(struct usX2Ydev *usX2Y, int rate) | |||
692 | } | 692 | } |
693 | ((char*)(usbdata + i))[0] = ra[i].c1; | 693 | ((char*)(usbdata + i))[0] = ra[i].c1; |
694 | ((char*)(usbdata + i))[1] = ra[i].c2; | 694 | ((char*)(usbdata + i))[1] = ra[i].c2; |
695 | usb_fill_bulk_urb(us->urb[i], usX2Y->chip.dev, usb_sndbulkpipe(usX2Y->chip.dev, 4), | 695 | usb_fill_bulk_urb(us->urb[i], usX2Y->dev, usb_sndbulkpipe(usX2Y->dev, 4), |
696 | usbdata + i, 2, i_usX2Y_04Int, usX2Y); | 696 | usbdata + i, 2, i_usX2Y_04Int, usX2Y); |
697 | #ifdef OLD_USB | 697 | #ifdef OLD_USB |
698 | us->urb[i]->transfer_flags = USB_QUEUE_BULK; | 698 | us->urb[i]->transfer_flags = USB_QUEUE_BULK; |
@@ -740,17 +740,17 @@ static int usX2Y_format_set(struct usX2Ydev *usX2Y, snd_pcm_format_t format) | |||
740 | alternate = 1; | 740 | alternate = 1; |
741 | usX2Y->stride = 4; | 741 | usX2Y->stride = 4; |
742 | } | 742 | } |
743 | list_for_each(p, &usX2Y->chip.midi_list) { | 743 | list_for_each(p, &usX2Y->midi_list) { |
744 | snd_usbmidi_input_stop(p); | 744 | snd_usbmidi_input_stop(p); |
745 | } | 745 | } |
746 | usb_kill_urb(usX2Y->In04urb); | 746 | usb_kill_urb(usX2Y->In04urb); |
747 | if ((err = usb_set_interface(usX2Y->chip.dev, 0, alternate))) { | 747 | if ((err = usb_set_interface(usX2Y->dev, 0, alternate))) { |
748 | snd_printk(KERN_ERR "usb_set_interface error \n"); | 748 | snd_printk(KERN_ERR "usb_set_interface error \n"); |
749 | return err; | 749 | return err; |
750 | } | 750 | } |
751 | usX2Y->In04urb->dev = usX2Y->chip.dev; | 751 | usX2Y->In04urb->dev = usX2Y->dev; |
752 | err = usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); | 752 | err = usb_submit_urb(usX2Y->In04urb, GFP_KERNEL); |
753 | list_for_each(p, &usX2Y->chip.midi_list) { | 753 | list_for_each(p, &usX2Y->midi_list) { |
754 | snd_usbmidi_input_start(p); | 754 | snd_usbmidi_input_start(p); |
755 | } | 755 | } |
756 | usX2Y->format = format; | 756 | usX2Y->format = format; |
@@ -955,7 +955,7 @@ static int usX2Y_audio_stream_new(struct snd_card *card, int playback_endpoint, | |||
955 | struct snd_pcm *pcm; | 955 | struct snd_pcm *pcm; |
956 | int err, i; | 956 | int err, i; |
957 | struct snd_usX2Y_substream **usX2Y_substream = | 957 | struct snd_usX2Y_substream **usX2Y_substream = |
958 | usX2Y(card)->subs + 2 * usX2Y(card)->chip.pcm_devs; | 958 | usX2Y(card)->subs + 2 * usX2Y(card)->pcm_devs; |
959 | 959 | ||
960 | for (i = playback_endpoint ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; | 960 | for (i = playback_endpoint ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; |
961 | i <= SNDRV_PCM_STREAM_CAPTURE; ++i) { | 961 | i <= SNDRV_PCM_STREAM_CAPTURE; ++i) { |
@@ -971,7 +971,7 @@ static int usX2Y_audio_stream_new(struct snd_card *card, int playback_endpoint, | |||
971 | usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]->endpoint = playback_endpoint; | 971 | usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]->endpoint = playback_endpoint; |
972 | usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]->endpoint = capture_endpoint; | 972 | usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]->endpoint = capture_endpoint; |
973 | 973 | ||
974 | err = snd_pcm_new(card, NAME_ALLCAPS" Audio", usX2Y(card)->chip.pcm_devs, | 974 | err = snd_pcm_new(card, NAME_ALLCAPS" Audio", usX2Y(card)->pcm_devs, |
975 | playback_endpoint ? 1 : 0, 1, | 975 | playback_endpoint ? 1 : 0, 1, |
976 | &pcm); | 976 | &pcm); |
977 | if (err < 0) { | 977 | if (err < 0) { |
@@ -987,7 +987,7 @@ static int usX2Y_audio_stream_new(struct snd_card *card, int playback_endpoint, | |||
987 | pcm->private_free = snd_usX2Y_pcm_private_free; | 987 | pcm->private_free = snd_usX2Y_pcm_private_free; |
988 | pcm->info_flags = 0; | 988 | pcm->info_flags = 0; |
989 | 989 | ||
990 | sprintf(pcm->name, NAME_ALLCAPS" Audio #%d", usX2Y(card)->chip.pcm_devs); | 990 | sprintf(pcm->name, NAME_ALLCAPS" Audio #%d", usX2Y(card)->pcm_devs); |
991 | 991 | ||
992 | if ((playback_endpoint && | 992 | if ((playback_endpoint && |
993 | 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, | 993 | 0 > (err = snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, |
@@ -1001,7 +1001,7 @@ static int usX2Y_audio_stream_new(struct snd_card *card, int playback_endpoint, | |||
1001 | snd_usX2Y_pcm_private_free(pcm); | 1001 | snd_usX2Y_pcm_private_free(pcm); |
1002 | return err; | 1002 | return err; |
1003 | } | 1003 | } |
1004 | usX2Y(card)->chip.pcm_devs++; | 1004 | usX2Y(card)->pcm_devs++; |
1005 | 1005 | ||
1006 | return 0; | 1006 | return 0; |
1007 | } | 1007 | } |
@@ -1013,14 +1013,14 @@ int usX2Y_audio_create(struct snd_card *card) | |||
1013 | { | 1013 | { |
1014 | int err = 0; | 1014 | int err = 0; |
1015 | 1015 | ||
1016 | INIT_LIST_HEAD(&usX2Y(card)->chip.pcm_list); | 1016 | INIT_LIST_HEAD(&usX2Y(card)->pcm_list); |
1017 | 1017 | ||
1018 | if (0 > (err = usX2Y_audio_stream_new(card, 0xA, 0x8))) | 1018 | if (0 > (err = usX2Y_audio_stream_new(card, 0xA, 0x8))) |
1019 | return err; | 1019 | return err; |
1020 | if (le16_to_cpu(usX2Y(card)->chip.dev->descriptor.idProduct) == USB_ID_US428) | 1020 | if (le16_to_cpu(usX2Y(card)->dev->descriptor.idProduct) == USB_ID_US428) |
1021 | if (0 > (err = usX2Y_audio_stream_new(card, 0, 0xA))) | 1021 | if (0 > (err = usX2Y_audio_stream_new(card, 0, 0xA))) |
1022 | return err; | 1022 | return err; |
1023 | if (le16_to_cpu(usX2Y(card)->chip.dev->descriptor.idProduct) != USB_ID_US122) | 1023 | if (le16_to_cpu(usX2Y(card)->dev->descriptor.idProduct) != USB_ID_US122) |
1024 | err = usX2Y_rate_set(usX2Y(card), 44100); // Lets us428 recognize output-volume settings, disturbs us122. | 1024 | err = usX2Y_rate_set(usX2Y(card), 44100); // Lets us428 recognize output-volume settings, disturbs us122. |
1025 | return err; | 1025 | return err; |
1026 | } | 1026 | } |