1
0
Fork 0
Commit Graph

17575 Commits (217f4433fc2fe768a7f13f7e5586333bb8280e9e)

Author SHA1 Message Date
Linus Torvalds ac26663572 MFD changes due for the v3.14 merge window
New drivers
  - Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and Battery Charger
  - TI/National Semiconductor LP3943 I2C GPIO Expander and PWM Generator
 
 Existing driver adaptions
  - Expansion of Wolfson Arizona DSP and High-Pass filter controls
  - TI TWL6040 default Regmap support and Regcache addition/bypass
  - Some nice Smatch catch fixes
  - Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
  - ChromeOS EC timing (delay) adaptions and added dependency on OF
  - Many constifications of 'struct {mfd_cell,regmap_irq,et. al}'
  - Watchdog support added for NVIDIA AS3722
  - Convert functions to static in TI AM335x
  - Realigned previously defeated functionality in TI AM335x
  - IIO ADC-TSC concurrency dead-lock/timeout resolution
  - Addition of Power Management and Clock support for Samsung core
  - DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
  - Greater use of irqdomain functionality in ST-E AB8500
  - Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
  - Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
  - Device Tree documentation added for TI/Nat Semi LP3943
  - Version detection and voltage tables for TI TPS6586x PMIC devices
  - Simplification of Freescale MC13XXX (de-)initialisation routines
  - Clean-up and simplification of the Realtek parent driver
  - Added support for RTL8402 Realtek PCI-Express card reader
  - Resource leak fix for Maxim 77686
  - Possible suspend BUG() fix in OMAP USB TLL
  - Support for new Wolfson WM5110 Revision (D)
  - Testing of automatic assignment of of_node in mfd_add_device()
    - Reversion of the above when it started to cause issues
  - Remove legacy Platform Data from;
               TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
  - Clean-ups; tabbing issues, function name changes, 'drvdata = NULL' removal,
               unused uninitialised warning mitigation, error message clarity,
               removal of redundant/duplicate checks, licensing (GPL -> GPL2),
               coding consistency, duplicate function declaration, ret checks,
               commit corrections, redundant of_match_ptr() helper removal,
               spelling, #if-deffery removal and header guards name changes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIbBAABAgAGBQJS3pLGAAoJEFGvii+H/HdhmkkP93Hrd9FBjVpmUQcOrghFDd//
 vte2LVDovXDcwm7i+BdZNG3+2aWtliTQXIw8PaAziUTwMlDNtT2B6GBFnIff4aXB
 Em/Oh6Je7r1gom1gMPCuefRrInTk0xEXy9Oazp4Hn4in71T+8PHNlEHdxEojakEm
 H5FnjAfgISEsA5twSyO9efVLNqPd3UQqg3O571oKwfuSED70YSCW2Yyaoiz4pnE5
 0WwZ9cel+sP7CIuyuR4TumUSDeBIAnYnZWqjqXZ1ueMWcm2RNVqeFrt/w0uoZjOA
 yBg8ZMfkBcePd6qnifqVqagRW/jW1bxmUeIHkp0bWeMqWN6Yyypitz8ZW+Qi7Swa
 OcmgM9V7OW1WG9FF7HoLbYHIPzmBb6duGtcCfAir4m8HJjyPfTuJpOshBW1F3+VG
 yEf5a1fj2NO34kvIbLec2f7MveIMmZxzWaoOx+ET9/WPknilifgyp7eDH24pQwI4
 5Lo5Z5uAfBCT3roOzHxCLl2nVXQoC66iTwdnneiEOn4rB/ApjfGVvGGd0VT6TD+g
 z3RqxpTdkd0AtjfeF778uTDBEKu7HZkqmlBP8HKWCBEAzqcKg7BpjYw0ajgmVwKr
 QiuBuWcEZ/2vVt8Qot7y5Vx89Q4AQwOqc24SldtQLu46iPAuKt+GizzHRw3IxBiQ
 VU9Aq/VoaTHBLS91tDE=
 =PuTE
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd

Pull MFD changes from Lee Jones:
 "New drivers
   - Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and
     Battery Charger
   - TI/National Semiconductor LP3943 I2C GPIO Expander and PWM
     Generator

  Existing driver adaptions
   - Expansion of Wolfson Arizona DSP and High-Pass filter controls
   - TI TWL6040 default Regmap support and Regcache addition/bypass
   - Some nice Smatch catch fixes
   - Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
   - ChromeOS EC timing (delay) adaptions and added dependency on OF
   - Many constifications of 'struct {mfd_cell,regmap_irq,et.al}'
   - Watchdog support added for NVIDIA AS3722
   - Convert functions to static in TI AM335x
   - Realigned previously defeated functionality in TI AM335x
   - IIO ADC-TSC concurrency dead-lock/timeout resolution
   - Addition of Power Management and Clock support for Samsung core
   - DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
   - Greater use of irqdomain functionality in ST-E AB8500
   - Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
   - Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
   - Device Tree documentation added for TI/Nat Semi LP3943
   - Version detection and voltage tables for TI TPS6586x PMIC devices
   - Simplification of Freescale MC13XXX (de-)initialisation routines
   - Clean-up and simplification of the Realtek parent driver
   - Added support for RTL8402 Realtek PCI-Express card reader
   - Resource leak fix for Maxim 77686
   - Possible suspend BUG() fix in OMAP USB TLL
   - Support for new Wolfson WM5110 Revision (D)
   - Testing of automatic assignment of of_node in mfd_add_device()
   - Reversion of the above when it started to cause issues
   - Remove legacy Platform Data from;
              TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
   - Clean-ups; tabbing issues, function name changes, 'drvdata = NULL'
              removal, unused uninitialised warning mitigation, error
              message clarity, removal of redundant/duplicate checks,
              licensing (GPL -> GPL2), coding consistency, duplicate
              function declaration, ret checks, commit corrections,
              redundant of_match_ptr() helper removal, spelling,
              #if-deffery removal and header guards name changes"

* tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd: (78 commits)
  mfd: wm5110: Add register patch for rev D chip
  mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()
  gpio: lp3943: Remove redundant of_match_ptr helper
  mfd: sta2x11-mfd: Use named constants for pci_power_t values
  Documentation: mfd: Fix LDO index in s2mps11.txt
  mfd: Cleanup mfd-mcp-sa11x0.h header
  mfd: max8997: Use "IS_ENABLED(CONFIG_OF)" for DT code.
  mfd: twl6030: Fix endianness problem in IRQ handler
  mfd: sec-core: Add cells for S5M8767-clocks
  mfd: max14577: Remove redundant of_match_ptr helper
  mfd: twl6040: Fix sparse non static symbol warning
  mfd: Revert "mfd: Always assign of_node in mfd_add_device()"
  mfd: rtsx: Fix sparse non static symbol warning
  mfd: max77693: Set proper maximum register for MUIC regmap
  mfd: max77686: Fix regmap resource leak on driver remove
  mfd: Represent correct filenames in file headers
  mfd: rtsx: Add support for card reader rtl8402
  mfd: rtsx: Add set pull control macro and simplify rtl8411
  mfd: max8997: Enforce mfd_add_devices() return value check
  mfd: mc13xxx: Simplify probe() & remove()
  ...
2014-01-21 10:58:17 -08:00
Fabio Estevam efe2ab9b02 ASoC: fsl_ssi: Do not print 'baud clock' error message all the time
Currently everytime we get the following message on boot:

fsl-ssi-dai 202c000.ssi: could not get baud clock: -2

This is not really useful information to get on every boot, so make it a debug
message instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:35 +00:00
Fabio Estevam ae1f8ce192 ASoC: fsl_ssi: We do support master mode now
Since commit aafa85e71a (ASoC: fsl_ssi: Add DAI master mode support for SSI on
i.MX series) master mode is supported, so update the comments and code to
reflect that.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:00 +00:00
Charles Keepax 3435479243 ASoC: wm5110: Extend SYSCLK patch file for rev D
Latest evaluation of the the device has given some patch file additions
for improved performance.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-01-21 17:44:05 +00:00
Mark Brown a23544a6cc ASoC: omap: Make RX51 depend on GPIOLIB due to jack usage
Since the GPIO jacks are only supported if gpiolib is built and fail to
compile otherwise add a build depedency.  This is unlikely to have any
practical impact outside of coverage testing.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2014-01-21 11:47:06 +00:00
Alexander Shiyan e5a3da2143 mfd: mc13xxx: Remove useless symbol MFD_MC13783
Symbol MFD_MC13783 always selected by MFD_MC13XXX, so no need
to keep additional symbol.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:09 +00:00
Lee Jones 6eb37eb276 Immutable branch for ASoC, as requested by Mark Brown
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSjfuVAAoJEFGvii+H/HdhOYsP/2lrz6GLYBgQFp9H+6t95+8H
 KvFmefaM5pjoBdnq6Q7pZBxYO4m15J3TaFNzH+Ib6oWJlg/awpu1Qwu5+Pwwv9RK
 6x4mEyy9yDu2CJd+6wpBFxx1Ujj4CdAq5dm/bUMiCr0d4Ez2qZhxdiDPGB02QHv7
 J7KkJBnG0PSiV4uoiLh8pOQsCF+v5y1l0rUaI3ZG+7x2QAi9I3liZGBI02BVvXsh
 /0aYWc8xQUar1JurPNVN4I6cojyKp5oyq4SHkpdbkk3Yt7ek1aNoPMG6ORqvaEMn
 5WF7LISpFF1NrHifW5SUdnbx5dxOnZyKRRgEWcP1TMZEmSJ4mdYFbqgMIJCJuRCN
 k23mVQEcQYy+1V8CuymhMuIB4SBiNYLpbJ7bvQ/Q5N34yuVl9eqPxshcVgAUhFkc
 8+vZj+/be+lpxw4zhIrAS0IlEVjUvMs8/B/kmCfcKPID5zPLUWPVbxGRSPMDEpzS
 liR7uw94/LHUiW3JD7I1x2MchjK7sH55p22hZJFhqUcU0LjcFfY0+3mz0ljAuPZt
 BZrt1O3yW987m6WXVZmJDI10h0feh1K8TlpnnL3ppWO4cKsgoB7wruYxQtptVyZR
 wzN0rq6UyianNMIGHWYgHQ7ye8wzeazMZWTQLl8AblIJ3xXozsmLScKBHJGXgeKh
 jafyhkX8wFiEoEMGWW5G
 =IhEz
 -----END PGP SIGNATURE-----

Merge tag 'tags/ib-asoc-1' into for-mfd-next

Immutable branch for ASoC, as requested by Mark Brown
2014-01-21 08:23:16 +00:00
Mark Brown ac6d7c48e3 Merge remote-tracking branch 'asoc/topic/compress' into asoc-next 2014-01-20 11:50:41 +00:00
Mark Brown 31824e6554 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2014-01-20 11:50:41 +00:00
Mark Brown 4cfa1a385f Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2014-01-20 11:50:40 +00:00
Arun Shamanna Lakshmi bd23c5b661 ASoC: dapm: Fix double prefix addition
The prefix for the codec driver can be used during dual identical
codec usecases. However, dapm adds prefix twice for codec DAI widget
in snd_soc_dapm_add_route API.

This change is to avoid double prefix addition for codec DAI widget
and is needed while using identical dual codecs.

Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 18:56:39 +00:00
Liam Girdwood 2a99ef0fdb ASoC: compress: Add suport for DPCM into compressed audio
Currently compressed audio streams are statically routed from the /dev
to the DAI link. Some DSPs can route compressed data to multiple BE DAIs
like they do for PCM data.

