Commit Graph

16594 Commits

Author SHA1 Message Date
Sachin Kamat
193a47162c ASoC: pcm1681: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:00:10 +01:00
Sachin Kamat
a7ea1b7249 ASoC: cs4271: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 18:47:39 +01:00
Sachin Kamat
de0022d4bf ASoC: smdk_wm8994: Add .pm to struct smdk_audio_driver
Register PM ops for this driver.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 12:59:12 +01:00
Dan Carpenter
d14df339c7 ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl()
In GCC the sizeof(hdsp_version) is 8 because there is a 2 byte hole at
the end of the struct after ->firmware_rev.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-16 11:22:46 +02:00
Takashi Iwai
ac536a848a ALSA: us122l: Fix pcm_usb_stream mmapping regression
The pcm_usb_stream plugin requires the mremap explicitly for the read
buffer, as it expands itself once after reading the required size.
But the commit [314e51b9: mm: kill vma flag VM_RESERVED and
mm->reserved_vm counter] converted blindly to a combination of
VM_DONTEXPAND | VM_DONTDUMP like other normal drivers, and this
resulted in the failure of mremap().

For fixing this regression, we need to remove VM_DONTEXPAND for the
read-buffer mmap.

Reported-and-tested-by: James Miller <jamesstewartmiller@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-15 11:35:54 +02:00
Markus Pargmann
863ebddec8 ASoC: mxs-saif: Handle errors in trigger function
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 18:01:50 +01:00
Markus Pargmann
88cf632a13 ASoC: mxs-saif: Store saif state
Trigger commands may be passed multiple times. To avoid errors with
clk_enable/disable, store the saif state and return if saif is already
running/stopped.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 18:01:50 +01:00
Axel Lin
c92f66e280 ASoC: pcm1792a: Fix max_register setting
According to the datasheet, the max_register is register 23.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:01:12 +01:00
Axel Lin
acc8da7642 ASoC: pcm1681: Fix max_register setting
According to the datasheet, the max_register is 13h.
ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:01:10 +01:00
Axel Lin
64256ac6c2 ASoC: pcm1681: Fix max_register setting
According to the datasheet, the max_register is 13h.
ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:00:07 +01:00
Stephen Warren
5e049fce36 ASoC: tegra: support new register layouts in Tegra124
Tegra124 introduces some small changes to the layout of some registers.
Modify the affected drivers to program those registers appropriately
based on which SoC they're running on.

Tegra124 also introduced some new modules on the AHUB configlink register
bus. These will require new entries in configlink_clocks[] in the AHUB
driver. However, supporting that change likely relies on switching Tegra
to the common reset framework, so I'll defer that change for now.

Based-on-work-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Based-on-work-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:56:27 +01:00
Wolfram Sang
67093b253b ASoC: fsl: remove leftover release_mem_region
When converting this driver to devm_ioremap_resource, the removal of this now
unneeded function has been forgotten.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:19:31 +01:00
Wolfram Sang
48afa79352 ASoC: atmel: don't use devm_pinctrl_get_select_default() in probe
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:18:30 +01:00
Felipe Pena
1b3ed70a1b ASoC: fsl: Fix memory leak in imx-audmux.c
When audmux_clk is used and clk_prepare_enable function succeed,
the memory alloc'd to buf variable is leaked

Signed-off-by: Felipe Pena <felipensp@gmail.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 12:52:59 +01:00
David Henningsson
ccb041571b ALSA: hda - Fix inverted internal mic not indicated on some machines
The create_bind_cap_vol_ctl does not create any control indicating
that an inverted dmic is present. Therefore, create multiple
capture volumes in this scenario, so we always have some indication
that the internal mic is inverted.

This happens on the Lenovo Ideapad U310 as well as the Lenovo Yoga 13
(both are based on the CX20590 codec), but the fix is generic and
could be needed for other codecs/machines too.

Thanks to Szymon Acedański for the pointer and a draft patch.

BugLink: https://bugs.launchpad.net/bugs/1239392
BugLink: https://bugs.launchpad.net/bugs/1227491
Reported-by: Szymon Acedański <accek@mimuw.edu.pl>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-14 10:30:49 +02:00
Kuninori Morimoto
c5d5a58d7f ASoC: rcar: fixup generation checker
Current rcar is using rsnd_is_gen1/gen2() to checking its
IP generation, but it needs data mask.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:52:32 +01:00
Kuninori Morimoto
2192f81c53 ASoC: rcar: add ID check on rsnd_dai_get()
checking id in rsnd_dai_get() is good idea

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:45:49 +01:00
Kuninori Morimoto
740ad6c328 ASoC: rcar: fixup rsnd_platform_call() return value
Un-implemented platform callback is not error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:45:49 +01:00
David Henningsson
fbc78ad624 ALSA: hda - Sony VAIO Pro 13 (haswell) now has a working headset jack
Just got the positive confirmation from a tester:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1227093/comments/28

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-11 13:49:43 +02:00
Steffen Trumtrar
bb7838d4f1 ASoC: mc13783: add more DAPM routes
Add more infrastructure (i.e. routes, muxes, switches) to the mc13783 DAPM.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:44:23 +01:00
Steffen Trumtrar
c6452e39e8 ASoC: mc13783: add mixer controls
Add more controls to the alsa mixer infrastructure.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:44:23 +01:00
David Henningsson
7c478f0337 ALSA: hda - Add a headset mic model for ALC269 and friends
Using the headset mic model will cause the headset mic to be labeled
"headset mic" instead of just "mic".

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-11 10:23:49 +02:00
David Henningsson
88cfcf86aa ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model)
The external mic showed up with a precense detect of "always present",
essentially disabling the internal mic. Therefore turn off presence
detection for this pin.

