Commit Graph

199565 Commits

Author SHA1 Message Date
Mark Brown d947837410 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-17 19:45:43 +01:00
Mark Brown 3c0709396d ASoC: Remove duplicate AUX definition from WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2010-07-17 19:44:40 +01:00
Mark Brown 5164d74d74 ASoC: Handle read failures in codec_reg
When a device is powered down volatile registers can't be read so
attempts to display codec_reg will show error values, and obviously
it is also possible for there to be hardware errors too. Check for
errors from reads and display them more clearly when formatting
codec_reg.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-14 20:13:09 +01:00
Mark Brown 03b0dc02cf Merge branch 'for-2.6.35' into for-2.6.36 2010-07-14 20:12:57 +01:00
Axel Lin cecb66fddf ASoC:: remove a redundant snd_soc_unregister_codec call in wm8988_register
snd_soc_unregister_codec is called twice if snd_soc_register_dai fail.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:31 +01:00
Axel Lin c555b028f1 ASoC: wm8727: add a missing return in wm8727_platform_probe
otherwise the error path will always be executed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-14 20:12:18 +01:00
Manuel Lauss 0c74a939d8 ASoC: au1x: fix section mismatch in psc-i2s.c
Annotate platform probe callback with __devinit instead of plain __init.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:39:14 +01:00
arnaud.patard@rtp-net.org b424ec9533 ASoC: kirkwood-i2s: Handle mute/unmute playback/record
The controller has mute/unmute capability and some bootloader may mute
them at boot. If it's not handled, all things will seem to be working
but no sound will come out of the speaker/headphone.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:37:09 +01:00
arnaud.patard@rtp-net.org dfe4c93627 ASoC: Fix kirkwood i2s mono playback
Kirkwood controller needs to be informed if the audio stream is mono
or not. Failing to do so will result in playing at the wrong speed.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:37:09 +01:00
Kuninori Morimoto ccad7b44cc ASoC: fsi: Fixup for master mode
This patch add hw_params to snd_soc_dai_ops,
because board specific set_rate is needed
when FSI was used as master mode.