Add support to allow dynamically routed compressed streams using the existing
DPCM infrastructure. This patch adds special FE versions of the compressed ops
that work out the runtime routing.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 17:56:21 +00:00
Liam Girdwood 2360702530 ASoC: DPCM: make some DPCM API calls non static for compressed usage
The ASoC compressed code needs to call the internal DPCM APIs in order to
dynamically route compressed data to different DAIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 17:56:21 +00:00
Xiubo Li ec4f2857cd ASoC: core: Fix possible NULL pointer dereference of pcm->config
Since the soc generic dmaengine pcm driver allows using the defualt settings,
so the pcm->config maybe NULL.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-16 14:11:49 +00:00
Takashi Iwai 2aff4c9ce8 ASoC: More updates for v3.14
A few more updates for v3.14 since the last set, highlights include:
 
  - Lots of DMA updates from Lars-Peter
  - Improvements to the constraints handling code from Lars-Peter
  - A very helpful conversion of the TWL4030 driver to regmap from Peter
  - A new driver for the Freescale ESAI controller from Nicolin Chen
  - Conversion of some of the drivers to use params_width()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS19X7AAoJELSic+t+oim9/psQAIKo9sqkQEd6jg/jhSLw5mu5
 jVOvIGnSkmfhmnHtgHxFpJtnYiMCpTnUb1Irb16djO7ODpQ1yP3buv6Go5enUmVU
 zZgsFF+RudM16iXz6ZyAWW8BZJlMDAQTKkepAs7VLCt+FH/PaxOH7apZJi4dGCqj
 URt3NkvfJigPZciYcPGoFtSvSJnNb31ymdymmWxV6rTureyk9/KEKXiQ1r7QJWKY
 fQFyreSXaPfrAcBw8ALIHzdxJalW3M6hKQo9PhS5Z+yoqZRwc1XQ90I0LnB6xruo
 MZp+fQobxbioJDQjt7QluVOKpeUNojvG9dzeZaC7XS9qoejYFewwZNoscg0wljc6
 DveEmRgU7AcHo7PYzBqih8gQGBw0Rhl08b0demyq/XHfaJ8Uf8Whfmwmv9MMXpju
 6rR9yU2lsne/w+ND8Jj0FPvzARQrLjIXOJEWP9q58ZpDeiUBhcZN9qMtnTyAmh6P
 mauPd+mmBRLgojfD4+CDSMIFItGKc3rPivCIK7QRMps+aHcitiJO5AOhhBR18Z6Q
 W3LGrr1oGkc9gZQzaN5dOiPJ9ywJWReuca7EVp7eAK27HGMXfSvTC162uVM7Rv/v
 N2OtH+6ar2By5Q5HS8if7fU/n6E0QWU++WbTcfny/VHAJXz2p6uIFbymBH8H+5ws
 JC2F3pHVrCFF9rdgPrKy
 =9Nvq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: More updates for v3.14

A few more updates for v3.14 since the last set, highlights include:

 - Lots of DMA updates from Lars-Peter
 - Improvements to the constraints handling code from Lars-Peter
 - A very helpful conversion of the TWL4030 driver to regmap from Peter
 - A new driver for the Freescale ESAI controller from Nicolin Chen
 - Conversion of some of the drivers to use params_width()
2014-01-16 14:54:00 +01:00
Mark Brown 701caa51a2 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai 2014-01-16 12:44:01 +00:00
Mark Brown a4c83a2d00 Merge remote-tracking branch 'asoc/topic/arizona' into for-tiwai 2014-01-16 12:43:55 +00:00
Mark Brown 2f43a23ab9 Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwai 2014-01-16 12:42:57 +00:00
Mark Brown 7cfa7b5473 Merge remote-tracking branch 'asoc/topic/dma' into for-tiwai 2014-01-16 12:42:54 +00:00
Mark Brown 99896f714a Merge remote-tracking branch 'asoc/topic/dapm' into for-tiwai 2014-01-16 12:42:53 +00:00
Mark Brown a9b68d3b90 Merge remote-tracking branch 'asoc/topic/core' into for-tiwai 2014-01-16 12:42:53 +00:00
Mark Brown efe265d301 Merge remote-tracking branches 'asoc/fix/adau1701' and 'asoc/fix/tlv320aic32x4' into for-tiwai 2014-01-16 12:42:51 +00:00
Hui Wang c48ae0ab37 ALSA: hda - add headset mic detect quirks for some Dell machines
When we plug a 3-ring headset on some Dell machines, the headset
mic can't be detected, after apply this patch, the headset mic
can work well on all those machines.

On the machine with the Subsytem ID 0x10280610, if we use
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, the headset mic can be
detected and work well, but the sound can't be outputed via
headphone anymore, use ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
can fix this problem.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: David Chen <david.chen@canonical.com>
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-16 12:43:15 +01:00
Markus Pargmann e8e08c521d ASoC: tlv320aic32x4: Fix regmap range_min
range_min is the lowest address in the virtual register range. This is
the first register with address 0, not the first register of page 1.

Currently all writes to page 1 are mapped to page 0, so the codec fails
to operate.

Fixes: 4d208ca429 (ASoC: tlv320aic32x4: Convert to direct regmap API usage)
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
2014-01-15 23:12:44 +00:00
Mark Brown 1104a9c822 ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided
Make it easier for generic code to work with set_sysclk() by distinguishing
between the operation not being supported and an error as is done for
other operations like set_dai_fmt()

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15 23:06:59 +00:00
Arun Shamanna Lakshmi f7d3c17096 ASoC: dapm: Change prototype of soc_widget_read
soc_widget_read API returns the register data and it is possible
that a register can contain 0xffffffff. Thus, change the prototype
of soc_widget_read to return only the error code and pass the reg
data through pointer argument.

Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15 11:43:27 +00:00
Lars-Peter Clausen d70e861a31 ASoC: samsung: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
The Samsung dmaengine ASoC driver is used with two different dmaengine drivers.
The pl80x, which properly supports residue reporting and the pl330, which
reports that it does not support residue reporting. So there is no need to
manually set the NO_RESIDUE flag. This has the advantage that a proper (race
condition free) PCM pointer() implementation is used when the pl80x driver is
used. Also once the pl330 driver supports residue reporting the ASoC PCM driver
will automatically start using it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 153e66f513 ASoC: axi-{spdif,i2s}: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
The pl330 driver properly reports that it does not have residue reporting
support, which means the PCM dmanegine driver is able to figure this out on its
own. So there is no need to set the flag manually. Removing the flag has the
advantage that once the pl330 driver gains support for residue reporting it will
automatically be used by the generic dmaengine PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 478028e088 ASoC: generic-dmaengine-pcm: Check DMA residue granularity
The dmaengine framework now exposes the granularity with which it is able to
report the transfer residue for a certain DMA channel. Check the granularity in
the generic dmaengine PCM driver and
	a) Set the SNDRV_PCM_INFO_BATCH if the granularity is per period or worse.
	b) Fallback to the (race condition prone) period counting if the driver does
	not support any residue reporting.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 93b943edfc ASoC: generic-dmaengine-pcm: Check NO_RESIDUE flag at runtime
