Commit graph

5314 commits

Author SHA1 Message Date
Axel Lin 97a747117d ASoC: sta529: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
This checking is done by regmap_get_i2c_bus() which is called in
devm_regmap_init_i2c().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:35:28 +01:00
Mark Brown 6791142f41 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2015-06-22 11:19:45 +01:00
Mark Brown c99d49a8f8 Merge remote-tracking branch 'asoc/topic/wm8995' into asoc-next 2015-06-22 10:24:37 +01:00
Mark Brown e12be671ad Merge remote-tracking branches 'asoc/topic/wm8523' and 'asoc/topic/wm8741' into asoc-next 2015-06-22 10:24:36 +01:00
Mark Brown e39f6bc7de Merge remote-tracking branch 'asoc/topic/tas2552' into asoc-next 2015-06-22 10:24:35 +01:00
Mark Brown 71d8c2d783 Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rcar', 'asoc/topic/rt286' and 'asoc/topic/rt5640' into asoc-next 2015-06-22 10:24:33 +01:00
Mark Brown 861fe71725 Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/ml26124' and 'asoc/topic/omap' into asoc-next 2015-06-22 10:24:31 +01:00
Mark Brown dacdd36911 Merge remote-tracking branches 'asoc/topic/intel' and 'asoc/topic/max98090' into asoc-next 2015-06-22 10:24:30 +01:00
Mark Brown 95baa281a3 Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/atmel' into asoc-next 2015-06-22 10:24:28 +01:00
Mark Brown f79a9db83c Merge remote-tracking branch 'asoc/topic/rt5670' into asoc-next 2015-06-22 10:24:28 +01:00
Mark Brown 5445d62652 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next 2015-06-22 10:24:27 +01:00
Mark Brown 208a128f6b ASoC: Updates for v4.2
The big thing this release has been Liam's addition of topology support
 to the core.  We've also seen quite a bit of driver work and the
 continuation of Lars' refactoring for component support.
 
  - Support for loading ASoC topology maps from firmware, intended to be
    used to allow self-describing DSP firmware images to be built which
    can map controls added by the DSP to userspace without the kernel
    needing to know about individual DSP firmwares.
  - Lots of refactoring to avoid direct access to snd_soc_codec where
    it's not needed supporting future refactoring.
  - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
    TAS2552 drivers.
  - Support for TI TAS571x power amplifiers.
  - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
  - Support for x86 systems with RT5650 and Qualcomm Storm.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVddV1AAoJECTWi3JdVIfQQQsH/RG3lgOeot5jLWMsxJSKChEl
 KI+aaMcOw6Dj2LDccN8i6vUp8q44cKSXIc7lGLOzJW4K+OydCCGAvE+sJGyRE1dd
 yOHwcbvjJi4zFlt01RZchJ/Wa/S6zFucl5N9HxWsV4bEtfAA59IuhJLtospUlwsA
 mf9mpvSdeUAeh3lM2+AqAbXhTo6dYfD5ky5nrtpAkZjG8gqUG0u8Tpauja0lLcHi
 72/3EkzKR6KHaefyPw3LdN+/H/YK79uHCVcctZnQg5xUUymcO16ReoTxKwV9cnDb
 lBJ6wO8RpUAO9evoG2Yj/l4p+czDCm5VkHMq0nPklHVRh7s/2PwKfox1aw4Pumg=
 =wolq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.2' into asoc-next

ASoC: Updates for v4.2

The big thing this release has been Liam's addition of topology support
to the core.  We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.

 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares.
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring.
 - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
   TAS2552 drivers.
 - Support for TI TAS571x power amplifiers.
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
 - Support for x86 systems with RT5650 and Qualcomm Storm.

