Commit Graph

6010 Commits

Author SHA1 Message Date
Mark Brown a8c136d2eb Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-22 16:26:33 +08:00
Mark Brown 32eca984f6 Merge remote-tracking branch 'asoc/fix/fsl' into tmp 2013-01-22 16:26:21 +08:00
Mark Brown 05780d7771 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-22 16:26:15 +08:00
Mark Brown bc04c93bbc Merge remote-tracking branch 'asoc/fix/arizona' into tmp 2013-01-22 16:26:06 +08:00
Charles Keepax a4cdbec758 ASoC: wm_adsp: Release firmware on error
This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22 16:40:26 +09:00
Mark Brown 7881fd0fb3 ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:14:34 +09:00
Mark Brown b59e0f82aa ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK
Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than
is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-17 14:36:07 +09:00
Chris Rattray a80cc73428 ASoC: wm2200: correct mixer values and text
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-16 20:47:26 +09:00
Mark Brown 7d5cb4f710 ASoC: wm5110: Correct AEC loopback mask
The generated defines in the header are pre-shifted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:16:30 +00:00
Mark Brown 7f39bb9e9f ASoC: wm5102: Correct AEC loopback mask
The generated defines in the header are pre-shifted.

Reported-by: Heather Lomond <Heather.Lomond@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:16:23 +00:00
Mark Brown 8784c77a6c ASoC: dapm: Fix sense of regulator bypass mode
Enable bypass when the regulator is idle, not when it is in use. This is
consistent with what the few existing users actually want.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:11:47 +00:00
Shawn Guo 25b8d31488 ASoC: fsl: fix multiple definition of init_module
With commit f2818d0 (ASoC: fsl: fix miscompilation of snd-soc-imx-pcm),
we will see the following build error when building modules with
CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig.

  CC [M]  sound/soc/fsl/phycore-ac97.o
  LD [M]  sound/soc/fsl/snd-soc-fsl-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-fsl-utils.o
  LD [M]  sound/soc/fsl/snd-soc-imx-ssi.o
  LD [M]  sound/soc/fsl/snd-soc-imx-audmux.o
  LD [M]  sound/soc/fsl/snd-soc-imx-pcm.o
sound/soc/fsl/imx-pcm-dma.o: In function `init_module':
imx-pcm-dma.c:(.init.text+0x0): multiple definition of `init_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.init.text+0x0): first defined here
sound/soc/fsl/imx-pcm-dma.o: In function `cleanup_module':
imx-pcm-dma.c:(.exit.text+0x0): multiple definition of `cleanup_module'
sound/soc/fsl/imx-pcm-fiq.o:imx-pcm-fiq.c:(.exit.text+0x0): first defined here
make[4]: *** [sound/soc/fsl/snd-soc-imx-pcm.o] Error 1

Instead of using bool for SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA
to fix the original issue, we should completely remove SND_SOC_IMX_PCM
and have imx-pcm.o statically linked with imx-pcm-fiq.o or imx-pcm-dma.o.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 00:05:14 +00:00
Mark Brown 49a170bcf2 Merge remote-tracking branch 'asoc/fix/wm5100' into tmp 2013-01-10 12:22:30 +00:00
Mark Brown 921c038d87 Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-10 12:22:29 +00:00
Mark Brown 28f2675db8 Merge remote-tracking branch 'asoc/fix/wm2000' into tmp 2013-01-10 12:22:26 +00:00
Mark Brown 92a9d1524e Merge remote-tracking branch 'asoc/fix/wm-adsp' into tmp 2013-01-10 12:22:25 +00:00
Mark Brown a883eae513 Merge remote-tracking branch 'asoc/fix/sta529' into tmp 2013-01-10 12:22:22 +00:00
Mark Brown fd2eab87a2 Merge remote-tracking branch 'asoc/fix/sgtl5000' into tmp 2013-01-10 12:22:17 +00:00
Mark Brown c31b71de6f Merge remote-tracking branch 'asoc/fix/lm49453' into tmp 2013-01-10 12:22:15 +00:00
Mark Brown fa17cb4a02 Merge remote-tracking branch 'asoc/fix/cs42l52' into tmp 2013-01-10 12:22:14 +00:00
Mark Brown 587691ea39 Merge remote-tracking branch 'asoc/fix/cs4271' into tmp 2013-01-10 12:22:11 +00:00
Mark Brown a18a31a161 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-10 12:21:50 +00:00
Charles Keepax e31c194672 ASoC: arizona: Disable free-running mode on FLL1
The free running mode can cause problems when attempting to bring up the
FLL running from a defined clock source. This patch disables
free-running mode.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 18:01:17 +00:00
Mark Brown a76fefab5c ASoC: wm_adsp: Ensure that block writes are from DMA aligned addresses
Otherwise we won't run correctly on systems that require this for larger
data transfers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07 19:13:35 +00:00
Mark Brown 267f8fa2e1 ASoC: wm2000: Fix sense of speech clarity enable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:19:42 +00:00
Mark Brown 5f960294e2 ASoC: wm5100: Remove DSP B and left justified formats
These are not supported

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:06:08 +00:00
Mark Brown d71753e22b ASoC: arizona: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:33:22 +00:00
Mark Brown 0cc411b934 ASoC: wm2200: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:31:57 +00:00
Mark Brown 1b8d52e63c ASoC: wm5102: Improve speaker enable performance
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-02 13:08:42 +00:00
Chuansheng Liu d3bf156125 ASoC: core: fix the memory leak in case of remove_aux_dev()
When probing aux_dev, initializing is as below:
device_initialize()
device_add()