Note: The external mic seems not yet working, but an internal mic is
certainly better than no mic at all.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1227093
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-11 10:23:42 +02:00
Mark Brown
1dd275b60e ASoC: dapm: Run clock and regulator events separately to other supplies
In order to avoid trying to use an external clock or supply for an
on-chip supply prior to it being enabled move the clock and regulator
supply events to a separate step in DAPM sequencing from normal supply
events.

This should have minimal practical impact since these widgets are sorted
using SND_SOC_NOPM which is a negative value and hence sorted
separately to any real register writes, though it may be relevant if
supplies have event callbacks only.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-10 12:52:00 +01:00
Mark Brown
eb270e98e1 ASoC: dapm: Use async I/O for DAPM sequences
Within a DAPM sequence we normally don't care about when exactly a register
write has completed so long as they happen in the order we requested. This
means that we can issue most of the writes we do asynchronously which
should maximise the ability of the underlying frameworks to keep the
hardware busy, providing a small performance improvement on some systems.

We currently ensure that all writes are completed both when changing to a
different device and when calling into the regulator and clock frameworks.
This should ensure that the previous ordering is maintained.

We also ensure that writes are completed prior to calling into widget
event functions since some event functions implement delays.  This
should be improved in future so that widgets can disable this sync in
order to add extra writes.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-10 12:51:58 +01:00
Takashi Iwai
c6cc3d58b4 ALSA: hda - Add fixup for ASUS N56VZ
ASUS N56VZ needs a fixup for the bass speaker pin, which was already
provided via model=asus-mode4.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=841645
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-08 19:57:50 +02:00
Anssi Hannula
39edac70e9 ALSA: hda - hdmi: Fix channel map switch not taking effect
Currently hdmi_setup_audio_infoframe() reprograms the HDA channel
mapping only when the infoframe is not up-to-date or the non-PCM flag
has changed.

However, when just the channel map has been changed, the infoframe may
still be up-to-date and non-PCM flag may not have changed, so the new
channel map is not actually programmed into the HDA codec.

Notably, this failing case is also always triggered when the device is
already in a prepared state and a new channel map is configured while
changing only the channel positions (for example, plain
"speaker-test -c2 -m FR,FL").

Fix that by always programming the channel map in
hdmi_setup_audio_infoframe(). Tested on Intel HDMI.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-08 09:27:26 +02:00
Peter Ujfalusi
6b2afee11a ASoC: tlv320aic3x: Connect 'Left Line1R Mux' and 'Right Line1L Mux'
The two paths were not connected in the DAPM route causing the associated
routes to be non working and the following warnings printed in the logs:
tlv320aic3x-codec 0-001b: ASoC: mux Right Line1L Mux has no paths
tlv320aic3x-codec 0-001b: ASoC: mux Left Line1R Mux has no paths

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:59:05 +01:00
Lars-Peter Clausen
052901f42f ASoC: twl4030: Use virtual DAPM mixer controls
By using the new virtual DAPM mixer controls it is possible to remove the
twl4030 specific implementation of virtual controls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:49:32 +01:00
Lars-Peter Clausen
290c348ee5 ASoC: twl6040: Use virtual DAPM mixer controls
By using the new virtual DAPM mixer controls it is possible to remove the
twl6040 specific implementation of virtual controls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:47:20 +01:00
Mark Brown
9f9e4266a6 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-twl6040 2013-10-07 11:46:56 +01:00
Lars-Peter Clausen
249ce1387b ASoC: dapm: Add support for virtual mixer controls
This patch adds support for virtual DAPM mixer controls. They are similar to
virtual DAPM enums. There is no hardware register backing the control, so
changing the control's value wont have any direct effect on the hardware. But it
still influences the DAPM graph by causing the path it sits on to be connected
or disconnected. This in turn can cause power changes for some of the widgets on
the DAPM graph, which will then modify the hardware state.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:46:20 +01:00
Lars-Peter Clausen
da83fea612 ASoC: dapm: Ignore VMID widgets for target bias
VMID widgets behave very similar to signal generator widgets. Both are always
considered to be powered up. This means that we need to ignore the VMID widgets
in the same way as signal generator widgets when calculating the DAPM context's
target bias level. Otherwise the presence of a VMID widget, regardless whether
it is on an active path or not, will cause the DAPM context to be powered up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:33:41 +01:00
Philippe Rétornaz
5a6e19bedb ASoC: fsl: imx-ssi: fix probe on imx31
On imx31 with mc13783 codec the FIQ is not necessary and not enabled
as DMA transfer is available.
Change the probe() function to fail only if both FIQ and DMA are not
available.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:17:44 +01:00
David Henningsson
338cae565c ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470
On this machine, DAC on node 0x03 seems to give mono output.

Also, it needs additional patches for headset mic support.
It supports CTIA style headsets only.

Alsa-info available at the bug link below.

Cc: stable@kernel.org (v3.10+)
BugLink: https://bugs.launchpad.net/bugs/1236228
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-07 10:49:37 +02:00
Mark Brown
8e9c4aa4e7 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-fsl
Conflicts:
	sound/soc/fsl/fsl_ssi.c
