The sound device instance needs to be a child of the USB interface, not
the USB device. Newer udev versions pay attention to that.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Seems that nobody recently tried the input on the very first supported
sound card model, RK2. This patch fixes the byte offset to make it
running again.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch changes yet again the ID for the TTA cards, resulting in a
more reasonable name:
1 [Aureon51MkII ]: USB-Audio - Aureon5.1MkII
TerraTec Aureon5.1MkII at usb-0000:00:03.0-2, full speed
Signed-off-by: Andrea Borgia <andrea@borgia.bo.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Just for the sake of readability, removing extra space
Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
alsamixer and friends want the mixername to be set. Even though the
driver does not exports a real mixer device, export the name doesn't
harm.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added boot quirk for C-Media CM6206 device in snd_usb_audio_probe.
The function snd_usb_cm6206_boot_quirk sets up six internal 16-bit
registers in order to initialize the device. Values for the registers
came from sniffing USB traffic under Windows since only four of the six
are documented in the datasheet for CM106 and some reserved bits were
also being set.
[Minor coding-style fixes by tiwai]
Signed-off-by: Dan Allongo <gongo2k1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cut'n'paste mistake, whose likely result was nothing at all.
Correct version is "USB_DEVICE", not "USB_DEVICE_VENDOR_SPEC".
Signed-off-by: Andrea Borgia <andrea@borgia.bo.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If not passed as module option, provide an own card ID with the newly
introduced snd_set_card_id() call.
This will prevent ALSA from calling choose_default_name() which only
takes the last part of a name containing whitespaces. This for example
caused 'Audio 4 DJ' to be shortened to 'DJ', which was not very
descriptive.
The implementation now takes the short name and removes all whitespaces
from it which is much nicer.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The serial number is of no interest in the longname, remove it. This
gives space for the usb path information which is more informative.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added a half-working quirk for Roland/Edirol M-16DX.
This enables the capture on the device but the playback on it seems still
problematic becuase of lack of sync with the capture clock.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add quirk to provide proper naming of the Terratec Aureon 5.1 MkII
USB card.
Signed-off-by: Andrea Borgia <andrea@borgia.bo.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Kernel 2.6.18 broke the MotU Fastlane, which uses duplicate endpoint
numbers in a manner that is not only illegal but also confuses the
kernel's endpoint descriptor caching mechanism. To work around this, we
have to add a separate usb_set_interface() call to guide the USB core to
the correct descriptors.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: David Fries <david@fries.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added SNDRV_PCM_INFO_BATCH flag to PCM info field of some drivers that
really don't give the precise pointer value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
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>
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>
* 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()
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>
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>
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>
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>
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>
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>
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>
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>
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>