So when remove aux_dev, we need do as below:
device_del()
device_put()
Otherwise, the rtd_release() will not be called.

So here using device_unregister() to replace device_del(),
like the action in soc_remove_link_dais().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:14:43 +00:00
Chuansheng Liu 865df9cb12 ASoC: core: fix the memory leak in case of device_add() failure
After called device_initialize(), even device_add() returns
error, we still need use the put_device() to release the reference
to call rtd_release(), which will do the free() action.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-27 16:14:43 +00:00
Axel Lin 3271a4fc7d ASoC: cs42l52: Catch no-match case in cs42l52_get_clk
In the case of no-match, return -EINVAL instead of 0.

Since we assign i to ret in the for loop, ret always less than
ARRAY_SIZE(clk_map_table). Thus remove the boundary checking for ret.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 16:02:19 +00:00
MR.Swami.Reddy@ti.com 9dc754dfa7 ASoC: lm49453: Update lm49453_reg_defs values as per LM49453 HW revision-B
Update lm49453_reg_defs values as per LM49453 HW revision-B

Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:45:10 +00:00
MR.Swami.Reddy@ti.com 88ac43924b ASoC: lm49453: Fix adc, mic and sidetone volume ranges
Add adc, mic, sidetone volume ranges and appropriately added the controls.
Fix the DAC HP/EP/LS/LO/HA maximum gain values.

Signed-off-by: MR Swami Reddy <mr.swami.reddy@ti.com>
Tested-by: Vinod Koul <vinod.koul@intel.com>

--
 sound/soc/codecs/lm49453.c |   43 ++++++++++++++++++++++++-------------------
 1 files changed, 24 insertions(+), 19 deletions(-)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:43:56 +00:00
Mark Brown a8c02db029 ASoC: arizona: Correct FLL source definitions
The FLL source constants were numbered as a simple enumeration but were
being used in the code as direct values to be written to the registers.
Renumber the constants to reflect the usage.

Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-24 15:41:44 +00:00
Axel Lin 7110a287ff ASoC: arizona: Do proper shift for setting AIF rate
ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-24 15:41:44 +00:00
Axel Lin ec20f2f8d3 ASoC: lm49453: Fix mask for setting mode bit in lm49453_set_dai_fmt()
The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Omair M. Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:32:28 +00:00
Fabio Estevam b50684da6c ASoC: sgtl5000: Fix maximum value for microphone gain
sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3.

From Eric Nelson:
"We also found that for the microphones we have here (commodity PC boom mics) a
default value of 2 for the gain gives the best results."

So change the default microphone gain as well.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:31:25 +00:00
Fabio Estevam 5db1bc1892 ASoC: soc-core: Remove unused 'ret' variable
commit 9bde4f0b1c (ASoC: core: Fix SOC_DOUBLE_RANGE() macros) introduced
the following build warning:

sound/soc/soc-core.c:2999:6: warning: unused variable 'ret' [-Wunused-variable]

Remove the unused 'ret' variable.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24 15:20:16 +00:00
Axel Lin 2a5f431592 ASoC: wm2200: Fix setting dai format in wm2200_set_fmt
According to the defines in wm2200.h:
/*
 * R1284 (0x504) - Audio IF 1_5
 */

We should not left shift 1 bit for fmt_val when setting dai format.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-21 09:32:20 +00:00
Mark Brown 9bde4f0b1c ASoC: core: Fix SOC_DOUBLE_RANGE() macros
Although we've had macros defining double _RANGE controls for a while now
they've not actually been backed up properly by the implementation, it's
treated everything as mono. Fix that by implementing the handling in the
stereo controls, ensuring that the mono controls don't mistakenly get
treated as stereo.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-12-20 17:46:55 +00:00
Axel Lin ad1937cdd5 ASoC: sta529: Fix update register bits in sta529_set_dai_fmt
Both the mask and mode settings are wrong in current code.

According to the datasheet:

S2PCFG0 (0x0A)
BIT[3:1] DATA_FORMAT
        serial interface protocol format:
        000: left Justified
        001: I2S (default)
        010: right justified
        100: PCM no delay
        101: PCM delay
        111: DSP