Currently we have two different snd_soc_platform_driver structs in the generic
dmaengine PCM driver. One for dmaengine drivers that support residue reporting
and one for those which do not. When registering the PCM component we check
whether the NO_RESIDUE flag is set or not and use the corresponding
snd_soc_platform_driver. This patch modifies the driver to only have one
snd_soc_platform_driver struct where the pointer() callback checks the
NO_RESIDUE flag at runtime. This allows us to set the NO_RESIDUE flag after the
PCM component has been registered. This becomes necessary when querying whether
the dmaengine driver supports residue reporting from the dmaengine driver itself
since the DMA channel might only be requested after the PCM component has been
registered.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Mark Brown 8e6714ac60 Merge branch 'topic/samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma 2014-01-14 21:28:35 +00:00
Mark Brown 67c2fe2f5d Merge branch 'topic/axi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma 2014-01-14 21:28:22 +00:00
Xiubo Li ca919fe4b9 ASoC: simple-card: fix one bug to writing to the platform data
It's a bug that writing to the platform data directly, for it should
be constant. So just copy it before writing.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:25:48 +00:00
Lars-Peter Clausen 55dcdb5051 ASoC: pcm: Use snd_pcm_rate_mask_intersect() helper
Instead of open-coding the intersecting of two rate masks (and getting slightly
wrong for some of the corner cases) use the new snd_pcm_rate_mask_intersect()
helper function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:34 +00:00
Lars-Peter Clausen e3a9269f87 ALSA: Add helper function for intersecting two rate masks
A bit of special care is necessary when creating the intersection of two rate
masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and
SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two
rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a
specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of
discrete rates specified by a list constraint. For all other cases the supported
rates are specified directly in the rate mask.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:34 +00:00
Lars-Peter Clausen bf103eb4af ASoC: s6000: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates
SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain
interval) are supported. There is no need to manually set other rate bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:29 +00:00
Lars-Peter Clausen 24710c9796 ASoC: fsl: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates
SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain
interval) are supported. There is no need to manually set other rate bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:26 +00:00
Lars-Peter Clausen 817873f4b1 ASoC: pcm: Properly initialize hw->rate_max
If none of the components (CODEC or CPU DAI) sets a maximum sample rate we'll
end up with the rate_max field of the runtime hardware set to 0.  (Note that it
is still possible for the components to constrain the supported sample rates
using other methods, e.g. setting a list constraint) If rate_max is 0 this means
that the sound card doesn't support any rates at all, which is not the desired
result. So initialize rate_max to UINT_MAX. For symmetry reasons also set
rate_min to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:41:57 +00:00
Mark Brown 64a9aa9cf5 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into asoc-pcm

Linux 3.13-rc3
2014-01-14 20:41:53 +00:00
Arnd Bergmann cdef2e5f35 sound: oss: remove last sleep_on users
There are three files in oss for which I could not find an easy way to
replace interruptible_sleep_on_timeout with a non-racy version. This
patch instead just adds a private implementation of the function, now
named oss_broken_sleep_on, and changes over the remaining users in
sound/oss/ so we can remove the global interface.

[fixed coding style warnings by tiwai]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:12:07 +01:00
Arnd Bergmann 1a1e0a80ce sound: oss: dmasound: kill SLEEP() macro to avoid race
The use of interruptible_sleep_on_timeout in the dmasound driver
is questionable and we want to kill off all sleep_on variants.
This replaces the calls with wait_event_interruptible_timeout
where possible, to wait for a particular event instead of blocking
in a racy way. In the sq_write function, the easiest solution is
an open-coded prepare_to_wait loop.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:12:07 +01:00
Arnd Bergmann 76439c2ac6 sound: oss: midibuf: fix sleep_on races
sleep_on is known to be racy and going away because of this. All instances
of interruptible_sleep_on and interruptible_sleep_on_timeout in the midibuf
driver can trivially be replaced with wait_event_interruptible and
wait_event_interruptible_timeout.