# gpg: Signature made Mon 08 Jun 2015 18:48:37 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2015-06-22 10:24:19 +01:00
Mark Brown d21504d4c9 Merge remote-tracking branches 'asoc/fix/wm8737', 'asoc/fix/wm8903', 'asoc/fix/wm8955' and 'asoc/fix/wm8960' into asoc-linus 2015-06-22 10:24:17 +01:00
Mark Brown 2cc5df6dae Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fmtbit', 'asoc/fix/intel', 'asoc/fix/max98925', 'asoc/fix/rcar' and 'asoc/fix/ux500' into asoc-linus 2015-06-22 10:24:15 +01:00
Mark Brown 84827ec6ee Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-06-22 10:24:15 +01:00
Richard Fitzgerald 336d0442b9 ASoC: wm_adsp: Move DSP Rate controls into the codec
The rate controls are codec-specific, it's not possible to
generically say what the range or the meaning of each control
is (or even if they exist at all) - that depends on the
particular codec.

This is currently being handled for Arizona codecs by putting
an Arizona-specific table of controls inside the wm_adsp driver.
This creates a dependency between wm_adsp and arizona.c, and is an
awkward solution if the ADSP is used in another family of codecs

Fix this by moving the Arizona-specific rate controls into the
Arizona codec drivers.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-19 11:17:23 +01:00
Mark Brown 89a6192049 Merge branches 'topic/adsp' and 'topic/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona 2015-06-19 11:17:19 +01:00
Axel Lin fcd9d310a5 ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case
Fix trivial typo.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-17 17:45:15 +01:00
Michele Curti 851b81e867 ASoC: rt5645: move RT5650 muxes to rt5650_specific_dapm_widgets
Developing a driver for an Asus X205TA laptop I get these dmesg
errors:

 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC1 Swap Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC2 Swap Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC3 Swap Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC1 L Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC1 R Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC2 L Mux has no paths
 rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC2 R Mux has no paths

so, move these muxes to the rt5650_specific_dapm_widgets[] list.

Signed-off-by: Michele Curti <michele.curti@gmail.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-15 20:10:01 +01:00
Mathias Krause 4e0ce6a4d5 ASoC: rt5670: Constify ACPI device ids and register defaults
Constify the ACPI device ID array and the register map, no need to have
them writable at runtime. Also drop the unneeded RT5670_INIT_REG_LEN
define.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-15 11:31:11 +01:00
Mathias Krause 8610d09a40 ASoC: max98090: Constify ACPI device ids and register defaults
Constify the ACPI device ID array and the register map, no need to have
them writable at runtime.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-15 11:18:55 +01:00
Mathias Krause b895dc2c47 ASoC: rt5640: Constify ACPI device ids and register defaults
Constify the ACPI device ID array and the register map, no need to have
them writable at runtime. Also drop the unneeded RT5640_INIT_REG_LEN
define.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-15 11:17:14 +01:00
Axel Lin b43fccf4b5 ASoC: ml26124: Remove duplicate code
Current code has duplicate code for 16000, 32000 and 48000 sample rates.
get_srate() returns negative error code for unsupported rate, so we can
remove the duplicate code in the swith cases by calling get_srate() first.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-15 11:05:43 +01:00
Julian Scheel ef5294fd25 ASoC: wm8523: Set bclk ratio for master mode
When running in master mode the bclk divider must be configured to generate a
sane bitclock. Pick the smallest fs multiplicator, which can hold all
transmitted bits.