Thus fixes the defines for LEFT_J_DATA_FORMAT, I2S_DATA_FORMAT, and
RIGHT_J_DATA_FORMAT.
Also adds define for DATA_FORMAT_MSK.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-20 16:01:26 +00:00
Patrick Lai 08b27848da ASoC: pcm: allow backend hardware to be freed in pause state
When front-end PCM session is in paused state, back-end
PCM session will be put in paused state as well if given
front-end PCM session is the only client of given back-end.
Then, application closes front-end PCM session, DPCM
framework will not allow back-end enters HW_FREE state
so back-end will never get shutdown completely.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-12-20 15:59:46 +00:00
Linus Torvalds 03c850ec32 Sound fixes for 3.8-rc1
This update contains overall only driver-specific fixes.
 Slightly large LOC are seen in usb-audio driver for a couple of new
 device quirks and cs42l71 ASoC driver for enhanced features.
 The others are a few small (regression) fixes HD-audio, and yet other
 small / trival ASoC fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ0thSAAoJEGwxgFQ9KSmk/i8P+wcdjCcp5FdfZ5YP2h9siEw5
 7KJPwwk9eTa0PVB5olgabxSh6L5P+rM69OGiXnHSKF8RwsuZDRp/5pPcaoUVRzH/
 6uibGozfLApeLBuBAJZ96eJhRIigysoSrm5W4FQeNVAbwK67zpIjP/xGwKa0+qfO
 vsK/BtSn+nVsmFpgOfO6vXZ7gKBlfKGXHYdyFVXzHEhGYSHLdf1IDxnCapIXlh78
 0nXHD2FHgKlSM6y/S6W7wiUwyNqbgmnZHwh29iIyes1CrX0wVyvtos3qgwJHukrU
 WVY87E1TDxD6HLAWTUxqeOIvNyucSarUZ+kvtYg0i31gmRCY8QNXqYVp1wBybqVd
 Uwbwe4qWwSxXhXluodFsizNwcH9T+KA3IM4B5u6yCT1pFY759pCh/KpLoNfD+maL
 6atnBU6lvtTCMxoeSyJFSdAjdOQJUpylQ9TyQaI/PIr6jrEMVC2ki/i3UX+YpQGo
 oWJj5x8Nl58MUv7GhYGTo7vfm3ZqaUbxN/YugbCeVkrcV0McJNycvddotplD4iTd
 pqfep1fVpefW9X4pJnvsys2neo7R8e8a87Qg2CfVGXQ91ijevPCf+YAh4EmHShsT
 vwNcOP/gZ+qQp/bY40SigMj5SZtZ/ZQxT47yPo6OLI4FyhyD+WK4l1AAEK5B1uPA
 odsIcQg2F6/RjzkDSsSl
 =JoY5
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This update contains overall only driver-specific fixes.  Slightly
  large LOC are seen in usb-audio driver for a couple of new device
  quirks and cs42l71 ASoC driver for enhanced features.  The others are
  a few small (regression) fixes HD-audio, and yet other small / trival
  ASoC fixes."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:
  ALSA: HDA: Fix sound resume hang
  ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins
  ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
  ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs
  ASoC: atmel-ssc: change disable to disable in dts node
  ASoC: Prevent pop_wait overwrite
  ALSA: usb-audio: ignore-quirk for HP Wireless Audio
  ALSA: hda - Always turn on pins for HDMI/DP
  ALSA: hda - Fix pin configuration of HP Pavilion dv7
  ASoC: core: Fix splitting of log messages
  ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT
  ASoC: cs42l73: Add DAPM events for power down.
  ASoC: cs42l73: Add DMIC's as DAPM inputs.
  ASoC: sigmadsp: Fix endianness conversion issue
  ASoC: tpa6130a2: Use devm_* APIs
2012-12-20 07:52:13 -08:00
Mark Brown 8246b5b03e Merge remote-tracking branch 'asoc/topic/tpa6130a2' into asoc-next 2012-12-15 23:56:46 +09:00
Mark Brown 36adf15107 Merge remote-tracking branch 'asoc/topic/log' into asoc-next 2012-12-15 23:56:45 +09:00
Mark Brown 20694ad278 Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next 2012-12-15 23:56:44 +09:00
Mark Brown 326b06a8a9 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2012-12-15 23:56:43 +09:00
Mark Brown 82441fffc8 Merge remote-tracking branch 'asoc/fix/sigmadsp' into asoc-next 2012-12-15 23:56:41 +09:00
Misael Lopez Cruz 9bffb1fb7c ASoC: Prevent pop_wait overwrite
pop_wait is used to determine if a deferred playback close
needs to be cancelled when the a PCM is open or if after
the power-down delay expires it needs to run. pop_wait is
associated with the CODEC DAI, so the CODEC DAI must be
unique. This holds true for most CODECs, except for the
dummy CODEC and its DAI.

In DAI links with non-unique dummy CODECs (e.g. front-ends),
pop_wait can be overwritten by another DAI link using also a
dummy CODEC. Failure to cancel a deferred close can cause
mute due to the DAPM STOP event sent in the deferred work.

One scenario where pop_wait is overwritten and causing mute
is below (where hw:0,0 and hw:0,1 are two front-ends with
default pmdown_time = 5 secs):

aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE -d 1
sleep 1
aplay /dev/urandom -D hw:0,1 -c 2 -r 48000 -f S16_LE -d 3 &
aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE

Since CODECs may not be unique, pop_wait is moved to the PCM
runtime structure. Creating separate dummy CODECs for each
DAI link can also solve the problem, but at this point it's
only pop_wait variable in the CODEC DAI that has negative
effects by not being unique.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-15 23:45:09 +09:00