[fixed coding style warnings by tiwai]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:11:44 +01:00
Arnd Bergmann 7bd6972a92 sound: oss: vwsnd: avoid interruptible_sleep_on
Interruptible_sleep_on is racy and we want to remove it. This replaces
the use in the vwsnd driver with an open-coded prepare_to_wait
loop that fixes the race between concurrent open() and close() calls,
and also drops the global mutex while waiting here, which restores
the original behavior that was changed during the BKL removal.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:01:27 +01:00
Arnd Bergmann 1a21576562 sound: oss: msnd_pinnacle: avoid interruptible_sleep_on_timeout
We want to remove all sleep_on variants from the kernel because they are
racy. In case of the pinnacle driver, we can replace
interruptible_sleep_on_timeout with wait_event_interruptible_timeout
by changing the meaning of a few flags used in the driver so they
are cleared at wakeup time, which is a somewhat more appropriate
way to do the same, although probably still racy.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:01:20 +01:00
Takashi Iwai cf67c8e71b ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.c
The new vmaster hook, update_tpacpi_mute_led(), calls the original
vmaster hook, but I forgot to save the original hook function but keep
calling the updated one, which of course results in a stupid endless
loop.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:56:55 +01:00
Daniel Mack 358b7dfa1c ALSA: snd-usb: re-order some quirk entries
No code change, just a cosmetic cleanup to keep entries ordered by the
device ID within a block of unique vendor IDs.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:40:08 +01:00
Pavel Hofman 8c4b79cf21 ALSA: usb-audio: Fix Creative VF0420 rate
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working
at 8kHz. The patch adds its USB ID to the existing quirk.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:23:47 +01:00
Eduard Gilmutdinov 11e424e88b ALSA: usb-audio: Add support for Focusrite Saffire 6 USB
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 13:56:31 +01:00
Hui Wang 493a52a9b6 ALSA: hda - automute via amp instead of pinctl on some AIO models
On some AIO (All In One) models with the codec alc668
(Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack,
the system will switch the output to headphone and set the speaker to
automute as well as change the speaker Pin-ctls from 0x40 to 0x00,
this will bring loud noise to the headphone.

I tried to disable the corresponding EAPD, but it did not help to
eliminate the noise.

According to Takashi's suggestion, we use amp operation to replace the
pinctl modification for the automute, this really eliminate the noise.

BugLink: https://bugs.launchpad.net/bugs/1268468
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 10:42:29 +01:00
Xiubo Li ba194a4de5 ASoC: simple-card: use snd_soc_card_set/get_drvdata
Remove asoc_simple_get_card_info macro and use snd_soc_card_set_drvdata
and snd_soc_card_get_drvdata instead.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 17:38:36 +00:00
Takashi Iwai dfc6e469b6 ALSA: hda - Apply codec power_filter to FG nodes
Apply the codec->power_filter to the FG nodes in general for reducing
hackish set_power_state ops override in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13 16:30:15 +01:00
Markus Pargmann 6d0d5103bd ASoC: codec: tlv320aic32x4: Fix regmap range config
This codec driver fails to probe because it has a higher regmap
range_max value than max_register. This patch sets the range_max to the
max_register value as described in the for struct regmap_range_cfg:
"@range_max: Address of the highest register in virtual range."

Fixes: 4d208ca429 (ASoC: tlv320aic32x4: Convert to direct regmap API usage)
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
2014-01-13 12:34:51 +00:00
Mark Brown 0058e45960 ASoC: max9850: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 580ce08d5c ASoC: max98095: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 7821afc486 ASoC: max98090: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 793f77036d ASoC: max98088: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown 359e2ae897 ASoC: isabelle: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown 2822a9d01c ASoC: da9055: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown abf82ae6a6 ASoC: da732x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown e7610743d4 ASoC: da7213: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown 0194c42a8f ASoC: da7210: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown 1b6b0dfac2 ASoC: cs42l51: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Mark Brown 2dad2283c5 ASoC: alc5632: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Mark Brown 4a608b3af3 ASoC: alc5623: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Takashi Iwai cbd209f41e ALSA: hda - Don't set indep_hp flag for old AD codecs
Some old AD codecs don't like the independent HP handling, either it
contains a single DAC (AD1981) or it mandates the mixer routing
(AD1986A).  This patch removes the indep_hp flag for such codecs.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13 12:40:07 +01:00
Takashi Iwai 80ab8eae70 ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
The PCI devices with DMA masks smaller than 32bit should enable
CONFIG_ZONE_DMA.  Since the recent change of page allocator, page
allocations via dma_alloc_coherent() with the limited DMA mask bits
may fail more frequently, ended up with no available buffers, when
CONFIG_ZONE_DMA isn't enabled.  With CONFIG_ZONE_DMA, the system has
much more chance to obtain such pages.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11 11:05:13 +01:00
Takashi Iwai 6ab08ced64 ALSA: PCM: Warn when buffer preallocation fails
The failures of buffer preallocations at driver initializations aren't
critical but it's still helpful to inform, so that user can know that
something doesn't work as expected.

For example, the recent page allocator change triggered regressions,
but developers didn't notice until recently because the driver didn't
complain.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11 11:04:23 +01:00
Nicolin Chen 43d24e76b6 ASoC: fsl_esai: Add ESAI CPU DAI driver
This patch implements a device-tree-only CPU DAI driver for Freescale ESAI
controller that supports:

 - 12 channels playback and 8 channels record.
   [ Some of the inner transmitters and receivers are sharing same group of
     pins. So the maxmium 12 output or 8 input channels are only valid if
     there is no pin conflict occurring to it. ]

 - Independent (asynchronous mode) or shared (synchronous mode) transmit and
   receive sections with separate or shared internal/external clocks and frame
   syncs, operating in Master or Slave mode.
   [ Current ALSA seems not to allow CPU DAI drivers to configure DAI format
     separately for PLAYBACK and CAPTURE. So this first version only supports
     the case that uses the same DAI format for both directions. ]

 - Various DAI formats: I2S, Left-Justified, Right-Justified, DSP-A and DSP-B.

 - Programmable word length (8, 16, 20 or 24bits)

 - Flexible selection between system clock or external oscillator as input
   clock source, programmable internal clock divider and frame sync generation.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-10 12:52:15 +00:00
Charles Keepax afb6d4ed3f ASoC: wm5110: Add controls for headphone short circuit protection
Add controls to enable/disable the headphone short circuit protection of
the headphone outputs.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-10 11:52:26 +00:00
Mark Brown fce6bd84d6 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into asoc-arizona

Linux 3.13-rc3
2014-01-10 11:52:05 +00:00
Sarah Bessmer e240a46965 ALSA: ctxfi - Work around emu20k1 glitch to prevent buffered sound data loss
Occasionally, on playback stream ringbuffer wraparound, the EMU20K1
hardware will momentarily return 0 instead of the proper current(loop)
address. This patch handles that case, fixing the problem of playback
position corruption and subsequent loss of buffered sound data, that
occurs with some common buffering layout patterns(e.g. multiple
simultaneous output streams with differently-sized or
non-power-of-2-sized buffers).

An alternate means of fixing the problem would be to read the ca
register continuously, until two sequential reads return the same
value; however, that would be a more invasive change, has performance
implications, and isn't necessary unless there are also issues with the
value not being updated atomically in regards to individual bits or
something similar(which I have not encountered through light testing).

I have no EMU20K2 hardware to confirm if the issue is present there,
but even if it's not, this change shouldn't break anything that's not
already broken.

Signed-off-by: Sarah Bessmer <aotos@fastmail.fm>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-10 10:10:41 +01:00
Xiubo Li 34787d0a25 ASoC: simple-card: fix the cinfo error check
If the dt is used and the cinfo is NULL, the -ENOMEM should be return.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:38:09 +00:00
Xiubo Li 708ec0241c ASoC: simple-card: fix a bug where cinfo will be NULL before using it
If the dt is not used, the cinfo will be always NULL before using it.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:35:46 +00:00
Nicolin Chen 2b56b5f020 ASoC: fsl_ssi: Set default slot number for common cases
For those platforms using DAI master mode like I2S, it's better to pre-set
a default slot number so that there's no need for these common cases to set
the slot number from its machine driver any more.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:33:31 +00:00
Wei Yongjun e1cffe8c9f ASoC: fsl-ssi: Add missing clk_disable_unprepare() on error in fsl_ssi_probe()
Add the missing clk_disable_unprepare() before return from
fsl_ssi_probe() in the request irq error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:26:01 +00:00
Lars-Peter Clausen 16d7ea9167 ASoC: Allow PCMs to restrict the supported formats
Some DMA cores might add additional restrictions on which in memory audio
formats can be supported by the compound sound card. If the PCM component
specifies a set of formats it supports (by setting the formats field to non 0)
take these into account when calculating the format set for the compound sound
card.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:31:59 +00:00
Lars-Peter Clausen df021a72c9 ASoC: ux500: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:30:27 +00:00
Lars-Peter Clausen a7ddf151b0 ASoC: sh: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:29:44 +00:00
Lars-Peter Clausen 1153677134 ASoC: nuc900: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:29:02 +00:00
Lars-Peter Clausen 3317208c88 ASoC: kirkwood: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:28:22 +00:00
Lars-Peter Clausen c098284a4b ASoC: intel: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:27:39 +00:00
Mark Brown cf7d8b274f ASoC: adav80x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:33 +00:00
Mark Brown 9b58e71634 ASoC: adau1701: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:30 +00:00
Mark Brown 7c2aff6ab5 ASoC: adau1373: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:28 +00:00
Mark Brown d4dd1fdf9e ASoC: ad193x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:26 +00:00
Mark Brown fa69b0f93e ASoC: ad1836: Use params_width() rather than explicit memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:15 +00:00
Markus Pargmann d7fa710423 ASoC: fsl-ssi: Fix stats compile warning
single_open requires a function with signature
'int (*)(struct seq_file *, void *)'. This patch fixes the warning by
fixing the wrong return type of fsl_ssi_stats_show.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 13:54:59 +00:00
Charles Keepax 18b1a902ad ASoC: wm_adsp: Mark wm_adsp2_boot_work as static
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 13:51:40 +00:00
Takashi Iwai 2d82ea2005 ALSA: Merge memalloc code into snd-pcm module
Instead of keeping a separate snd-page-alloc module, merge into the
core snd-pcm module, as we don't need to keep it as an individual
module due to the drop of page reservation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 08:12:57 +01:00
Takashi Iwai f5d8e6df4b ALSA: Remove superfluous header inclusions in memalloc.c
After cutting off the proc and page reservation codes, we don't need
many headers any longer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:44:11 +01:00
Takashi Iwai 47d98c026e ALSA: Remove memory reservation code from memalloc helper
Nowadays we have CMA for obtaining the contiguous memory pages
efficiently.  Let's kill the old kludge for reserving the memory pages
for large buffers.  It was rarely useful (only for preserving pages
among module reloading or a little help by an early boot scripting),
used only by a couple of drivers, and yet it gives too much ugliness
than its benefit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:32:10 +01:00
Takashi Iwai d7b135410e ALSA: Remove memory accounting in memalloc helper
It's almost superfluous, and doesn't help much for real uses.
Let's reduce the layer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:32:05 +01:00
Mengdong Lin 75dcbe4dc2 ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec
Broadwell and Haswell have the same behavior on display audio. So this patch
defines is_haswell_plus() to include codecs for both Haswell and its successor
Broadwell, and apply all Haswell fix-ups to Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:30:17 +01:00
Mengdong Lin 3adadd280a ALSA: hda - add codec ID for Broadwell display audio codec
This patch adds codec ID (0x80862808) and module alias for Broadwell
display codec.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:30:02 +01:00
Mengdong Lin 862d761818 ALSA: hda - add device ID for Broadwell display audio controller
This patch adds the device ID for Intel Broadwell display HD-Audio controller,
and applies Haswell properties to this device.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:29:42 +01:00
Takashi Iwai 053ad6a057 ASoC: bcm: Remove obsoleted Kconfig dependency
CONFIG_SND_SOC_DMAENGINE_PCM was renamed to CONFIG_SND_DMAENGINE_PCM
recently.  And yet we don't have to select it since
CONFIG_SND_GENERIC_DMAENGINE_PCM selects the dependency by itself, so
just rip it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Florian Meier <florian.meier@koalo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 20:00:04 +00:00
Charles Keepax 12db5edd69 ASoC: wm_adsp: Start DSP booting earlier in the DAPM process
Move the start of booting the DSP to earlier in the DAPM process, and
move the final starting of the DSP to later in the DAPM process. This
allows us to overlap some of the processing with other components of the
system being brought up.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 18:17:37 +00:00
Charles Keepax d8a64d6ade ASoC: wm_adsp: Factor out ADSP2 boot proceedure
Move the ADSP2 boot proceedure into a work structure in preparation for
running it asynchronously with the reset of the audio path bring up.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 18:17:37 +00:00
Markus Pargmann a5a7ee7c98 ASoC: fsl-ssi: Drop ac97 specific trigger function
The normal trigger function can now be used for AC97. Drop AC97 trigger
function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 6de8387905 ASoC: fsl-ssi: Move RX/TX configuration to seperate functions
This patch defines the appropriate register values for different
oparation modes and IP versions. We have to handle DMA/FIQ, AC97,
DEBUG-IRQs and offline/online configuration support.

With this patch we cleanup some driver code that was not reference
manual conform and try to cleanup the whole trigger function to seperate
the actual register values from the enable/disable logic, which is now
hidden in fsl_ssi_config helpers.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 4e6ec0d98c ASoC: fsl-ssi: Add configuration helper functions
This patch adds a struct 'fsl_ssi_rxtx_reg_val' which holds register
values necessary to enable rx/tx. Based on those preset register values,
the added configuration functions will cleanly enable/disable different
parts of the SSI IP while supporting online/offline configuration.
Different operating modes can be setup directly as different register
values in fsl_ssi_reg_val.

These functions and structs will help to cleanup and simplify the
trigger function to support many different IP versions (online/offline
configuration) and different operating modes.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann bd3ca7d1b8 ASoC: fsl-ssi: Add offline_config flag
imx50-ssi and later versions of this IP support online reconfiguration
of all registers. The reference manual does not list any registers that
can only be configured while the SSI unit is disabled. This patch
introduces the flag for later use.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 0888efd166 ASoC: fsl-ssi: Fix interrupt stats for imx
irqs should only be requested/released with enabled DMA. Previously
interrupt statistics where disabled for IMX Processors because of
different writeable SISR bits.

This patch introduces support for irqstats on imx processors again by
creating a sisr writeback mask and introducing a imx35-ssi compatible.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:31 +00:00
Markus Pargmann c1953bfe13 ASoC: fsl-ssi: Add imx51-ssi and of_device_id matching
There is a small but significant difference between imx21-ssi and
imx51-ssi and above. imx21-ssi does not allow online reconfiguration of
some registers. They have to be configured at the beginning.

imx51-ssi has to reconfigure the SSI unit while it is running. Otherwise
it would not be possible to have two streams in parallel. The new SDMA
unit in imx51 and above has to be configured before the first DMA
request arrives. Therefor we need to setup TDMAE/RDMAE just before
starting the stream.

This patch introduces distinct imx51-ssi as compatible and adds
of_device_id matching in the probe function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:31 +00:00
Markus Pargmann 9368acc438 ASoC: fsl-ssi: Move sysfs stats to debugfs
Interrupt statistics of fsl_ssi are mainly for debugging purpose. Most
of those interrupts show error states, e.g. under/overflow.
The stats should be exposed via debugfs instead of sysfs.

This patch moves the statistics file to debugfs.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:18:30 +00:00
Markus Pargmann 2841be9afa ASoC: fsl-ssi: Fix probe error handling
This patch fixes the error handling in the fsl-ssi probe function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:18:30 +00:00
Takashi Iwai b317b032d2 ALSA: hda - Split Thinkpad ACPI-related code
Both patch_realtek.c and patch_conexant.c contain the fairy same code
snippet for supporting Thinkpad ACPI LED controls.  Split them into
thinkpad_helper.c and include it from both places.  Although this
isn't the best approach from the code size POV, the probability for
coexistence of both Realtek and Conexant codecs on a single machine is
pretty low, thus it'll end up with less memory footprint than
splitting to yet another module.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 16:16:51 +01:00
Andreas Pretzsch 7ae2b55b01 ASoC: ssm2602: add 16kHz sampling rate support
SSM260x also supports 16kHz with external master clocks of 12.000MHz,
12.288MHz and 18.432MHz.
Add matching coefficients, update constraints and announced rates.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:51:12 +00:00
Peter Ujfalusi b703b50485 ASoC: twl4030: Pass the twl4030_priv directly to twl4030_can_write_to_chip()
To avoid another lookup for the twl4030_priv in there.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi a450aa6f50 ASoC: twl4030: Move the ctl cache update local to twl4030_write() function
There's no other users of this functionality, the code can be moved inside
of twl4030_write.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 7ded5fe020 ASoC: twl4030: Parameter alignment fixes (for code consistency)
Over time the multi line alignment got messed up. Correct them in one go
so the code will look consistent.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi efc8acff1f ASoC: twl4030: Remove local reg cache
Depend on the regmap reg cache implementation for register caching done in
the twl-core driver.
The local register cache can be removed and we can keep only shadow copies
of certain ctl registers for pop noise reduction.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 8b3bca2966 ASoC: twl4030: Introduce local ctl register cache
Few registers need to be cached in the codec driver level. These registers
should only be written when the path is active to avoid pop noise on the
given path.
This patch adds an array which covers the range where the sensitive registers
are located and uppon loadinf the driver the ctl cache will be initialized.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 0dc41562a4 ASoC: twl4030: Remove reset registers functionality
The register states now tracked by the regmap implementation in the core which
makes the reset registers functionality 'redundant' since we know the state
of the registers now all the time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 7bfbdfea57 ASoC: twl4030: Remove check defaults functionality
No need to keep the check defaults functionality anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi a8fc415c29 ASoC: twl4030: Separate write condition checking from I/O function
Simplifies the code a bit and prepares it to the removal of local caching.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Xiubo Li 633ff8f8a4 ASoC: fsl-sai: Clean up the code
Makes the code slightly shorter.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:24:01 +00:00
Wei Yongjun 7ee4518ab7 ASoC: ux500: Fix sparse non static symbol warning
Fixes the following sparse warning:

sound/soc/ux500/ux500_msp_i2s.c:649:5: warning:
 symbol 'ux500_msp_i2s_of_init_msp' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:22:18 +00:00
Lars-Peter Clausen e20970ada3 ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
so 0x2. This patch fixes it.

Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-01-08 12:10:50 +00:00
Liam Girdwood b893ea5f1c ASoC: sapm: Automatically connect DAI link widgets in DAPM graph.
Connect the DAPM graph through each BE DAI link to the componnent(s) on the
other side of the BE DAI link. This allows the graph to be walked on
both sides of the link when graph changes are made.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:07:18 +00:00
Liam Girdwood bece9e957c ASoC: utils: Add internal call to determine if DAI is dummy.
Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI.
This is for internal DAPM usage only and is used to determine whether to
insert a DAI link connection into the DAPM graph.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:07:13 +00:00
Takashi Iwai 43a8e50a46 ALSA: hda - Don't create duplicated ctls for loopback paths
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling
the loopback volume/mute, but the generic parser didn't check it.
This ended up with the duplicated controls for the same effect.

This patch adds the check of the duplication for avoiding it.

After this fix, there will be only one control although it affects
both paths; this remaining issue should be fixed later in a different
patch.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:41 +01:00
Takashi Iwai ed0e0d0617 ALSA: hda - Correct AD1986A 3stack pin configs
The 3stack pin configs for AD1986A codec had incorrect values that
resulted in broken mic and line-in.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:32 +01:00
Takashi Iwai 8e3ae6f7ad ALSA: hda - Add consistent tag names for firmware patch
Some tags used in the firmware patch file are inconsistent with hwdep
sysfs file names, such as, the firmware patch takes [hint] tag while
sysfs file is */hints.  This makes even me referring back to the
document often.  Let's provide the same tag names as sysfs for
reducing confusions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:23 +01:00
Takashi Iwai d81e397c65 ALSA: hda - firmware patch code cleanup
Just a code refactoring: the need_codec flag in hda_patch_item struct
can be removed by checking the current mode instead.  No functional
change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:00 +01:00
Takashi Iwai 7546abfb8e ALSA: hda - Increment default stream numbers for AMD HDMI controllers
It turned out that some AMD HDMI controllers still don't provide
proper values in GCAP register (all zero), and the driver assigns only
one stream in that case, although the connected codec chip supports
more than one stream.

In this patch, the default max number of streams for AMD HDMI
controllers is increased to 8, which  should suffice for most use
cases.  The overhead by this increase is more azx_dev struct and BDL
allocations, so it's negligible.  Of course, if the controller
provides a proper GCAP register, the register value would be used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:58:30 +01:00
Takashi Iwai 58c57cfa0d ALSA: hda - Minor code optimization for patch_realtek.c
No functional change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:57:41 +01:00
Liam Girdwood 1e9de42f43 ASoC: dpcm: Explicitly set BE DAI link supported stream directions
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such
wont have set a minimum number of playback or capture channels required for BE
DAI registration (to establish supported stream directions).

Force machine drivers to explicitly set whether they support playback and capture
stream directions for every BE DAIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 17:57:48 +00:00
Jean-Francois Moine dcf0fa27a5 ASoC: pcm: Fix lack of platform bespoke_trigger() call
When the platform driver has no ops, the platform function
bespoke_trigger() is no more called.

The problem was introduced by the commit c5914b0aae
	"ASoC: pcm: Check for ops before deferencing them"

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 17:11:07 +00:00
Xiubo Li 8c0b8230b2 ASoC: simple-card: keep the property's name the same pattern
Even though we might not have rigor rule for the simple card property names,
according to the existing ones, they are all in a same pattern:

[simple-audio-card,]XXX;

Rename simple-audio-routing to simple-audio-card,routing, and make the simple
card's properties has one unified name.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:43:13 +00:00
Xiubo Li f87a3e825c ASoC: simple-card: fix the DAPM routes map parsing
The simple-card's DAPM route maping is optional.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:43:13 +00:00
Lee Jones 33899b1985 ASoC: ux500: Dramatically reduce the size of the DAI driver data struct
We no longer have a means to differentiate between MSP devices at probe
time, mainly because we don't really have to. So rather than have an over-
sized static data structure in place, where the only difference between
devices is the ID and name (which are unused), we'll just create one
succinct, statically assigned and shared one instead.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 86a3fdfc63 ASoC: ux500_pcm: Differentiate between pdata and DT initialisation
If booting with full DT support (i.e. DMA too, the last piece of the
puzzle), then we don't need to use the compatible_request_channel call
back or require some of the historical bumph which probably isn't
required by a platform data start-up now either. This will also be
ripped out in upcoming commits.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones ead20611a2 ASoC: ux500_pcm: Take out pointless dev_dbg() call
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones f382acbe16 ASoC: ux500: Store DMA data in the DAI differently in the pdata and DT case
In this patch we do two things. Firstly, instead of open coding the
store of DMA data in to the DAI for later use, we use the API provided.
Secondly we create and store similar DMA data for the DT case, only
this time we use 'struct snd_dmaengine_dai_dma_data' which is provided
by the core for this very reason.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 05c56c2413 ASoC: ux500_pcm: Extend Device Tree support to deal with DMA data
Soon we will strip out pdata support from the Ux500 set of ASoC drivers.
When this happens it will have to supply a DMA slave_config to the
dmaengine. At the moment a great deal of this comes from pdata via
AUXDATA. We need to become independent of this soon. This patch starts
the process by allocating memory for the associated data structures and
fetches the MSP id used for const struct indexing.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones f6c377520c ASoC: ux500_pcm: Expect different saved DMA data when obtaining from DAI store
In preparation for full Device Tree enablement we must differentiate
between the two varying ways DMA data can be held in the DAI store. If
we're booting with Device Tree the provided 'snd_dmaengine_dai_dma_data'
data structure shall be used, whereas in order to avoid breaking legacy
platform data we also need to be able to translate DMA data stored using
the UX500 specific 'ux500_msp_dma_params' method.

Once we move over to solely use Device Tree, we can enforce the use of
'snd_dmaengine_dai_dma_data' and this code can be removed altogether.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 609a3050b8 ASoC: ux500_pcm: Stop pretending that we support varying address widths
The Slave Config's addr_width attribute is populated by data_width of
dma_cfg, which in turn is derived from dma_params' data_size attribute
and that comes from the slot_width which is always 16 bits (2 Bytes).
We're cutting out the middle man here and just setting the DMA Slave
Config directly.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones ae276e93b8 ASoC: Ux500: Match platform by device node when booting Device Tree
We're getting closer to fully enabling the Ux500 ASoC driver for Device
Tree. When we switch over from using AUXDATA we'll need to match platform
by only Device Tree nodes. In this patch we NULL out the platform_name,
and supply nodes for each platform device.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones a61f9e314a ASoC: ux500: Provide better checking for Device Tree and/or Platform Data
These drivers will not work without platform specific data, which is
passed in via Device Tree or Platform Data. To avoid the chance of
NULL pointer dereferencing and alike, let's ensure we have at least
one of the methods in play before continuing.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones 0475680b5c ARM: ux500: Don't use enums for MSP IDs - for easy DT conversion
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:36:09 +00:00
Lars-Peter Clausen 96ae0f08ac ASoC: mxs: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA")
the mxs dmaengine driver has support for residue reporting. So there is no need
to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a
finer grained resolution for the PCM pointer as well as avoids the race
condition that can occur with the period counting that is used when the
dmaengine driver does not support residue reporting.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 11:41:36 +00:00
Lars-Peter Clausen f3b6079683 ASoC: mxs: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 11:41:32 +00:00
Lars-Peter Clausen b0a23b8b36 ASoC: fsl: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 11:40:24 +00:00
Fabio Estevam ff1b15acb4 ASoC: fsl: fsl_ssi: Use '%ld' to print 'long int'
Commit 6873ee464a (ASoC: fsl_ssi: Fix printing return code on clk error) caused
the following build warning:

sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_probe':
sound/soc/fsl/fsl_ssi.c:1196:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat]

Fix it by using '%ld' to print the 'long int' format.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 10:54:28 +00:00
Lars-Peter Clausen 002220a90d ASoC: dpcm: Allow PCMs to omit the set of supported formats
Allow PCMs that do not impose any restrictions on the supported formats to set
the formats field to 0, Instead of assuming that this means that the PCM does
not support any formats (which doesn't make much sense), assume that it supports
all formats. This brings the behavior of DPCM closer to that of non-DPCM.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 17:42:42 +00:00
Lars-Peter Clausen 08ae9b456d ASoC: dpcm: Add helper function for initializing runtime pcm
We have the same code for initializing the runtime pcm on both the playback and
the capture path. Factor this out into a common helper function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 17:36:48 +00:00
Lars-Peter Clausen 6ed54f08ba ASoC: atmel: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 16:45:24 +00:00
Alexander Shiyan 2b32098f74 ASoC: mc13783: trivial: Cleanup module
This is a trivial cleanup: remove useless variable mc13xxx and
extra spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00
Alexander Shiyan 295b84237b ASoC: mc13783: Drop fixed ADC & DAC ports usage
There are no users of this driver without pdata, so stop using
constant assignment of ADC and DAC ports.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00