2013-10-03 17:29:05 +01:00
Jarkko Nikula
2a577a7569 ASoC: omap: Fix incorrect ARM dependency
Commit b0e0a4d ("ASoC: omap: Enable COMPILE_TEST build for DT platforms")
added two incorrect CONFIG_ARCH_ARM dependencies making impossible to select
audio support for Nokia RX-51. Fix this by using correct CONFIG_ARM.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 17:01:05 +01:00
Philippe Rétornaz
1d73ad298d ASoC: fsl: Fix sound on mx31moboard
Commit 42810d (ASoC: imx-mc13783: Add audmux settings for mx27pdk) broke
the sound on mx31moboard. Restore back the audmux setting on such boards.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:58:56 +01:00
Guenter Roeck
db8d3af33f ASoC: fsl_ssi: Fix irq_of_parse_and_map() return value check
irq_of_parse_and_map() returns 0 on error, not NO_IRQ.

Fix the following xtensa:allmodconfig build error.

sound/soc/fsl/fsl_ssi.c:705:26: error: 'NO_IRQ' undeclared (first use in this function)
make[4]: *** [sound/soc/fsl/fsl_ssi.o] Error 1

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:57:54 +01:00
Daniel Mack
a85e419ede ASoC: davinci-mcasp: add support for suspend and resume
When the system returns from suspend, it looses its configuration. Most
of it is restored by running a normal audio stream startup, but the DAI
format is left unset as that's configured on the audio device creation.

Hence, it suffices here to care for the registers which are touched by
davinci_mcasp_set_dai_fmt() and restore them when the system is resumed.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:22:40 +01:00
Daniel Mack
25c84cc1ac ASoC: tas5086: add suspend callback
When going to suspend, shut down all channels and re-do the init
procedure at resume time.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:38 +01:00
Daniel Mack
d5fd3ccc2d ASoC: tas5086: move initialization code to own functions
We'll need to call code to initialize and reset the codec again at
resume time, so factor it out first.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:37 +01:00
Daniel Mack
648c538204 ASoC: tas5086: move two variables into private struct
We need to access the charge_period and start_mid_z values from other
places later, so move them to the private struct.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:36 +01:00
Daniel Mack
a9d14bc0b1 ALSA: snd-usb-usx2y: remove bogus frame checks
The frame check in i_usX2Y_urb_complete() and
i_usX2Y_usbpcm_urb_complete() is bogus and produces false positives as
described in this LAU thread:

  http://linuxaudio.org/mailarchive/lau/2013/5/20/200177

This patch removes the check code entirely.

Cc: fzu@wemgehoertderstaat.de
Reported-by: Dr Nicholas J Bailey <nicholas.bailey@glasgow.ac.uk>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-02 17:58:01 +02:00
Vladimir Murzin
e2c9917bfa ASoC: kirkwood: fix compilation warning in kirkwood_dma_open
writel() supposes the first argument of type unsigned int. This fix the
warning:

sound/soc/kirkwood/kirkwood-dma.c: In function 'kirkwood_dma_open':
sound/soc/kirkwood/kirkwood-dma.c:164:3: warning: large integer implicitly
truncated to unsigned type [-Woverflow]

Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-01 11:49:35 +01:00
Fabio Estevam
4fa8dbc18e ASoC: fsl: imx-sgtl5000: Add .remove back
Commit e8f00c1b01 (Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm)
fixed a conflict, but missed to add the .remove function back,which causes the
following build warning:

sound/soc/fsl/imx-sgtl5000.c:185:12: warning: 'imx_sgtl5000_remove' defined but not used [-Wunused-function]

Fix the warning by adding the .remove function back.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-01 11:47:38 +01:00
Jarkko Nikula
7cc302d231 ASoC: pcm: Remove extra spaces from dev_ prints
dev_ prints are already prefixed by ": " before format string so there is no
need for extra spaces.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:06:33 +01:00
Takashi Iwai
4a4370442c ALSA: hda - Fix GPIO for Acer Aspire 3830TG
Acer Aspire 3830TG seems requiring GPIO bit 0 as the primary mute
control.  When a machine is booted after Windows 8, the GPIO pin is
turned off and it results in the silent output.

This patch adds the manual fixup of GPIO bit 0 for this model.

Reported-by: Christopher <DIDI2002@web.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-30 12:18:36 +02:00
Ondrej Zary
dfc2cd7c28 ALSA: ac97: Add ID for TI TLV320AIC27 codec
Add 0x54584e03 ID for TI TLV320AIC27 AC'97 codec according to datasheet:
http://www.ti.com/lit/ds/slas253a/slas253a.pdf

The weird thing is that the chip is physically marked 320AD91.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-30 11:09:21 +02:00
Takashi Iwai
6ae405996c ASoC: Fixes for v3.12
Nothing too exciting here, all driver specific except for the fix from
 Liam for DPCM systems which have both front and back end DAIs which is
 not yet used by anything in mainline.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSRacdAAoJELSic+t+oim9jcQP/jhvJuQgo0B4di3vsRPNtlbN
 rKS/+0kiMxwOxiHQbqSop/AQJe4n55kDVeaX8b25oJCuXGdytiwDMT8Oa74OL+rJ
 kENXrHSV7/0YIhKvotEJW7vltIzRwZ6ArncVtxwPmdCkFFw3UAxOwk0lvTxE5S/M
 q2BOpShKGRLXIX3dIKH+NOgYSdqCt6Hk4KpJuCP6AVfJo2ctWK5aVwenyGnBL5tv
 kgQl2RywC4iRmp/DzdPnfHWhxFZsU9jVKYAQ/qqt2paOWVJ5hMW9CiT06ACjGZwU
 R+0uhgYEa3s9DpNvaUv6IS+khFGMHFkm5H2tYY3DUoIyzI3z5KbPJBKRTDFBgDrn
 JO72JyPxRQVZ889h3Chl3MUs3Pj+cHIPP7pb4TOIdoQStta60ykna5Q92RjVp+hM
 sugBrYIrx4EOGCo3Ae/GVCCA5zJ6aSAWZDc5UFAlr1CHodwF/msGXjkhjyG8tZpl
 flObWlwFxo6UXPKWSAnnuogwglsFoLpdrWHxWBq9iIeUO2snTPOnuQ7Nbjs54Clp
 f4b8gx2v3Iv5SKfXVsXLoHJVDmgs4qyhN42pHPLzUeXMHLmD3oyBdGi8hgXDsApz
 PtVqpRy2Ui/hy1QL0jP2jq/qeqcM7PkzOUrcoOFKGoL3wpRUYbq1x7j1aYeepNL3
 zHw2uE99IwlfS1vmwPc3
 =Oljt
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.12