Signed-off-by: Julian Scheel <julian@jusst.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-12 17:16:57 +01:00
Zidan Wang a077e81ec6 ASoC: wm8960: the enum of "DAC Polarity" should be wm8960_enum[1]
the enum of "DAC Polarity" should be wm8960_enum[1].

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-06-12 14:01:51 +01:00
Axel Lin 25c8888ad6 ASoC: rt5645: Use devm_gpiod_get_optional for hp-detect
Since hp-detect is optional, use devm_gpiod_get_optional instead.
In additional, it should return error if devm_gpiod_get_optional fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-12 11:52:29 +01:00
Oder Chiou 48edaa4b4f ASoC: rt5645: Add the device tree parser
Modify the RT5645 driver to parse platform data from device tree. This is
missing from previous patch in sound/soc/codecs/rt5645.c, that was present
in v3.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-12 11:30:07 +01:00
Oder Chiou bc08f96b5f ASoC: rt286: Add RL6347A class device shared support for RT286
The patch separates the IO function from the rt286. It is prepared to share
for new chips that support the same IO function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-12 11:18:53 +01:00
Axel Lin 8604bc2836 ASoC: tas2552: Use devm_gpiod_get_optional for enable-gpio
commit ea178d1456 ("ASoC: tas2552: Make the enable-gpio really optional")
makes enable-gpio optional. devm_gpiod_get_optional() is the better
function for optional gpio, so let's switch to use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-11 11:41:58 +01:00
Richard Fitzgerald f9f55e31f8 ASoC: wm_adsp: Add basic debugfs entries
This patch adds some debugfs nodes to get information
about the currently running firmware.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-11 11:39:39 +01:00
Richard Fitzgerald 218e508784 ASoC: wm_adsp: create ALSA controls from wm_adsp driver
Now that we have a codec_probe stage initialization in the wm_adsp
driver, we can make the wm_adsp driver create its own ALSA controls
instead of having that responsibility pushed to every codec driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-11 11:39:39 +01:00
Richard Fitzgerald f5e2ce92bd ASoC: wm_adsp: Add codec_probe and codec_remove stubs
Currently the only init function in wm_adsp is called by the
codec driver early in its probe before the codec has been
registered with SOC.

This patch adds stubs for the codec_probe and codec_remove stages
and calls them from WM5102 and WM5110 codec drivers. This allows us
to hang anything that needs setup during the codec probe stage off
these functions without further modification of the codec drivers.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-11 11:39:39 +01:00
Oder Chiou 0b0cefc8fd ASoC: rt5645: change gpio to gpiod APIs
Move gpio to gpio_desc and use gpiod APIs in codec driver.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-10 18:32:02 +01:00
Mark Brown 5ae4f63b50 ASoC: Updates for v4.2
The big thing this release has been Liam's addition of topology support
 to the core.  We've also seen quite a bit of driver work and the
 continuation of Lars' refactoring for component support.
 
  - Support for loading ASoC topology maps from firmware, intended to be
    used to allow self-describing DSP firmware images to be built which
    can map controls added by the DSP to userspace without the kernel
    needing to know about individual DSP firmwares.
  - Lots of refactoring to avoid direct access to snd_soc_codec where
    it's not needed supporting future refactoring.
  - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
    TAS2552 drivers.
  - Support for TI TAS571x power amplifiers.
  - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
  - Support for x86 systems with RT5650 and Qualcomm Storm.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVddV1AAoJECTWi3JdVIfQQQsH/RG3lgOeot5jLWMsxJSKChEl
 KI+aaMcOw6Dj2LDccN8i6vUp8q44cKSXIc7lGLOzJW4K+OydCCGAvE+sJGyRE1dd
 yOHwcbvjJi4zFlt01RZchJ/Wa/S6zFucl5N9HxWsV4bEtfAA59IuhJLtospUlwsA
 mf9mpvSdeUAeh3lM2+AqAbXhTo6dYfD5ky5nrtpAkZjG8gqUG0u8Tpauja0lLcHi
 72/3EkzKR6KHaefyPw3LdN+/H/YK79uHCVcctZnQg5xUUymcO16ReoTxKwV9cnDb
 lBJ6wO8RpUAO9evoG2Yj/l4p+czDCm5VkHMq0nPklHVRh7s/2PwKfox1aw4Pumg=
 =wolq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.2' into asoc-rt5645

ASoC: Updates for v4.2

The big thing this release has been Liam's addition of topology support
to the core.  We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.

 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares.
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring.
 - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
   TAS2552 drivers.
 - Support for TI TAS571x power amplifiers.
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
 - Support for x86 systems with RT5650 and Qualcomm Storm.
