Takashi Iwai [Thu, 3 Nov 2011 15:54:06 +0000 (16:54 +0100)]
ALSA: hda/realtek - Skip invalid digital out pins
Some BIOS report invalid pins as digital output pins. The driver checks
the connection but it doesn't do it fully correctly, and it leaves some
undefined value as the audio-out widget, which makes the driver spewing
warnings. This patch fixes the issue.
Takashi Iwai [Wed, 2 Nov 2011 20:30:51 +0000 (21:30 +0100)]
ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary
When the driver finds multiple ADCs, it tries to create an alternative
capture PCM stream. However, these secondary ADCs might be useless or
in uncontrolled paths in some cases, e.g. when auto-mic or dynamic
ADC-switching is enabled. Also, when only a single capture source is
available, the multi-streams don't make sense, too.
With this patch, the driver checks such condition and skips the alt
stream appropriately.
Takashi Iwai [Wed, 2 Nov 2011 06:44:11 +0000 (07:44 +0100)]
ALSA: hda - Check NO_PRESENCE pincfg default bit
HD-audio spec defines a bit in pin default configuration for indicating
that the pin isn't used for jack-detection although the codec is capable
of it. Better to check this bit as well in jack_is_detectable() helper
function.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Alexander Stein [Tue, 1 Nov 2011 08:40:07 +0000 (09:40 +0100)]
ALSA: hda_hwdep: Fix possible buffer overflow
If a line in the firmware file is larger than the given buffer size (and
so the firmware file size), size is set to a value larger than the actual
buffer size. This results in an overflow in the buffer passed.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Axel Lin [Fri, 28 Oct 2011 07:17:56 +0000 (15:17 +0800)]
ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
Current implementation in wm8711_set_dai_fmt always clear BIT[3:2]
(the Input Audio Data Bit Length Select) of WM8711_IFACE(07h) register.
Input Audio Data Bit Length Select bits are set by wm8711_hw_params,
we should leave BIT[3:2] untouched in wm8711_set_dai_fmt.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Axel Lin [Fri, 28 Oct 2011 03:08:01 +0000 (11:08 +0800)]
ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
The Input Audio Data Bit Length Select is controlled by BIT[3:2] of
WM8711_IFACE(07h) register.
Current code incorrectly masks BIT[1:0] which is for Audio Data Format Select.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
ALSA: intel8x0: Improve performance in virtual environment
v3: detection code is x86 and KVM specific, hide it under ifdef
v2: add detection for virtual environments (KVM and Parallels)
This patch is intended to improve performance in virtualized environments
like Parallels Desktop or KVM/VirtualBox/QEMU (virtual ICH/AC97 audio).
I/O access is very time-expensive operation in virtual world: VCPU
can be rescheduled and in the worst case we get more than 10ms delay on
each I/O access.
In the virtual environment loop exit rule
(old_civ == current_civ && old_picb == current_picb) is never satisfied,
because old_picb is never the same as current_picb due to delay inspired
by reading current_civ. As a result loop ended by timeout and we get 10x
more I/O operations.
Experimental data from Prallels Desktop 7, RHEL6 guest (I/O ops per
second):
Original code:
In Port Counter Callback
f014 41550 fffff00000179d00 ac97_bm_read_civ+0x000
f018 41387 fffff0000017a580 ac97_bm_read_picb+0x000
With patch:
In Port Counter Callback
f014 4090 fffff00000179d00 ac97_bm_read_civ+0x000
f018 1964 fffff0000017a580 ac97_bm_read_picb+0x000
Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 27 Oct 2011 19:57:54 +0000 (21:57 +0200)]
ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards
From the Windows INF file, we know the firmware ranges for all RME
cards. For PCIe, a single revision ID per device (RayDAT, MADI, AIO,
AES) is used. Contrary, the older PCI versions use ranges, that is,
one revision ID per firmware version.
Instead of listing all possible revisions individually, match the range.
This commit enables all MADI and AES PCI versions ever shipped.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adrian Knoth [Thu, 27 Oct 2011 19:57:52 +0000 (21:57 +0200)]
ALSA: hdspm - Fix MADI channel format in the status ioctl
SNDRV_HDSPM_IOCTL_GET_STATUS is supposed to query the current card
status, so we have to return what we receive on the MADI wire (RX), not
what we transmit (TX) to others. The latter is a config item to be
queried via SNDRV_HDSPM_IOCTL_GET_CONFIG.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dan Carpenter [Fri, 28 Oct 2011 06:46:01 +0000 (09:46 +0300)]
ALSA: hwdep: silence integer overflow warning
Smatch complains that if device is INT_MAX then device + 1 can
overflow. It just means we would have an annoying loop while we
check all the devices from -2147483648 to SNDRV_MINOR_HWDEPS.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 14 Oct 2011 13:26:20 +0000 (15:26 +0200)]
ALSA: hda - Fix ADC input-amp handling for Cx20549 codec
It seems that Conexant CX20549 chip handle only a single input-amp even
though the audio-input widget has multiple sources. This has been never
clear, and I implemented in the current way based on the debug information
I got at the early time -- the device reacts individual input-amp values
for different sources. This is true for another Conexant codec, but it's
not applied to CX20549 actually.
This patch changes the auto-parser code to handle a single input-amp
per audio-in widget for CX20549. After applying this, you'll see only a
single "Capture" volume control instead of separate "Mic" or "Line"
captures when the device is set up to use a single ADC.
We haven't tested 20551 and 20561 codecs yet. If these show the similar
behavior like 20549, they need to set spec->single_adc_amp=1, too.
Takashi Iwai [Fri, 14 Oct 2011 13:22:34 +0000 (15:22 +0200)]
ALSA: hda - Keep EAPD turned on for old Conexant chips
In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD
may handle both headphone and speaker outputs while it's assigned only
to one of them. Turning off dynamically leads to the unexpected silent
output in such a configuration with the auto-mute function.
Since it's difficult to know how the EAPD is handled in the actual h/w
implementation, better to keep EAPD on while running for such codecs.
Takashi Iwai [Thu, 27 Oct 2011 14:33:27 +0000 (16:33 +0200)]
ALSA: hda/realtek - Fix missing volume controls with ALC260
ALC260 has multiple mixer widgets connected to the shared DAC, but the
driver currently doesn't check this possibility and ignores when the DAC
is shared with others. This resulted in the silent output from some
routes because of lack of the amp setup.
This patch adds the workaround for it by checking the route even with the
shared DAC, but also checking the conflict with the existing control for
the very same widget NID.
Axel Lin [Thu, 27 Oct 2011 08:38:42 +0000 (16:38 +0800)]
ASoC: tlv320aic3x: Clear BIT_CLK_MASTER and WORD_CLK_MASTER bits for for slave mode
According to the datasheet:
Page0 / Register8: Audio Serial Data interface Control Register A
BIT 7: Bit Clock Directional Control
0: Bit clock is an input (slave mode)
1: Bit clock is an output (master mode)
BIT 6: Word Clock Directional Control
0: Word clock is an input (slave mode)
1: Word clock is an output (master mode)
Current code sets BIT_CLK_MASTER and WORD_CLK_MASTER bits for master mode,
but does not clear these bits for slave mode.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 27 Oct 2011 08:27:33 +0000 (16:27 +0800)]
ASoC: wm8940: Fix mask for setting BCLKDIV
According to the datasheet:
BCLK is controlled by BIT[4:2] of WM8940_CLOCK(06h) register.
Signed-off-by: Chris Paulson-Ellis <chris@edesix.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 26 Oct 2011 01:53:41 +0000 (09:53 +0800)]
ASoC: wm8940: Properly set codec->dapm.bias_level
Reported-by: Chris Paulson-Ellis <chris@edesix.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
Takashi Iwai [Wed, 26 Oct 2011 21:04:08 +0000 (23:04 +0200)]
ALSA: hda - Fix pin-config for ASUS W90V
The association numbers of surround/CLFE speaker pins aren't correctly
mapped by the auto-parser. This patch fixes the CLFE speaker pin to the
right assoc value (from 3 to 1).
Takashi Iwai [Wed, 26 Oct 2011 14:06:27 +0000 (16:06 +0200)]
ALSA: hda - Fix surround/CLFE headphone and speaker pins order
When 5.1 or more headphone or speaker pins are provided, the parser still
takes as is without fixing the order of channel mapping, which leads in
the unexpected strange channel order by surround outputs.
This patch fixes the issue by applying the same fix-up not only to
line_out_pins[] but also hp_pins[] and speaker_pins[].
Axel Lin [Sat, 15 Oct 2011 03:46:02 +0000 (11:46 +0800)]
ASoC: max98095: Convert codec->hw_write to snd_soc_write
codec->hw_write is broken now, convert codec->hw_write to snd_soc_write.
The hardware has 2 banks of registers sharing a section in I2C register space.
The 1st bank is the primary one and is cached.
The 2nd bank is for loading coefficients only and they do not need cache.
These coefficients registers are therefore direct writes.
Thus we set cache_bypass flag to deal with this before calling snd_soc_write.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Julia Lawall [Tue, 18 Oct 2011 15:06:39 +0000 (17:06 +0200)]
ASoC: keep pointer to resource so it can be freed
Add a new variable for storing resources accessed subsequent to the one
accessed using request_mem_region, so the one accessed using
request_mem_region can be released if needed.
The resource variable names are also changed to be more descriptive.
This code is also missing some calls to iounmap.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
Axel Lin [Fri, 21 Oct 2011 01:54:43 +0000 (09:54 +0800)]
ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
Ensure all mask bits are clear before setting new value.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Dong Aisheng <b29396@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 21 Oct 2011 02:44:07 +0000 (10:44 +0800)]
ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Ashish Chavan [Fri, 21 Oct 2011 13:36:23 +0000 (19:06 +0530)]
ASoC: da7210: Add support for line out and DAC
DA7210 has three line outputs. OUT1 Left, OUT1 Right and OUT2 (mono).
This patch adds support for gain controls for these three line outs.
It also adds support for overall DAC gain control.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Fri, 21 Oct 2011 13:07:42 +0000 (15:07 +0200)]
ALSA: hda/realtek - Fix DAC assignments of multiple speakers
When a device has multiple speakers and still has the auto-mute support,
the driver copies line_outs[] to speaker_outs[]. And then it tries to
assign DACs for both. This ended up with the assignment only to the
primary DAC to all speakers.
This patch fixes the situation by checking the duplicated LO/SPK case
appropriately.
Axel Lin [Thu, 20 Oct 2011 10:49:29 +0000 (18:49 +0800)]
ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
use it instead of hardcoded (0x1 << 4) - 1 for the mask.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 20 Oct 2011 10:32:59 +0000 (18:32 +0800)]
ASoC: Set sgtl5000->ldo in ldo_regulator_register
Otherwise calling ldo_regulator_remove() does not unregister regulator
and free memories.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 20 Oct 2011 04:16:31 +0000 (12:16 +0800)]
ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Axel Lin [Thu, 20 Oct 2011 04:13:24 +0000 (12:13 +0800)]
ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Ashish Chavan [Wed, 19 Oct 2011 08:54:37 +0000 (14:24 +0530)]
ASoC: da7210: Add support for ALC and Noise suppression
This patch adds controls to set following ALC parameters,
- Max gain, Min gain, Noise gain, Attack rate, Release rate and delay
It also adds a switch to enable/disable noise suppression.
As per DA7210 data sheet, ALC and noise suppression can be enabled
only if certain conditions are met. This condition checks are handled
by simply using "_EXT" version of controls to capture change events.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwod <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ashish Chavan [Wed, 19 Oct 2011 08:49:06 +0000 (14:19 +0530)]
ASoC: da7210: Add support for mute and zero cross controls
This patch adds support for below set of controls,
(1) Mute controls for MIC, AUX and ADC
(2) Zero cross controls for head phone, AUX, INPGA and line out
(3) Head phone mode selection - class H or G
It also adds digital_mute() call back.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Wed, 19 Oct 2011 06:07:31 +0000 (14:07 +0800)]
ASoC: ssm2602: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
To set mic bias resistor, we need to update bits[9:8] of
SGTL5000_CHIP_MIC_CTRL register.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Thus SGTL5000_BIAS_R_MASK should be defined as 0x0300 instead of 0x0200.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 17 Oct 2011 22:25:08 +0000 (06:25 +0800)]
ASoC: ad193x: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Barry Song <21cnbao@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Suchy [Tue, 18 Oct 2011 09:09:44 +0000 (11:09 +0200)]
ALSA: HDA: conexant support for Lenovo T520/W520
This is patch for Conexant codec of Intel HDA driver, adding new quirk
for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
T520 (similar subsystem ID is used also in W520 model) and detects more
mixer features compared to generic (fallback) Lenovo quirk with
hardcoded options in Conexant codec.
Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
problems.
Takashi Iwai [Tue, 18 Oct 2011 08:44:05 +0000 (10:44 +0200)]
ALSA: hda - Add position_fix quirk for Dell Inspiron 1010
The previous fix for the position-buffer check gives yet another
regression on a Dell laptop. The safest fix right now is to add a
static quirk for this device (and better to apply it for stable
kernels too).
Axel Lin [Sun, 16 Oct 2011 15:29:12 +0000 (23:29 +0800)]
ASoC: wm8900: Fix the mask defines
Now we have done bitwise NOT against the mask bits for the defines of
WM8900_REG_CLOCKING1_BCLK_MASK,
WM8900_REG_CLOCKING1_OPCLK_MASK and WM8900_LRC_MASK.
But we don't have the bitwise NOT against the mask bits for the defines of
WM8900_REG_CLOCKING2_DAC_CLKDIV,
WM8900_REG_CLOCKING2_ADC_CLKDIV and WM8900_REG_DACCTRL_AIF_LRCLKRATE.
It is error prone to mix the inconsistent meaning for different mask defines.
So lets make the defines for each mask to be corresponding to the bits
defines in datasheet. Don't add extra "bitwise NOT" to the defines.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sun, 16 Oct 2011 15:27:55 +0000 (23:27 +0800)]
ASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE
After checking the datasheet, I think what we want to do here is to
clear the WM8900_REG_CLOCKING2_DAC_CLKDIV/WM8900_REG_CLOCKING2_ADC_CLKDIV/
WM8900_REG_DACCTRL_AIF_LRCLKRATE bits and then OR with div value.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 17 Oct 2011 12:14:56 +0000 (20:14 +0800)]
ASoC: wm8741: Fix setting interface format for DSP modes
According to the datasheet:
Format Control (05h)
BITS[3:2]
FMT[1:0] Audio data format selection
00 = right justified mode
01 = left justified mode
10 = I2S mode
11 = DSP mode
BIT[4] LRP Polarity selec for LRCLK/DSP mode select
0 = normal LRCLK poalrity/DSP mode A
1 = inverted LRCLK poarity/DSP mode B
For SND_SOC_DAIFMT_DSP_A, we should set 0x000C instead of 0x0003.
For SND_SOC_DAIFMT_DSP_B, we should set 0x001C instead of 0x0013.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Ashish Chavan [Sat, 15 Oct 2011 09:20:06 +0000 (14:50 +0530)]
ASoC: da7210: Add support for High pass and Voice filters for ADC and DAC
This patch add controls for setting cut-off for high pass and voice
filters of ADC and DAC. There are also switches to enable/disable
these filters.
Also removed hard coded, fixed values of these parameters used by
previous version of driver.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ashish Chavan [Sat, 15 Oct 2011 09:17:56 +0000 (14:47 +0530)]
ASoC: da7210: Add support for ADC & DAC equalizers
This patch adds support for ADC and DAC five band equalizers
available on DA7210 codec.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Olof Johansson [Fri, 14 Oct 2011 22:54:19 +0000 (15:54 -0700)]
ASoC: Tegra: sparse cleanup
Fixes the following sparse warnings:
sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static?
Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
MAINTAINERS: Add maintainer for Analog Devices sound CODECs
The MAINTAINERS entry for the ADI sound CODEC drivers currently only lists the
ADI devices-drivers-devel mailing-list. Add myself as additional contact, since
I'm the person at ADI who is currently doing most of the work on these drivers.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Mon, 17 Oct 2011 14:50:59 +0000 (16:50 +0200)]
ALSA: hda/realtek - Cache COEF 0 value
The COEF #0 value represents a sort of device id, so it's supposedly
constant while operation. Better to use the cached value instead of
reading it at each time from the performance POV.
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:34 +0000 (14:43 +0300)]
ASoC: twl6040: Request core to inline the DAPM sequence
We need to have as less time between McPDM shutdown,
and power down of the DAC on the twl6040 codec as possible.
Request core to ignore the pmdown_time for the playback
stream.
Backround: with the McPDM protocol we are sendning not only
the pure audio stream, but OMAP McPDM also transmits
additional information (for example offset cancellation).
If McPDM is stopped prior to the DAC this information will
be not sent to the codec, which can result noise rendered
by the twl6040 codec.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:33 +0000 (14:43 +0300)]
ASoC: core: Add flag to ignore pmdown_time at pcm_close
With this flag codec drivers can indicate that it is desired
to ignore the pmdown_time for DAPM shutdown sequence when
playback stream is stopped.
The DAPM sequence will be executed without delay in this case.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ashish Chavan [Fri, 14 Oct 2011 10:55:25 +0000 (16:25 +0530)]
ASoC: da7210: bugfix for head phone volume control
This patch takes care of reserved bits of headphone volume
register by using correct volume range.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 14 Oct 2011 09:01:59 +0000 (17:01 +0800)]
ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
Current code defines AD193X_PLL_INPUT_MASK as (~0x6) which is quite
different from other MASK defines.
To make it consistent with other mask defines, define AD193X_PLL_INPUT_MASK
as 0x6 and change the code accordingly.
I think this change improves the readability.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 14 Oct 2011 06:30:05 +0000 (14:30 +0800)]
ASoC: wm8990: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write
This patch also includes a comment fix in wm8990_set_dai_pll(),
if freq_in and freq_out are 0, what we do is to clear WM8990_PLL_ENA bit.
Thus the comment should be "Turn off PLL".
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 14 Oct 2011 05:57:48 +0000 (13:57 +0800)]
ASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2
If (fakepower & ((1 << WM8990_INMIXR_PWR_BIT) | (1 << WM8990_AINRMUX_PWR_BIT)))
is false, we should clear WM8990_AINR_ENA bits instead of WM8990_AINL_ENA.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 14 Oct 2011 04:08:00 +0000 (12:08 +0800)]
ASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2
If (fakepower & ((1 << WM8991_INMIXR_PWR_BIT)|(1 << WM8991_AINRMUX_PWR_BIT))))
is false, we should clear WM8991_AINR_ENA bits instead of WM8991_AINL_ENA.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>