Nothing too exciting here, all driver specific except for the fix from
Liam for DPCM systems which have both front and back end DAIs which is
not yet used by anything in mainline.
2013-09-30 10:49:45 +02:00
Mark Brown
267666ea3b Merge remote-tracking branch 'asoc/fix/max98095' into asoc-linus 2013-09-27 14:56:24 +01:00
Mark Brown
8516e6483b Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-09-27 14:56:23 +01:00
Mark Brown
aab5d23ef9 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2013-09-27 14:56:22 +01:00
Mark Brown
57754df746 Merge remote-tracking branch 'asoc/fix/bfin' into asoc-linus 2013-09-27 14:56:21 +01:00
Mark Brown
92396e78d3 Merge remote-tracking branch 'asoc/fix/ab8500' into asoc-linus 2013-09-27 14:56:20 +01:00
Mark Brown
448c3f6884 Merge remote-tracking branch 'asoc/fix/88pm860x' into asoc-linus 2013-09-27 14:56:19 +01:00
Lars-Peter Clausen
2560b3d1bd ASoC: adav80x: Convert to direct regmap usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:29:45 +01:00
Lars-Peter Clausen
729485f6ad ASoC: adau1373: Issue soft reset on probe
Reset the device on probe to make sure that the register settings match the
register cache defaults.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:41 +01:00
Lars-Peter Clausen
6fb04138a3 ASoC: adau1373: Remove ADAU1373_PLL_CTRL7 register definition
There is no such register.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:40 +01:00
Lars-Peter Clausen
c3df37c938 ASoC: adau1373: Convert to direct regmap usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:40 +01:00
Kailang Yang
1bb3e062d4 ALSA: hda - Enable internal mic on a Thinkpad machine with ALC283
More thorough testing showed that these verbs were necessary to
improve quality of the internal mic. Patch originally from Realtek.

BugLink: https://bugs.launchpad.net/bugs/1231931
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-27 14:10:52 +02:00
Kailang Yang
068fd3a081 ALSA: hda - Fix Internal Mic boost can't control with ALC283
ALC283 pin control for Line1 default control by hidden register.
Use line1 as internal Mic will not get sound when boost value up.
Set control by verb for hidden register will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-27 14:04:05 +02:00
Ben Whitten
b5bf0a929d ALSA: hda - Add fixup for MacBook Air 6,1 and 6,2 with CS4208 codec
This patch adds the default pin configuration and some init verbs for
setting COEFs, in addition to the correction of input pin AMP caps
for MacBook Air 6,1 and 6,2.  With these changes, the headphone jack
detection starts working properly.

[trivial space fixes by tiwai]

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60811
Signed-off-by: Ben Whitten <benwhitten@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-27 10:17:44 +02:00
Mark Brown
d6173df35f ASoC: si476x: Remove custom register I/O implementation
The current si476x I/O implementation wraps the regmap for the core with
functions that make the register map cache only when the device is powered
down. This implementation appears to be incomplete since there is no code
to synchronise the cache so writes done while the core is powered down
will be ignored, the device will only be configured if it is powered.

A better and more idiomatic approach would be to have the MFD manage the
cache, making the device cache only when it powers things down. This also
allows ASoC to use the standard regmap helpers for the device which helps
remove the ASoC custom ones so do convert to do that.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 19:38:28 +01:00
Mark Brown
e8f00c1b01 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm
Conflicts:
	sound/soc/fsl/imx-sgtl5000.c
2013-09-26 12:05:47 +01:00
Philipp Zabel
50d4a790e6 ASoC: imx-sgtl5000: Fix uninitialized pointer use in error path
This patch avoids to dereference the uninitialized data pointer if the
error path is entered before devm_kzalloc is called (or if the allocation
fails). It fixes the following warning:

    sound/soc/fsl/imx-sgtl5000.c: In function 'imx_sgtl5000_probe':
    sound/soc/fsl/imx-sgtl5000.c:175:18: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 12:01:32 +01:00
Philipp Zabel
a8b22c1ccc ASoC: imx-sgtl5000: do not use devres on a foreign device
Calling devm_clk_get with any device pointer other than our own confuses
devres. Use clk_get instead. This avoids hitting the following warning in
the imx-sgtl5000 error path:

imx-sgtl5000 sound.12: snd_soc_register_card failed (-517)
platform sound.12: Driver imx-sgtl5000 requests probe deferral
------------[ cut here ]------------
WARNING: CPU: 0 PID: 75 at drivers/base/dd.c:272 driver_probe_device+0x194/0x218()
Modules linked in: snd_soc_sgtl5000(+) snd_soc_imx_sgtl5000 coda snd_soc_imx_audmux imx_sdma snd_soc_fsl_spdif snd_soc_fsl_ssi
CPU: 0 PID: 75 Comm: udevd Not tainted 3.11.0-rc6+ #4682
Backtrace:
[<80010bc4>] (dump_backtrace+0x0/0x10c) from [<80010d60>] (show_stack+0x18/0x1c)
 r6:00000110 r5:00000009 r4:00000000 r3:00000000
[<80010d48>] (show_stack+0x0/0x1c) from [<804f0764>] (dump_stack+0x20/0x28)
[<804f0744>] (dump_stack+0x0/0x28) from [<8001a4a4>] (warn_slowpath_common+0x6c/0x8c)
[<8001a438>] (warn_slowpath_common+0x0/0x8c) from [<8001a4e8>] (warn_slowpath_null+0x24/0x2c)
 r8:7f032000 r7:7f02f93c r6:cf8eaa54 r5:cf8eaa20 r4:80728a0c
[<8001a4c4>] (warn_slowpath_null+0x0/0x2c) from [<80286bdc>] (driver_probe_device+0x194/0x218)
[<80286a48>] (driver_probe_device+0x0/0x218) from [<80286cf4>] (__driver_attach+0x94/0x98)
 r7:00000000 r6:cf8eaa54 r5:7f02f93c r4:cf8eaa20
[<80286c60>] (__driver_attach+0x0/0x98) from [<802851c8>] (bus_for_each_dev+0x5c/0x90)
 r6:80286c60 r5:7f02f93c r4:00000000 r3:cf8ef03c
[<8028516c>] (bus_for_each_dev+0x0/0x90) from [<80286654>] (driver_attach+0x24/0x28)
 r6:806d0424 r5:cf16a580 r4:7f02f93c
[<80286630>] (driver_attach+0x0/0x28) from [<802861e4>] (bus_add_driver+0xdc/0x234)
[<80286108>] (bus_add_driver+0x0/0x234) from [<802871d4>] (driver_register+0x80/0x154)
 r8:7f032000 r7:00000001 r6:7f02fa68 r5:7f02fa74 r4:7f02f93c
[<80287154>] (driver_register+0x0/0x154) from [<8033c278>] (i2c_register_driver+0x34/0xbc)
[<8033c244>] (i2c_register_driver+0x0/0xbc) from [<7f032018>] (sgtl5000_i2c_driver_init+0x18/0x24 [snd_soc_sgtl5000])
 r5:7f02fa74 r4:cfb7ff48
[<7f032000>] (sgtl5000_i2c_driver_init+0x0/0x24 [snd_soc_sgtl5000]) from [<80008738>] (do_one_initcall+0xf4/0x150)
[<80008644>] (do_one_initcall+0x0/0x150) from [<80053f64>] (load_module+0x174c/0x1db4)
[<80052818>] (load_module+0x0/0x1db4) from [<800546ac>] (SyS_init_module+0xe0/0xf4)
[<800545cc>] (SyS_init_module+0x0/0xf4) from [<8000e540>] (ret_fast_syscall+0x0/0x30)
 r6:00005b22 r5:00afed68 r4:00000000
---[ end trace b24c5c3bb145dbdd ]---

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 12:01:17 +01:00
Chen Gang
d60336e2f1 ASoC: fsl_ssi: let check zero instead of check NO_IRQ
NO_IRQ may be defined as '(unsigned int) -1' in some architectures
(arm, sh ...), and either may not be defined in some architectures
which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).

When irq_of_parse_and_map() fails, it will always return 0, so need
check zero instead of NO_IRQ, or will cause compiling issue or run
time bug in some architectures.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:28:52 +01:00
Andrew Morton
3a429eea10 ASoC: atmel-pcm: fix warning
i386 allmodconfig:

sound/soc/atmel/atmel-pcm.c: In function 'atmel_pcm_preallocate_dma_buffer':
sound/soc/atmel/atmel-pcm.c:52: warning: cast to pointer from integer of different size

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:24:51 +01:00
Jean-Francois Moine
ce3d060990 ASoc: kirkwood: Extend the min and max number of bytes per period
This patch extends the min and max number of bytes per period.
It mainly permits to reduce the sound delay in MIDI real-time playing.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:18:36 +01:00
Mark Brown
4d208ca429 ASoC: tlv320aic32x4: Convert to direct regmap API usage
This moves us towards being able to remove the duplicate register I/O
functionality in ASoC and saves some code.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 10:58:36 +01:00
Mark Brown
752b776435 ASoC: tlv320aic32x4: Move GPIO acquisition to I2C probe
This is more idiomatic and interacts better with deferred probe.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 10:58:35 +01:00
Mark Brown
83cbe35b87 ASoC: sn95031: Convert to regmap
This moves us towards being able to remove the duplicated register I/O
functionality in ASoC.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 10:55:42 +01:00
Mengdong Lin
f82d7d16ae ALSA : hda - not use assigned converters for all unused pins
BIOS can mark a pin as "no physical connection" if the port is used by an
integrated display which is not audio capable. And audio driver will overlook
such pins.

On Haswell, such a disconneted pin will keep muted and connected to the 1st
converter by default. But if the 1st convertor is assigned to a connected pin
for audio streaming. The muted disconnected pin can make the connected pin
no sound output.