This patch remove fsi_clk_ctrl from fsi_dai_startup,
because clock should be disabled before set_rate.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:39 +01:00
Kuninori Morimoto d78541473d ASoC: fsi: Add pr_err for noticing unsupported access
This patch didn't use dev_err,
because it is difficult to get struct device here.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:38 +01:00
Kuninori Morimoto 73b92c1fc0 ASoC: fsi: Change struct fsi_regs to fsi_core
Many registers which were grouped by category were added in FSI2.
To make easy to switch FSI/FSI2, fsi_core was added instead of fsi_regs.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:37 +01:00
Kuninori Morimoto a7ffb52bb3 ASoC: fsi: remove noisy CR_FMT macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:36 +01:00
Kuninori Morimoto a09370cb8c ASoC: fsi: remove un-used variable on fsi_dai_startup
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:35 +01:00
Kuninori Morimoto 095687c48b ASoC: fsi: modify format area definition on flags
There is no necessity that each bit in this area has the meaning.
This patch modify it to sequence number

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:35:35 +01:00
Joe Perches 4726a57b8c ASoC: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:34:06 +01:00
Joe Perches 8ff23610a6 ASoC: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:33:59 +01:00
Mark Brown 4d53952a39 Merge branch 'for-2.6.35' into for-2.6.36 2010-07-13 12:29:10 +01:00
Kuninori Morimoto 637727838a ASoC: fsi: fixup wrong value setting order of TDM
channel size should be set before setting register value

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:26:26 +01:00
Kuninori Morimoto b427b44cc8 ASoC: fsi: fixup clock inversion operation
Clock inversion should be specified by each flags bit.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-13 12:26:26 +01:00
Mark Brown 66b47fdb85 ASoC: Implement WM8994 OPCLK support
The WM8994 can output a clock derived from its internal SYSCLK, called
OPCLK.  The rate can be selected as a sysclk, with a division from the
SYSCLK rate specified (multiplied by 10 since a division of 5.5 is
supported) and the clock can be disabled by specifying a divisor of
zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 08:50:12 +09:00
Mark Brown e88ff1e6db ASoC: Include WM8994 GPIO and interrupt registers in codec_reg
Very handy for debug.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-09 01:37:06 +09:00
Raffaele Recalcati d9823ed9fa ASoC: DaVinci: More accurate continuous serial clock for McBSP (I2S)
i2s_accurate_sck switch can be used to have a better approximate
    sampling frequency.
    The clock is an externally visible bit clock and it is named
    i2s continuous serial clock (I2S_SCK).
    The trade off is between more accurate clock (fast clock)
    and less accurate clock (slow clock).
    The waveform will be not symmetric.
    Probably it is possible to get a better algorithm for calculating
    the divider, trying to keep a slower clock as possible.

    This patch has been developed against the
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm, but using
    uda1345 as external audio codec).

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:07 +09:00
Raffaele Recalcati ec63755337 ASoC: DaVinci: Added selection of clk input pin for McBSP
When McBSP peripheral gets the clock from an external pin,
    there are three possible chooses, MCBSP_CLKX, MCBSP_CLKR
    and MCBSP_CLKS.
    evm-dm365 uses MCBSP_CLKR, instead in bmx board I have a different
    hardware connection and I use MCBSP_CLKS, so I have added
    this possibility.

    This patch has been developed against the:
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm)

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Raffaele Recalcati a4c8ea2dda ASoC: DaVinci: Added two clocking possibilities to McBSP (I2S)
Added two clocking options for dm365 McBSP peripheral when used
    with I2S timings, that are SND_SOC_DAIFMT_CBS_CFS (the cpu generates
    clock and frame sync) and SND_SOC_DAIFMT_CBS_CFM (the cpu gets clock
    from external pin and generates frame sync).
    A slave clock management can be important when the external codec needs
    the system clock and the bit clock synchronized (tested with uda1345).
    This patch has been developed against the:
        http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
    git tree and has been tested on bmx board (similar to dm365 evm, but using
    uda1345 as external audio codec).

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Maurus Cuelenaere 088fbab406 ASoC: Invert speaker enabling behaviour in SmartQ sound driver
The speaker was enabled when the headphone was plugged in, which isn't the
wanted behaviour so correct this.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-06 23:54:06 +09:00
Mark Brown db059c0f6e ASoC: Automatically manage ALC coefficients for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-06 08:46:10 +09:00
Mark Brown afd6d36a0d ASoC: Automatically manage DAC deemphasis rate for WM8960
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:41:18 +09:00
Mark Brown 4faaa8d968 ASoC: Remove current WM8960 deemphasis control
It will be replaced with automatic deemphasis rate configuration but since
we have an enumeration table in this driver this is done in a separate
commit to make the renumbering of the enumeration items clear.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:37:17 +09:00
Mark Brown 9af8381023 ASoC: Fix sorting of Makefile and Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-07-05 23:35:29 +09:00
Maurus Cuelenaere ce93a37028 ASoC: Add SmartQ sound driver
This adds sound support for the SmartQ board.

