Takashi Iwai [Mon, 3 Dec 2012 10:30:50 +0000 (11:30 +0100)]
ALSA: usb-audio: Fix missing autopm for MIDI input
The commit [88a8516a: ALSA: usbaudio: implement USB autosuspend] added
the support of autopm for USB MIDI output, but it didn't take the MIDI
input into account.
This patch adds the following for fixing the autopm:
- Manage the URB start at the first MIDI input stream open, instead of
the time of instance creation
- Move autopm code to the common substream_open()
- Make snd_usbmidi_input_start/_stop() more robust and add the running
state check
Reviewd-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Dec 2012 10:12:46 +0000 (11:12 +0100)]
ALSA: usb-audio: Avoid autopm calls after disconnection
Add a similar protection against the disconnection race and the
invalid use of usb instance after disconnection, as well as we've done
for the USB audio PCM.
Adrian Knoth [Mon, 3 Dec 2012 13:55:50 +0000 (14:55 +0100)]
ALSA: hdspm - Use HDSPM_TOGGLE_SETTING to alter settings
HDSPM_TOGGLE_SETTING and its corresponding functions allow to change
settings in the control register. Instead of using the specialised
functions, use the generic code to make the code DRY.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Dec 2012 09:30:58 +0000 (10:30 +0100)]
ALSA: hda/realtek - Keep the channel count for multiple speakers
The current Realtek driver reconfigures the max PCM channels
dynamically according to the value of Channel Mode enum if the
multi-io retasking is available. It works fine for multi-io pins.
But when multiple speaker pins are available, the channels of speakers
also have to obey to the channel mode, which isn't nice.
(That is, when you select "2ch" in Channel Mode so that the line-in
and mic jack behave as input, you can't play surrounds properly from
the built-in speaker.)
This patch fixes the problem by taking the channel number for multiple
speakers into account in the channel-mode setup code.
Also it fixes the wrongly set up max_channels value in the case of
multi-io extension.
Takashi Iwai [Mon, 3 Dec 2012 08:55:44 +0000 (09:55 +0100)]
Merge tag 'asoc-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.8
Very quiet release for ASoC really:
- Standardisation of the logging.
- DT and dmaengine support for Atmel.
- Support for Wolfson ADSP cores.
- New drivers for Freescale/iVeia P1022 and Maxim MAX98090.
Bo Shen [Wed, 28 Nov 2012 03:46:13 +0000 (11:46 +0800)]
ASoC: atmel-pcm: dma support based on pcm dmaengine
Specify overrun bit in interrupt mask
Add dmaengine specific routines
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[voice.shen@atmel.com: adapt to soc dmaengine framework] Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Bo Shen [Wed, 28 Nov 2012 03:46:12 +0000 (11:46 +0800)]
ASoC: atmel-pcm: split into two file
This patch is split original atmel-pcm.c into new atmel-pcm.c and
atmel-pcm-pdc.c two files. The new atmel-pcm.c is the share routine
while will be used for pdc or dma transfer.
Using SND_ATMEL_SOC_PDC to select using PDC for audio transfer
Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Sachin Kamat [Mon, 26 Nov 2012 11:49:43 +0000 (17:19 +0530)]
ASoC: wm8960: Use devm_regmap_init_i2c()
devm_regmap_init_i2c() is device managed and makes error
handling and code cleanup simpler. There was no explicit
regmap_exit call in this function which was probably a bug.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ALSA: usb - Don't create "Speaker" mixer controls on headphones and headsets
A lot of headsets/headphones have a "Speaker" mixer control. This confuses
PulseAudio to think it is a speaker instead of a headphone/headset.
Therfore, we rename it to "Headphone".
We determine if something is a headphone similar to how udev determines
form factor (see 78-sound-card.rules).
BugLink: https://bugs.launchpad.net/bugs/1082357 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Eldad Zack [Wed, 28 Nov 2012 22:55:37 +0000 (23:55 +0100)]
ALSA: usb-audio: parameterize FTU effect unit control
Adds the unit ID and the control as parameters to the creation of the
effect unit control for the M-Audio Fast Track Ultra. This allows the
code to be shared with other devices that use different unit ID and
control, such as the M-Audio Fast Track C400.
Eldad Zack [Wed, 28 Nov 2012 22:55:36 +0000 (23:55 +0100)]
ALSA: usb-audio: skip UAC2 EFFECT_UNIT
Current code mishandles the case where the device is a UAC2
and the bDescriptorSubtype is a UAC2 Effect Unit (0x07).
It tries to parse it as a Processing Unit (which is similar to two
other UAC1 units with overlapping subtypes), but since the structure
is different (See: 4.7.2.10, 4.7.2.11 in UAC2 standard), the parsing
is done incorrectly and prevents the device from initializing.
For now, just ignore the unit.
Eldad Zack [Wed, 28 Nov 2012 22:55:35 +0000 (23:55 +0100)]
ALSA: usb-audio: add control index offset
Currently, channel IDs exceeding 31 (0x1f) cannot be used.
The channel ID is derived from the cmask. Extending cmask
to a 64-bit type would only allow it to go up to 63 (0x3f).
Some devices have channel IDs exceeding that as well.
To address that, add an offset to the mixer element which
is then accounted for in the UAC set/get functions.
Eldad Zack [Wed, 28 Nov 2012 22:55:34 +0000 (23:55 +0100)]
ALSA: usb-audio: use sender stride for implicit feedback
For implicit feedback endpoints, the number of bytes for each packet
is matched by the corresponding synchronizing endpoint.
The size is calculated by taking the actual size and dividing it by
the stride - currently by the endpoint's stride, but we should use the
synchronization source's stride.
This is evident when the number of channels differ between the
synchronization source and the implicitly fed-back endpoint, as with
M-Audio Fast Track C400 - the synchronization source (capture)
has 4 channels, while the implicit feedback mode endpoint has 6.
Padmavathi Venna [Wed, 28 Nov 2012 10:47:48 +0000 (16:17 +0530)]
ASoC: Samsung: Get I2S src_clk from clock alias id.
As the I2S src clks are registered with clkdev using generic
connection id, driver can get the clk name using generic id.
So the variable representing the array of rclk src clks is
deleted.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 28 Nov 2012 17:20:32 +0000 (17:20 +0000)]
ASoC: wm_adsp: Enable DVFS for ADSP2
Some ADSP devices can make use of DVFS to optimise power consumption
depending on the operating frequency of the DSP core. Implement
support for this in the generic ADSP code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>