So this patch avoids using assigned converters for all unused pins for Haswell,
including the disconected pins.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-26 10:22:49 +02:00
Liam Girdwood
b26d19e44a ALSA: compress: Make sure we trigger STOP before closing the stream.
Currently we assume that userspace will shut down the compressed stream
correctly. However, if userspcae dies (e.g. cplay & ctrl-C) we dont
stop the stream before freeing it.

This now checks that the stream is stopped before freeing.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-26 09:28:22 +02:00
Mark Brown
2d9215c1ec ASoC: mc13783: Use regmap directly from ASoC
As part of a push to remove the register I/O functionality from ASoC (since
it is now duplicated in the regmap API) convert the mc13783 driver to use
regmap directly.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25 13:54:23 +01:00
Mark Brown
fd792f8fbc mfd: mc13xxx: Move SPI erratum workaround into SPI I/O function
Move the workaround for double sending AUDIO_CODEC and AUDIO_DAC writes
into the SPI core, aiding refactoring to eliminate the ASoC custom I/O
functions and avoiding the extra writes for I2C.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-09-25 13:47:30 +01:00
Mark Brown
7fbdeb8090 ASoC: tlv320aic26: Convert to direct regmap API usage
This moves us towards being able to remove the duplicated register I/O
code in ASoC.

The datasheet and the driver document the device as having a register map
divided into pages but since the paging is actually done by sending the
page address and the register address with each transaction this is no
different to having a simple register address. The datasheet does also
document the low five bits of the 16 bit "command" as unused which we could
represent as padding but it seems simpler and less confusing to things
that use block transfers or autoincrement to represent these as part of
the register address.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25 13:30:59 +01:00
Mark Brown
5b0959d472 ASoC: tlv320aic26: Use snd_soc_update_bits()
Use snd_soc_update_bits() rather than open coding. Since the register cache
is currently only used where update_bits() is used this means the current
register cache can be removed entirely.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25 13:30:59 +01:00
Mark Brown
806955dd9c ASoC: tlv320aic26: Convert to table based control init
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-25 13:30:58 +01:00
Mark Brown
4aa11d67b6 ASoC: tlv320aic23: Convert to direct regmap API usage
This moves us towards being able to remove the duplicated register I/O
code in ASoC.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 20:38:04 +01:00
Kuninori Morimoto
55e5b6fd5a ASoC: rsnd: use regmap instead of original register mapping method
Current Linux kernel is supporting regmap/regmap_field,
and, it is good match for Renesas Sound Gen1/Gen2 register mapping.
This patch uses regmap instead of original method for register access

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:53:36 +01:00
Kuninori Morimoto
efeb970ee7 ASoC: rsnd: remove rsnd_priv_read/write/bset()
adg.c only used rsnd_priv_read/write/bset()
which is the only user of NULL mod.
but, it can be removed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:53:36 +01:00
Mark Brown
d33c33352b ASoC: cq93vc: Use regmap for I/O
Avoid use of the ASoC-specific register I/O functions by converting to
use the MMIO regmap provided the core MFD.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:40:12 +01:00
Mark Brown
1201939a6f ASoC: cq93vc: Use core I/O functions
Support future refactoring by using the core I/O functions rather than
calling the driver provided I/O functions directly.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:40:10 +01:00
Mark Brown
6f88063c14 ASoC: cq93vc: Use table based control registration
Saves a little code.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:40:09 +01:00
Mark Brown
068416620c ASoC: max9850: Convert to direct regmap API usage
This prepares for removal of the duplicated register I/O functionality in
ASoC.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:35:24 +01:00
Mark Brown
19ab2a7a24 ASoC: max98088: Set max_register
Makes some of the debug functions more useful.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:34:43 +01:00
Mark Brown
2a6fedec19 ASoC: tlv320aic3x: Convert to direct regmap API usage
This is slightly more complex than a standard regmap conversion due to
the moderately detailed cache control and the open coding of a register
patch for the class D speaker on the TLV320AIC3007.

Although the device supports paging this is not currently implemented as
the additional pages are only used during the application of the patch
for the TLV320AIC3007.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:59 +01:00
Mark Brown
2677b4bb73 ASoC: tlv320aic3x: Don't reference cache datastructure directly
Rather than referencing the cache directly read back the values we are
going to restore, supporting refactoring to use regmap.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:58 +01:00
Mark Brown
58a63fbd7c ASoC: tlv320aic3x: Move to table based DAPM init
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:57 +01:00
Mark Brown
f9df1ae6b5 ASoC: tlv320aic3x: Move to table based control init
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:56 +01:00
Mark Brown
6f818e04fc ASoC: tlv320aic3x: Move resource acquisition to I2C probe
This is more idiomatic and interacts better with deferred probing.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:55 +01:00
Mark Brown
a16bbe4d68 ASoC: tlv320aic3x: Remove nonsense comment for register cache
Every statement in this comment is incorrect either through bitrot or
(mostly) through never having corresponded to reality in the first place.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:32:54 +01:00
Mark Brown
b07c443fab ASoC: tlv320aic23: Convert to table based control init
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:31:17 +01:00
Mark Brown
2c142c61f7 ASoC: tlv320aic23: Remove #defines for I2C
The only control interface supported by this driver is I2C so there is no
need for conditional compilation around the control interface.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:31:16 +01:00
Mark Brown
14acbbbbc6 ASoC: max98095: Convert to direct regmap API usage
Saves code and moves us towards being able to remove the duplicate ASoC
level register I/O functionality.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:30:26 +01:00
Mark Brown
c6b3283f6d ASoC: max90895: Convert to table based control init
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:30:25 +01:00
Mark Brown
d36126ac56 ASoC: max98095: Remove custom hw_write() implementation
The registers that are being kept uncached are marked as volatile anyway
so the call has no practical impact.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 19:30:24 +01:00
Mark Brown
2245e3c31c ASoC: ab8500: Explicitly set I/O up
We do some I/O in probe so we need to ensure the I/O operations are fully
set up then.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 12:02:49 +01:00
Mark Brown
4127d5d59f ASoC: max98088: Convert to direct regmap API usage
This saves code and moves us towards removing the redundant register I/O
implementation in ASoC.