The hardware consists of a S3C6410 coupled with a WM8987 over I²S. The WM8750
driver is used for driving the WM8987, as they are register compatible.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-04 18:04:12 +09:00
Maurus Cuelenaere 0d9c15e45b ASoC: codec: Add WM8987 device id to WM8750 driver
The WM8987 codec is register compatible with the WM8750, so just add it to the
SPI and I²C device table.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-04 18:02:07 +09:00
Kuninori Morimoto a300de3cff ASoC: ak4642: Add Digital Playback Volume control
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-07-01 17:08:47 +01:00
Vladimir Zapolskiy 338de9d9da ASoC: uda134x: correct bias level setup for codecs family
For UDA1341 codec power control is managed in STATUS1 register, and
for all other codecs in DATA011 register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Vladimir Zapolskiy ed632ad3b8 ASoC: uda134x: add DATA011 register found in codecs family
In UDA1340, UDA1344 and UDA1345 codecs there is one more functional
register in part of DATA0 tranfser. For UDA1341 this register
coincides with EA register.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-30 14:46:56 +01:00
Mark Brown af51b5c0f0 Merge remote branch 'takashi/topic/asoc' into for-2.6.36 2010-06-30 14:46:53 +01:00
Eric Bénard 9c1be7e8cb ASoC: clean i.MX Kconfig
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:30:48 +01:00
Vladimir Zapolskiy e4295b40ee ASoC: uda134x: fix bias level setup on initialization
On initialization ADC/DAC are enabled only for UDA1341, that's why
bias_level shall be set to off explicitly, otherwise dapm is
misinformed about bias_level on startup.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:02 +01:00
Vladimir Zapolskiy cc3202f5da ASoC: uda134x: replace a macro with a value in platform struct.
This change wipes out a hardcoded macro, which enables codec bias
level control. Now is_powered_on_standby value shall be used instead.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-25 12:29:01 +01:00
Takashi Iwai e827e32efc Merge branch 'for-2.6.36' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-06-24 11:11:41 +02:00
Jarkko Nikula 8c523115ae ASoC: RX-51: Add basic jack detection
This patch adds GPIO jack detection to Nokia N900/RX-51. At the moment only
SND_JACK_VIDEOOUT type is reported. More types could be reported after
getting more audio features supported and necessary drivers integrated for
implementing automated accessory detection.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:14 +01:00
Jarkko Nikula 4eb5470326 ASoC: RX-51: Add Jack Function kcontrol
Nokia RX-51/N900 has multifunction 4-pole audio-video jack that can be used
as headphone, headset or audio-video connector. This patch implements the
control 'Jack Function' which is used to select the desired function.
At the moment only TV-out without audio is supported.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:08 +01:00
Eric Bénard 3d5a451623 codecs/tlv320aic23: fix bias management for suspend/resume
in tlv320aic23_set_bias_level, for the case SND_SOC_BIAS_ON, the
comment says "vref/mid, osc on, dac unmute" but the code doesn't
clear the corresponding bits, thus when resuming, several bits are
not cleared preventing the codec from working.

in tlv320aic23_suspend, clearing the active register is not needed
as it will be done by tlv320aic23_set_bias_level, when setting
bias to SND_SOC_BIAS_OFF

Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: broonie@opensource.wolfsonmicro.com
Cc: anuj.aggarwal@ti.com
Cc: lrg@slimlogic.co.uk
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:28:53 +01:00
Lars-Peter Clausen 5898dd9ebd ASoC: JZ4740: Add qi_lb60 board driver
This patch adds ASoC support for the qi_lb60 board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:10:57 +01:00
Lars-Peter Clausen 3b097d64ea ASoC: Add JZ4740 codec driver
This patch adds support for the JZ4740 internal codec.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:10:45 +01:00
Lars-Peter Clausen 11bd3dd1b7 ASoC: Add JZ4740 ASoC support
This patch adds ASoC support for JZ4740 SoCs I2S module.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-23 00:08:06 +01:00
Grazvydas Ignotas 4b94dba029 ASoC: pandora: fix CLKX polarity
After mass production started it was found that several boards exhibit
noise problems during sound playback. After some investigation it was
determined that CLKX polarity is set incorrectly, and even if most boards
can tolerate the wrong setting, there are some that don't.

Fix polarity setup in the board file. As the clock settings for input and
output now match, merge in and out functions and structures to simplify
code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-21 18:16:17 +01:00
Mark Brown b45416656f ASoC: Fix sorting of DA7210 entries in Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-20 14:05:46 +01:00
Stuart Longland 20630c7f59 ASoC: Fix overflow bug in SOC_DOUBLE_R_SX_TLV
When SX_TLV widgets are read, if the gain is set to a value below 0dB,
the mixer control is erroniously read as being at maximum volume.

The value read out of the CODEC register is never sign-extended, and
when the minimum value is subtracted (read; added, since the minimum is
negative) the result is a number greater than the maximum allowed value
for the control, and hence it saturates.

Solution: Mask the result so that it "wraps around", emulating
sign-extension.

Signed-off-by: Stuart Longland <redhatter@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-19 02:33:44 +01:00
Eric Bénard 43793207fd ASoC: eukrea-tlv320: add support for our i.MX25 board
* tdm slot has to be configured to get sound working on i.MX25

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-18 01:56:45 +01:00