2015-06-10 18:31:55 +01:00
Oder Chiou 1fcb76dbd1 ASoC: rt5645: make RT5650_TDM_CTRL_4 readable
Register RT5650_TDM_CTRL_4(0x7A) is readable and used for mixer
setting. It should be added in rt5645_readable_register function.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-10 18:30:44 +01:00
Nicolas Boichat 22f5d9f821 ASoC: rt5645: Lock mutex in rt5645_enable_push_button_irq
rt5645_enable_push_button_irq uses snd_soc_dapm_*_unlocked
functions, so it needs to lock the required dapm mutex.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-10 18:30:13 +01:00
Sergej Sawazki e369bd006f ASoC: wm8741: Allow master clock switching
The set of supported sample rates depends on the master clock supplied
to the codec. Allow the machine driver to set the required master clock
in hw_params().

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:59:45 +01:00
Peter Ujfalusi b94525bfda ASoC: tas2552: Use consistent name for 'struct tas2552_data'
In tas2552_sw_shutdown() tas_data is used while the rest of the driver uses
tas2552 when dealing with the 'struct tas2552_data'

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:19 +01:00
Peter Ujfalusi 30f40bf6f3 ASoC: tas2552: Remove unneeded semicolon
Double semicolon was added by the following commit:
ea178d1456 ASoC: tas2552: Make the enable-gpio really optional

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:19 +01:00
Peter Ujfalusi 4785ed89f2 ASoC: tas2552: Call pm_runtime_disable when the module is removed
The module can not be loaded again after it has been removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Peter Ujfalusi 4afdd89df0 ASoC: tas2552: Code, define alignment changes for uniformity
Align the numbers in the header file to the same column.
At the same time change the wrapping of CFG_2 register write in the probe
function to be uniform with the other calls.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Peter Ujfalusi 2a9dd1db70 ASoC: tas2552: Correct Boost Auto-Pass Through Control register usage
Correct the bit definition so the code will change the bits what it
supposed to change. Also rename the register define to
TAS2552_BOOST_APT_CTRL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Peter Ujfalusi b2822f191a ASoC: tas2552: Correct Output Data register usage
Do not write to DOUT Tristate register at probe time, specially not write
data which is defined to be used in Output Data Register.
Fix the defines for the Output Data Register and correct the register write
at probe time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Peter Ujfalusi 2962cb5217 ASoC: tas2552: Add control for selecting DIN source
'DIN source' enum can be used to select the DIN Source (muted, left, right
or average of left and right channels).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Peter Ujfalusi 1014f7eff9 ASoC: tas2552: Correct the PLL configuration
Do not restrict the sampling rate to 44.1/48KHz. The pll_clk clock should
be (sampling rate * 512) in all cases.
Correct the J.D calculation (the D part was incorrectly calculated).
Restore PLL enable status after we are done with the configuration.
Implement hardware constraint handling towards the pll_clkin:
if D != 0 (in J.D) then 1.1MHz <= pll_clkin <= 9.2MHz needs to be checked.
If the PLL setup does not met with this constraint, fall back to BCLK as
reference clock, if BCLK fails, use the internal 1.8MHz clock.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-08 18:53:18 +01:00
Mark Brown 11e688862c Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc/topic/zx' into asoc-next 2015-06-05 18:55:07 +01:00
Mark Brown 28bedc5946 Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/twl6040', 'asoc/topic/wm5100', 'asoc/topic/wm8741' and 'asoc/topic/wm8960' into asoc-next 2015-06-05 18:55:05 +01:00
Mark Brown b5a8342c1d Merge remote-tracking branches 'asoc/topic/sta350', 'asoc/topic/tas2552', 'asoc/topic/tas3a227e' and 'asoc/topic/tas571x' into asoc-next 2015-06-05 18:55:03 +01:00
Mark Brown 19726b0ed5 Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/ssm4567' and 'asoc/topic/sta32x' into asoc-next 2015-06-05 18:55:01 +01:00
Mark Brown cee77be0ad Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next 2015-06-05 18:54:59 +01:00