aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-04-27Merge branch 'fix/caiaq' into for-linusTakashi Iwai2-6/+8
* fix/caiaq: ALSA: snd-usb-caiaq: fix reported elapsed periods
2009-04-27ALSA: snd-usb-caiaq: fix reported elapsed periodsDaniel Mack2-6/+8
Reset the internal period position counter upon stream startup. This fixes initial aplay underruns and problems related to latency picky applications such as pulseaudio. Bumped the version number to 1.3.14. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21Merge branch 'fix/usx2y' into for-linusTakashi Iwai2-39/+40
* fix/usx2y: ALSA: us122l: add snd_us122l_free() ALSA: us122l: Fix signedness in comparisions
2009-04-20ALSA: us122l: add snd_us122l_free()Karsten Wiese1-2/+10
Use it to clean up snd_us122l_card_used[]. Without patch unplugging of an US122L soundcard didn't reset the corresponding element of snd_us122l_card_used[] to 0. The (SNDRV_CARDS + 1)th plugging in did not result in creating the soundcard device anymore. Index values supplied with the modprobe command line were not used correctly anymore after the first unplugging of an US122L. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-17ALSA: us122l: Fix signedness in comparisionsKarsten Wiese1-37/+30
Within 2.6.30's mergewindow, struct urb's transfer_buffer_length has become unsigned. This changed an "int > int" comparision to an "unsigned > int" one in snd_usb_122l. Fix this by using a local int variable instead of urb->transfer_buffer_length in comparisions. Shorten playback_prep_freqn() a bit and tweak error-paths in usb_stream_prepare_playback(). Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-15Merge branch 'topic/memdup_user' into for-linusTakashi Iwai2-14/+9
* topic/memdup_user: ALSA: sound/pci: use memdup_user() ALSA: sound/usb: use memdup_user() ALSA: sound/isa: use memdup_user() ALSA: sound/core: use memdup_user()
2009-04-14ALSA: snd-usb-caiaq: rename files to remove redundant information in file pathesDaniel Mack11-15/+16
Cleanup only, no functional change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14ALSA: snd-usb-caiaq: clean up header includesDaniel Mack5-36/+6
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14ALSA: sound/usb: use memdup_user()Li Zefan2-14/+9
Remove open-coded memdup_user(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07sound: usb-audio: allow period sizes less than 1 msClemens Ladisch1-20/+86
To enable periods shorter than 1 ms, we have to make sure that short periods are only available for alternate settings that have a small enough data packet interval. Furthermore, the code that aligns URBs to USB frames is now superfluous. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07sound: usb-audio: save data packet interval in audioformat structureClemens Ladisch1-6/+21
The data packet interval needs to be available in the audioformat structure, together with the other audio format parameters, so that it can be used to influence ALSA hardware parameters. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07sound: usb-audio: remove check_hw_params_convention()Clemens Ladisch1-116/+19
This removes the check_hw_params_convention() function because 1) it is not necessary, as the hw_rule_* functions also work correctly (i.e., as no-ops) when the device supports all combinations of the audio format parameters; and 2) it would become too complex when adding a fourth altsetting-dependent hardware parameter, as this would require another three loops to check dependecies with rate/channels/format. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07sound: usb-audio: show sample format width in proc fileClemens Ladisch1-1/+2
When listing the device's sample formats in the stream? proc file, the sample format number itself is rather obscure, so we better show the format width, too. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-24Merge branch 'topic/usb-caiaq' into for-linusTakashi Iwai5-11/+79
2009-03-24Merge branch 'topic/usb-audio' into for-linusTakashi Iwai5-105/+154
2009-03-24Merge branch 'topic/misc' into for-linusTakashi Iwai3-5/+4
2009-03-24Merge branch 'topic/hwdep-cleanup' into for-linusTakashi Iwai2-33/+1
2009-03-24Merge branch 'topic/snd_card_new-err' into for-linusTakashi Iwai4-55/+84
2009-03-18ALSA: snd-usb-caiaq: bump version numberDaniel Mack1-1/+1
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: snd-usb-caiaq: drop bogus iso packetsDaniel Mack3-1/+9
Drop inbound packets that are smaller than expected. This has been observed at the very beginning of the streaming transaction. And when the hardware is in panic mode (which can only very rarely happen in case of massive EMI chaos), mute the input channels. Signed-off-by: Daniel Mack <daniel@caiaq.de> Tested-by: Mark Hills <mark@pogo.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18ALSA: snd-usb-caiaq: only warn once on streaming errorsDaniel Mack2-2/+4
Limit the number of printed warnings to one in case of streaming errors. printk() happens to be expensive, especially in code called as often as here. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02sound: usb-audio: fix queue length check for high speed devicesClemens Ladisch1-3/+2
When checking for the maximum queue length, we have to take into account that MAX_QUEUE is measured in milliseconds (i.e., frames) while the unit of urb_packs is whatever data packet interval the device uses (possibly less than one frame when using high speed devices). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02sound: usb-audio: fix rules check for 32-channel devicesClemens Ladisch1-2/+2
When storing the channel numbers used by a format, and if the device happens to support 32 channels, the code would try to store 1<<32 in a 32-bit value. Since no valid format can have zero channels, we can use 1<<(channels-1) instead of 1<<channels so that all the channel numbers that we test for fit into 32 bits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-26ALSA: sound/usb/usx2y: fix sparse warning: do-while statement is not a compound ...Hannes Eder1-2/+2
Fix this sparse warning: sound/usb/usx2y/usbusx2y.c:231:33: warning: do-while statement is not a compound statement Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-26ALSA: sound/usb/usx2y: fix sparse warning: Should it be static?Hannes Eder2-3/+2
Impact: Move declaration to header file. Fix this sparse warning: sound/usb/usx2y/usx2yhwdeppcm.c:739:5: warning: symbol 'usX2Y_hwdep_pcm_new' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20sound: usb-audio: remove MIN_PACKS_URBClemens Ladisch1-8/+6
Remove the MIN_PACKS_URB symbol because other limits can force the number of packets down to one, regardless of the value of this symbol, and nobody has ever changed it anyway. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16ALSA: usb-audio - Workaround for misdetected sample rate with CM6207Joris van Rantwijk1-1/+2
The CM6207 incorrectly advertises its 96 kHz playback setting as 48 kHz in its USB device descriptor. This patch extends an existing workaround in usbaudio.c to also cover the CM6207. This resolves issue 0004249 in the ALSA bug tracker. Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16ALSA: usb-audio - Fix non-continuous rate detectionTakashi Iwai1-8/+9
The detection of non-continuous rates (given via rate tables) isn't processed properly (e.g. for type II). This patch fixes and simplifies the detection code. Tested-by: Joris van Rantwijk <jorispubl@xs4all.nl> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16sound: usb-audio: fix uninitialized variable with M-Audio MIDI interfacesClemens Ladisch1-0/+1
Fix the snd_usbmidi_create_endpoints_midiman() function, which forgot to set the out_interval member of the endpoint info structure for Midiman/ M-Audio devices. Since kernel 2.6.24, any non-zero value makes the driver use interrupt transfers instead of bulk transfers. With EHCI controllers, these random interval values result in unbearably large latencies for output MIDI transfers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-by: David <devurandom@foobox.com> Tested-by: David <devurandom@foobox.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-06sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devicesClemens Ladisch1-0/+1
For audio devices that do not have proper audio descriptors (e.g., Edirol UA-20), we use hardcoded parameters from our quirks list. However, we must still read the maximum packet size from the standard endpoint descriptor; otherwise, we might use packets that are too big and therefore rejected by the USB core. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: usb - Add missing KERN_* prefix to printkTakashi Iwai3-4/+9
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd-usb-caiaq: Increase version number to 1.3.12Mark Hills1-1/+1
Indicates fixes affecting control messages and switching of input mode on Audio 8 DJ and Audio 4 DJ. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd-usb-caiaq: Remove duplicate A8DJ controlMark Hills1-1/+0
Remove a duplicate control which causes an error when it is registered, and causes later controls to not be registered. The device does not have a fourth ground lift control. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJMark Hills1-3/+29
In the context of the Audio 4 DJ (when compared to Audio 8 DJ), hardware input mode 0 is not used. Expose modes 1 (line) and 2 (phono) to the user as modes 0 and 1 respectively. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd-usb-caiaq: Set default input mode of A4DJMark Hills1-0/+6
Do not start the device with input mode undefined. Mimic the behaviour of the Audio 8 DJ and start in phono input mode. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: snd-usb-caiaq: Send the correct command when setting controlsMark Hills1-1/+1
Fixes a bug where an incorrect command was sent which had no effect on the device. Signed-off-by: Mark Hills <mark@pogo.org.uk> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: Remove superfluous hwdep opsTakashi Iwai2-33/+1
Remove NOP hwdep ops in sound drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-27ALSA: usbaudio - use printf format instead of hardcoding itAndreas Bergmeier1-7/+7
Rather use printf format instead of hardcoding prefix like 0x. A next step would be to predefine certain formats. Signed-off-by: Andreas Bergmeier <lcid-fire@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-26sound: usb-audio: make URB sizes more equalClemens Ladisch1-24/+5
Distribute the packets evenly among the URBs, instead of making all URBs except the last one to have the maximum size. This makes the timing of pointer updates more regular and removes some special cases from the code. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-26sound: usb-audio: limit playback queue lengthClemens Ladisch1-1/+8
Once our URBs contain enough packets, queueing more URBs does not give us any additional underrun protection (as we use double-buffering) but just increases latency unnecessarily. Therefore, we try to limit the queue length to some reasonable value. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-26sound: usb-audio: use normal number of frames for no-data URBsClemens Ladisch1-3/+3
When sending a silence URB (before playback has started, or when it is paused), use the number of frames that would be normally sent instead of a single frame so that the rate at which completion interrupts arrive is consistent. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-18ALSA: usb-audio - Quirk for Serato phonoAndreas Bergmeier1-0/+21
Ignore errors (wrong usb interface data) found when using the serato scratch live box with alsa Thus the alsa controls can be accessed (beware: they don't work though - but at least it's one ugly error message less) Signed-off-by: Andreas Bergmeier <lcid-fire@gmx.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-17Merge branch 'topic/usb-mixer-cache' into next/usb-audioTakashi Iwai5-68/+91
2009-01-16ALSA: snd-usb-caiaq: support for two more audio devicesDaniel Mack5-7/+34
- Added support for two new audio devices from Native Instuments, 'Audio4DJ' and 'GuitarRig mobile' - Add missing statement about 'Session IO' in Kconfig help text - Version number bumped to 1.3.11 Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15ALSA: usb-audio - Cache mixer valuesTakashi Iwai1-52/+70
Cache mixer values in usb-audio driver to reduce too excessive accesses to the hardware. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-14ALSA: USB quirk for Logitech Quickcam Pro 9000 nameSigned-off-by: Peter Stokes1-0/+8
The Logitech QuickCam Pro 9000 does not appear to any product identification strings in its USB device descriptor. Therefore it receives a device name of "USB Device 0x46d:0x990". Th e attached patch below adds a USB quirk to provide a more friendly name. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-13ALSA: rename "Device" to "Toshiba SB-0500" via quirksAndrea Borgia1-0/+10
Signed-off-by: Andrea Borgia <andrea@borgia.bo.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Return proper error code at probe in sound/usb/*Takashi Iwai3-44/+67
Some drivers in soudn/usb/* don't handle the error code properly from snd_card_create(). This patch fixes these places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in other sound/*Takashi Iwai4-11/+17
Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-09ALSA: caiaq - Version 1.3.10Takashi Iwai1-1/+1
Increase the version number in module info to indicate the fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>