Tested-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:11:44 +01:00
Mark Brown
ad65adf4a3 ASoC: max98088: Use table based control init
Tested-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:11:41 +01:00
Mark Brown
356d86e248 ASoC: max98088: Fix indentation
Tested-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:11:31 +01:00
Kuninori Morimoto
d3be689e6a ASoC: rcar: remove unnecessary mach/clock.h
${LINUX}/sound/soc/sh driver can be compiled from
SuperH and ARM.
but, ${LINUX}/sound/soc/sh/rcar driver included
SH-ARM specific header.
This patch removes it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:07:36 +01:00
Fabio Estevam
64d2307c3b ASoC: fsl: fsl_ssi: Fix simultaneous capture and playback
When doing simultaneous capture and playback on a mx6 board we get the following
error:

$ arecord -f cd  | aplay -f cd
imx-sgtl5000 sound.13: set sample size in capture stream first
fsl-ssi-dai 2028000.ssi: ASoC: can't open interface 2028000.ssi: -11
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_
open) unable to open slave
aplay: main:660: audio open error: Device or resource busy
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

The 'arecord -f cd  | aplay -f cd' always trigger cause the
'if (!first_runtime->sample_bits)' block to be true which returns an error.

Adjust the logic inside fsl_ssi_startup(), so that we do not always hit the
error when playing  'arecord | aplay' line for the first time.

Reported-by: Chris Clepper <cgclepper@gmail.com>
Suggested-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:00:13 +01:00
Jean-Francois Moine
84aac6c79b ASoC: kirkwood: fix loss of external clock at probe time
At probe time, when the clock driver is not yet initialized, the
external clock of the kirkwood sound device will not be usable.

This patch fixes this problem defering the device probe.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-21 14:31:10 +01:00
Mark Brown
ff795d614b ASoC: ab8500: Convert register I/O to regmap
As part of a general push to eliminate the duplicated register I/O support
in ASoC convert ab8500 to use regmap.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
2013-09-20 17:42:53 +01:00
Mark Brown
51f20e4cd8 ASoC: ab8500: Use ASoC I/O functions
In preparation for moving away from implementing the ASoC level register
I/O functionality change direct calls to the ab8500 implementation of that
to use snd_soc_write()

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
2013-09-20 17:42:47 +01:00
Mark Brown
38bfd48b87 ASoC: ab8500: Downgrade noisy log message
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
2013-09-20 17:42:40 +01:00
Mark Brown
f9ded3b2e7 ASoC: 88pm860x: Use regmap for I/O
As part of a move to remove the duplication of regmap functionality in ASoC
convert the 88pm860x driver to use the regmap from the MFD. This means that
we no longer cache the registers so performance will be slightly reduced
on I/O operations.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20 10:40:51 +01:00
Mark Brown
fa129ebeba ASoC: 88pm60x: Don't use control data for i2c
In preparation for using the regmap directly in the CODEC driver replace
references to the I2C client using control_data with references to the
driver private data.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-20 10:40:50 +01:00
Liam Girdwood
4028b6c4c0 ALSA: compress: Fix compress device unregister.
snd_unregister_device() should return the device type and not stream
direction.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Vinod Koul <vinod.koul@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-19 18:40:00 +02:00
Sachin Kamat
9ff50721e4 ASoC: mmp-sspa: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:38 +01:00
Sachin Kamat
6c3cc302a4 ASoC: omap-mcpdm: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:38 +01:00
Sachin Kamat
fcd70eb50e ASoC: mxs-saif: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
256218ae65 ASoC: fsl_spdif: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
67a48b8181 ASoC: omap-twl4030: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
33c89c30af ASoC: mfld: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
eafbae2919 ASoC: imx-wm8962: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
ff27d9b3d6 ASoC: imx-spdif: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
01984a47e2 ASoC: imx-sgtl5000: Use devm_snd_soc_register_card
devm_snd_soc_register_card makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat
25db0dc880 ASoC: SPEAr spdif_out: Remove redundant variable
Return directly and remove the intermediate local variable.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 12:56:26 +01:00
Thierry Reding
32fcb97b9f ASoC: rt5640: Omit ACPI match table only if !ACPI
The ACPI_PTR() macro evaluates to NULL if ACPI is disabled and hence the
ACPI match table won't be used, causing the compiler to complain. Avoid
this by protecting the table using an #ifdef CONFIG_ACPI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 11:41:03 +01:00
Sachin Kamat
77aea71687 ASoC: SPEAr spdif_out: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-18 11:41:56 +01:00
Sachin Kamat
5fb7680bd0 ASoC: SPEAr spdif_in: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-18 11:41:33 +01:00
Jyri Sarha
bcf25567ec ASoC: davinci-evm: Move sysclk logic away from evm_hw_params
The sysclk rate does not change runtime so it should be initialized at
init time.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-18 10:53:24 +01:00
Kuninori Morimoto
072188b61c ASoC: rsnd: gen: rsnd_gen_ops cares .probe and .remove
Current rsnd_gen_ops didn't care about .probe and .remove
functions, but it was not good sense.
This patch tidyup it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:58:09 +01:00
Sachin Kamat
feb8f11476 ASoC: fsl_ssi: Remove redundant dev_set_drvdata
Driver core sets the driver data to NULL on detach.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:35:53 +01:00
Sachin Kamat
e19bcb6b95 ASoC: fsl_spdif: Remove redundant semicolon
Redundant semicolon at the end of brace is removed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:35:53 +01:00
Mark Brown
7d930ce26e Merge remote-tracking branch 'asoc/topic/component' into asoc-core
Conflicts:
	include/sound/soc.h
2013-09-17 13:25:28 +01:00
Kuninori Morimoto
cb47008766 ASoC: add .of_xlate_dai_name on snd_soc_component_driver
ASoC sound driver requires CPU/CODEC drivers for probing,
and each CPU/CODEC has some DAI on it.
Then, "dai name matching" have been used to identify
CPU-CODEC DAI pair on ASoC.

But, the "dai port number matching" is now required from DeviceTree.
The solution of this issue is to replace
the dai port number into dai name.
Now, CPU/CODEC are based on struct snd_soc_component,
and it can care above as common issue.

This patch adds .of_xlate_dai_name callback interface
on struct snd_soc_component_driver,
and snd_soc_of_get_dai_name() which is using .of_xlate_dai_name.

Then, #sound-dai-cells which enables DAI specifier is required
on CPU/CODEC device tree properties.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:07:13 +01:00
Kuninori Morimoto
d191bd8de8 ASoC: snd_soc_codec includes snd_soc_component
Codec includes component by this patch,
and component moved to upside of codec
to avoid extra declaration.
Codec dai will be registered via component
by this patch.

Current component register function
is used for cpu, and it is using
dai/dais functions properly to keep
existing cpu dai name.

And now, it will be used from codec also.
But codec driver had been used dais function only
even though it was single dai.
This patch adds new flag which can selects
dai/dais function on component register
function to keep existing codec dai name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:07:13 +01:00
Liam Girdwood
e54cf76ba2 ASoC: core: Add API for configuration of DAI BCLK ratio
Some codec drivers when running in slave mode require that BCLK to sample rate ratio
is explicitly set by the machine driver as it may not be exactly rate * frame size.

Extend the DAI API by adding :-

int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio);

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:57:37 +01:00
Sachin Kamat
0feb23d1bd ASoC: ak4642: Remove redundant break
'break' after return statement is redundant. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:53:09 +01:00
Mark Brown
d644a115e8 ASoC: samsung-i2s: Use devm_snd_soc_register_component()
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:51:05 +01:00
Mark Brown
9a8e0322f0 ASoC: smdk_wm8994: Use devm_snd_soc_unregister_card()
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:50:50 +01:00
Mark Brown
e3c51ca8fa Merge remote-tracking branch 'asoc/topic/devm' into asoc-samsung 2013-09-17 00:50:44 +01:00
Mark Brown
0e4ff5c806 ASoC: core: Add devm_snd_soc_register_card()
Simplify error handling and remove repetitive (and rarely executed) code
for unregistration by providing a devm_snd_soc_register() card.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-09-17 00:50:06 +01:00
Mark Brown
a0b03a616b ASoC: core: Implement devm_snd_soc_register_component()
Since with the wider use of devres many drivers are now only calling
snd_soc_unregister_component() in their remove functions providing a
managed version will save a reasonable amount of code.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:49:57 +01:00
Sachin Kamat
bf55141303 ASoC: twl6040: Remove redundant semicolon
Redundant semicolon removed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:47:56 +01:00
Valentin Ilie
4f8ec17377 ASoC: blackfin: Add missing break statement to bf6xx
SNDRV_PCM_FORMAT_S8 isn't supposed to fall through to SNDRV_PCM_FORMAT_S16_LE

Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:47:14 +01:00
Daniel Mack
193b2f65b8 ASoC: ak4104: provide a module device table
Provide a module device table for the SPI subsystem, so the driver can
be autoloaded by the SPI core.

While at it, get rid of an unnecessary #define.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:45:16 +01:00
Charles Keepax
49c60547da ASoC: arizona: Improve handling of setting REFCLK to 0
This patch suppresses calculation of REFCLK parameters when the REFCLK
source frequency is set to zero, additionally it will consider a source
frequency of zero as the REFCLK being disabled and switch to using the
SYNCCLK.

Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:43:57 +01:00
Charles Keepax
b3a6006e1d ASoC: bells: Add missing route to power up DSP clock
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:43:09 +01:00
Charles Keepax
a0ff6ea24f ASoC: samsung: Allow mono in i2s driver
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:42:16 +01:00
Mark Brown
b8cc4151f8 ASoC: wm8400: Use regmap for I/O
Since we no longer have a fake register to simulate we can use the
framework for I/O.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:41:39 +01:00
Mark Brown
37c83edf9a ASoC: wm8400: Use supplies to manage input power
Rather than using a fake register to manage input power create some supply
widgets and use those.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:41:39 +01:00
Liam Girdwood
02b80773de ASoC: rt5640: Add ACPI probing support.
Allow the RT5640 to be probed as an ACPI I2C device.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:40:55 +01:00
Liam Girdwood
9e9cb9b996 ASoC: rt5640: Provide more useful hw_params error reasons.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:40:55 +01:00
Sachin Kamat
89d051300b ASoC: rt5640: Staticize hp_amp_power_on
'hp_amp_power_on' is used only in this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:40:55 +01:00