Commit Graph

14883 Commits

Author SHA1 Message Date
Mark Brown f0f3214e8b Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next 2013-02-11 11:06:37 +00:00
Mark Brown a948cae6ab Merge remote-tracking branch 'asoc/topic/max98090' into asoc-next 2013-02-11 11:06:36 +00:00
Mark Brown d0c65252c4 Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next 2013-02-11 11:06:35 +00:00
Mark Brown 1b4327dced Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-02-11 11:06:34 +00:00
Mark Brown e790245eb3 Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next 2013-02-11 11:06:33 +00:00
Mark Brown d289323286 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-02-11 11:06:30 +00:00
Mark Brown 6a47366973 Merge remote-tracking branch 'asoc/topic/compress' into asoc-next 2013-02-11 11:06:29 +00:00
Mark Brown 81fd7e48f4 Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next 2013-02-11 11:06:27 +00:00
Mark Brown 1f2e7a9001 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-02-11 11:06:25 +00:00
Mark Brown 278d064bb8 Merge remote-tracking branch 'asoc/topic/ak4642' into asoc-next 2013-02-11 11:06:25 +00:00
Mark Brown c331a23b3c Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-02-11 11:06:24 +00:00
Mark Brown 708558d378 Merge remote-tracking branch 'asoc/fix/wm2200' into asoc-next 2013-02-11 11:06:22 +00:00
Mark Brown af861779ec Merge remote-tracking branch 'asoc/fix/wm2000' into asoc-next 2013-02-11 11:06:20 +00:00
Mark Brown 6d60568b3b Merge remote-tracking branch 'asoc/fix/ux500' into asoc-next 2013-02-11 11:06:19 +00:00
Mark Brown dd31f59101 Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-next 2013-02-11 11:06:18 +00:00
Mark Brown 89bc3f2c93 Merge remote-tracking branch 'asoc/fix/samsung' into asoc-next 2013-02-11 11:06:17 +00:00
Mark Brown 1df63cc0f0 Merge remote-tracking branch 'asoc/fix/dwc' into asoc-next 2013-02-11 11:06:17 +00:00
Mark Brown 8e37fcb624 Merge remote-tracking branch 'asoc/fix/davinci' into asoc-next 2013-02-11 11:06:16 +00:00
Mark Brown 810195256e Merge remote-tracking branch 'asoc/fix/arizona' into asoc-next 2013-02-11 11:06:15 +00:00
Mark Brown 4d631a0bed Merge remote-tracking branch 'asoc/fix/adsp' into asoc-next 2013-02-11 11:06:14 +00:00
Chris Rattray bdaacea359 ASoC: wm_adsp: round to 4-byte boundary for coeff file blocks
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11 10:53:34 +00:00
Takashi Iwai b3667bd757 ALSA: hda - Fix memory leak and error handling in CA0132 DSP loader
This patch fixes a few obvious bugs in DSP loader stuff:
- Fix possible memory leaks in the error path
- Avoid double-free calls in dma_reset()
- Properly set/unset WC bits for DMA buffers
- Add missing error status checks

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10 11:58:40 +01:00
Ian Minett 6d67530e2c ALSA: CA0132: Improve the DSP transfer timeout calculations
Base the DSP firmware transfer and communication timeouts on jiffy values.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10 11:43:46 +01:00
James Ralston 884b088f61 ALSA: hda_intel: Add Device IDs for Intel Wellsburg PCH
This patch adds the HD Audio Device IDs for the Intel Wellsburg PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10 11:38:29 +01:00
Olof Johansson 94c16ea6ea Linux 3.8-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJRCxWdAAoJEHm+PkMAQRiG3bAH/28D2NbRLIDo6QIzk3seCCh3
 A6vqDWbX671JRa0RO38DrWhqv6L/EisvjNZMVxBNaN635+3+yC7wsKziXYxA4+AL
 Ef9JISiwXykRWwrC8Q34YBWfWgeFTmaau71IRv45x2OTwiijd6cvjXhLDrOhHEGL
 rdAGJxIdBOfuASw1zpn9PxzfAtg1j/FGP03B4yy+JFhYzuDp3pvnDIysAnXefLml
 UheuBELdNf8Jx7NtW80PTa+TQtruWPC8otoiJevV4TrAWmAOctJiM1izL+VOZqqD
 I/v5aGf9mCN+cxLq06imwgEHWmP1I7yDdjjTHrr4wwIMws1vg8PNsJqG3AsPcwM=
 =dR8S
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc6' into next/cleanup

Linux 3.8-rc6
2013-02-09 16:41:37 -08:00
Takashi Iwai c88d4e84e6 ALSA: hda - Yet another fix for broken HSW HDMI pin connections
A Haswell test machine showed that the invalid connection list, but
this time it has only a single pin on the codec, thus the former fixup
code doesn't work as it assumes the three pins blindly.

This patch splits the former fixup code to two parts:
- Enable eDP 1.2 for Haswell codec
- Fix the connection list of pins on Haswell codec;
  the converter list is recorded dynamically in hdmi_add_cvt(), and
  applied in hdmi_add_pin()

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08 12:23:48 +01:00
Mengdong Lin 1611a9c931 ALSA: hda - Add fixup for Haswell to enable all pin and convertor widgets
Some Haswell machines support more than one display outputs (HDMI or DP),
but its BIOS may not enable the codec's 2nd and 3rd pin and output cvt widgets.

This patch implements a board-specific fixup for Intel Haswell Machines:
If the hidden pins are not enabled by BIOS, the driver will enable them
and call common code to update the codec tree.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08 12:23:13 +01:00
Mengdong Lin a15d05db41 ALSA: hda - Support rereading widgets under the function group
A codec may allow software to hide some unused pin/cvt widgets.

Sometimes BIOS does not enable the hidden widgets properly although they are
needed for the board. Thus the driver need to enable them as a board-specific
fixup and the whole tree will change.

This patch implements a common code for rereading codec widgets. So the fixup
code can call it after enabling the hidden widgets.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08 12:22:50 +01:00
Mark Brown da18396f94 ASoC: core: Allow digital mute for capture
Help avoid noise from the power up of the capture path propagating through
into the start of the recording (especially noise caused by the ramp of
microphone biases) by keeping the capture muted until after we've finished
powering things up with DAPM in the same manner we do for playback. This
allows us to take advantage of soft mute support in the hardware more
effectively and is more consistent.

The core code using the existing digital mute operation is updated to take
advantage of this. Some additional cases in the soc-pcm code and suspend
will need separate handling but these are less practically relevant than
the main runtime stream start/stop case.

Rather than refactor the digital mute function in every single driver a
new operation is added for drivers taking advantage of this functionality,
the old operation should be phased out over time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-02-08 11:08:44 +00:00
Takashi Iwai 4eea30914f ALSA: hda - Remove limit of widget connections
Currently we set the max number of connections to be 32, but there
seems codec that gives longer connection lists like AD1988, and we see
errors in proc output and else.  (Though, in the case of AD1988, it's
a list of all codecs connected to a single vendor widget, so this must
be something fishy, but it's still valid from the h/w design POV.)

This patch tries to remove this restriction.  For efficiency, we still
use the fixed size array in the parser, but takes a dynamic array when
the size is reported to be greater than that.

Now the fixed array size is found only in patch_hdmi.c, but it should
be fine, as the codec itself can't support so many pins.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 20:01:08 +01:00
Mark Brown e38b9b7478 ASoC: compress: Only mute playback streams
Otherwise capture activity on a compressed DAI would mute any playback
on the same DAI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-02-07 18:41:50 +00:00
Takashi Iwai c1279f8787 ALSA: hda - Set non-snoop for Creative HD-audio controllers
... looks like we need this for stable operations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 17:36:22 +01:00
Heiko Carstens 262d62eb55 ALSA: add missing HAS_IOPORT and GENERIC_HARDIRQS dependencies
Fix these two compile errors on s390 which does not have HAS_IOPORT
nor GENERIC_HARDIRQS:

sound/pci/lx6464es/lx6464es.c: In function ‘snd_lx6464es_free’:
sound/pci/lx6464es/lx6464es.c:565:2: error: implicit declaration of function ‘ioport_unmap’

sound/soc/codecs/wm8903.c: In function ‘wm8903_set_pdata_irq_trigger’:
sound/soc/codecs/wm8903.c:1954:9: error: implicit declaration of function ‘irq_get_irq_data’

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 14:46:13 +01:00
Jerry Wong 685e42154d ASoC: Replace max98090 Device Driver
This patch completes the replacement of the existing max98090 driver,
by installing a more complete driver.

Signed-off-by: Jerry Wong <jerry.wong@maximintegrated.com>
Tested-by: Matthew Mowdy <matthew.mowdy@maximintegrated.com>
Reviewed-by: Ralph Birt <ralph.birt@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07 12:59:34 +00:00
Jerry Wong 7e3bb169ff ASoC: Replace max98090 Device Driver
This patch removes the existing max98090 driver prior to installing a more
complete one.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07 12:59:34 +00:00
Takashi Iwai 9a0869f402 ALSA: hda - Fix misc compile warnings in patch_ca0132.c
sound/pci/hda/patch_ca0132.c: In function ‘ca0132_is_vnode_effective’:
  sound/pci/hda/patch_ca0132.c:3331:15: warning: ‘nid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  sound/pci/hda/patch_ca0132.c:4345:13: warning: ‘ca0132_download_dsp’ defined but not used [-Wunused-function]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 12:56:12 +01:00
Mark Brown 9092a6ea16 ASoC: arizona: Fix debug logging level for FLLs and AIFs
Use _dbg for debug messages.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-07 11:41:19 +00:00
Takashi Iwai 45acc86b2e Merge branch 'topic/hda-ca0132-dsp' into for-next 2013-02-07 12:34:36 +01:00
Takashi Iwai 0186f4f4f2 ALSA: hda - Use generic array for loopback list management
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 10:45:11 +01:00
Takashi Iwai 46a144818a ALSA: hda - Enable loopback accounts for CONFIG_PM=n, too
The loopback list is referred by the VIA codec driver no matter
whether CONFIG_PM is set or not, thus we need to enable it always.
Otherwise it gets compile errors.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 09:59:26 +01:00
Dan Carpenter b57a895fa2 ALSA: ice1712: fix boundary check in snd_wm8766_write()
The wm->regs[] array has WM8766_REG_COUNT (16) elements not
WM8766_REG_RESET (31).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07 09:52:15 +01:00
Takashi Iwai 6baa4afa04 Merge branch 'fix/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus-uncursed
We need this for fixing build error regressions in soc/fsl.
2013-02-06 15:49:07 +01:00
Takashi Iwai f9afed1f7f ALSA: hda - Apply mic-mute LED fixup for new HP laptops
It's mostly harmless to apply it for new models even if they have no
mic mute LED (just toggling an unused GPIO pin).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-06 12:39:06 +01:00
Olof Johansson bda6f8e6cd ARM: tegra: Common Clock Framework rework
Tegra already supports the common clock framework, but had issues:
 
 1) The clock driver was located in arch/arm/mach-tegra/ rather than
    drivers/clk/.
 
 2) A single "Tegra clock" type was implemented, rather than separate
    clock types for PLL, mux, divider, ... type in HW.
 
 3) Clock lookups by device drivers were still driven by device name
    and connection ID, rather than through device tree.
 
 This pull request solves all three issues. This required some DT changes
 to add clocks properties, and driver changes to request clocks more
 "correctly". Finally, this rework allows all AUXDATA to be removed from
 Tegra board files, and various duplicate clock lookup entries to be
 removed from the driver.
 
 This pull request is based on the previous pull request, with tag
 tegra-for-3.9-cleanup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRCYtBAAoJEMzrak5tbycxKb8P/0cXt2X7mPfoApWV96bI2c9h
 VE1wZYREcq0Au3hiNuMmPp1Nwous2zvrXRKXMvLoQi42KwpvZlFjlyn8+xACKmxO
 okSJ+aXETzlGh85l5RlnFJMgq181Kn0nDhN5Iwy0FUEJ8/oqdS8fEz5mwQlHflX1
 CLaquDVr/edr8LffvsFlxtSmeYNvZ2jYkSgroWeDhVR5Np1/LUCyh5y3edjVl/es
 B0/keuZ2fnYZnEfqLTpBEARYDBimymuu8gIoHK5nvtz3d/GGu92sVeda4LuHt8eH
 1N+f41ceDR2JG/MIJbLr6PGYmCkAGSM/5Vcfa33G+A7GQT0EVb8jLozGCdrCjaEG
 OM33pN5wtv1M9gTLR9swITBWhbTpRWaHnXeZQF7ttaV8dvr/fuOzWBw47k8Jw0FJ
 zjGta66kwW7WkT3HDNoM2RRzm9dlJr1xdHOzAaVJnX3VHtHcIvYzDi90Xv9Nn46D
 E/qIpExmL4rMrb2+4MxT9CdbfzdBSmsnlRFoWZTIM1NPxA/97i7oAyYVAJ34LCNx
 xWqwimhXK14LzGffpSHm9CSz8DHNbehDZRMQD0jGYMn61PFtDB+E/oEq5AEqneuC
 KDht3Qdx/mPzJQPE8WV3d5FxeXfXDjj203x/i6x8TOdH8Bt4aoK9ajvPYBpA+2aE
 4fPJIobLHGYN/F+GF1VJ
 =s9hz
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.9-soc-ccf' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc

From Stephen Warren:
ARM: tegra: Common Clock Framework rework

Tegra already supports the common clock framework, but had issues:

1) The clock driver was located in arch/arm/mach-tegra/ rather than
   drivers/clk/.

2) A single "Tegra clock" type was implemented, rather than separate
   clock types for PLL, mux, divider, ... type in HW.

3) Clock lookups by device drivers were still driven by device name
   and connection ID, rather than through device tree.

This pull request solves all three issues. This required some DT changes
to add clocks properties, and driver changes to request clocks more
"correctly". Finally, this rework allows all AUXDATA to be removed from
Tegra board files, and various duplicate clock lookup entries to be
removed from the driver.

This pull request is based on the previous pull request, with tag
tegra-for-3.9-cleanup.

* tag 'tegra-for-3.9-soc-ccf' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (31 commits)
  clk: tegra30: remove unused TEGRA_CLK_DUPLICATE()s
  clk: tegra20: remove unused TEGRA_CLK_DUPLICATE()s
  ARM: tegra30: remove auxdata
  ARM: tegra20: remove auxdata
  ASoC: tegra: remove auxdata
  staging: nvec: remove use of clk_get_sys
  ARM: tegra: paz00: add clock information to DT
  ARM: tegra: add clock properties to Tegra30 DT
  ARM: tegra: add clock properties to Tegra20 DT
  spi: tegra: do not use clock name to get clock
  ARM: tegra: remove legacy clock code
  ARM: tegra: migrate to new clock code
  clk: tegra: add clock support for Tegra30
  clk: tegra: add clock support for Tegra20
  clk: tegra: add Tegra specific clocks
  ARM: tegra: define Tegra30 CAR binding
  ARM: tegra: define Tegra20 CAR binding
  ARM: tegra: move tegra_cpu_car.h to linux/clk/tegra.h
  ARM: tegra: add function to read chipid
  ARM: tegra: fix compile error when disable CPU_IDLE
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/mach-tegra/board-dt-tegra20.c
	arch/arm/mach-tegra/board-dt-tegra30.c
	arch/arm/mach-tegra/common.c
	arch/arm/mach-tegra/platsmp.c
	drivers/clocksource/Makefile
2013-02-05 12:13:10 -08:00
Chris Rattray 1a78624323 ASoC: wm2200: Provide platform data for MICBIAS configuration
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-05 15:53:07 +00:00
Charles Keepax 1f88eb0f06 ASoC: soc-compress: Add support for not memory mapped DSPs
The ASoC compressed API did not implement the copy callback in its
compressed ops which is required for DSPs that are not memory mapped.

This patch creates a local copy of the compress ops for each runtime and
modifies them with a copy callback as appropriate.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-05 13:55:52 +00:00
Peter Ujfalusi a92b53179d ASoC: omap-pcm: No need to set constraint at open time
The same constraint is going to be set in the snd_dmaengine_pcm_open()
function, so there is no need to set it here as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-05 13:55:24 +00:00
Takashi Iwai 2faea5274f Merge branch 'for-linus' into for-next
Merge pending fixes that haven't pulled into 3.8.
2013-02-05 14:48:03 +01:00
David Henningsson 05dc0fc9d0 ALSA: hda - detect jacks on VT1708 even when no streams are active
These days, GUIs such as Gnome sound settings want to be able to
show the correct jack status even when no streams are currently
running. I doubt this gives any measurable difference in power,
but if it does, the "Jack Detect" control can still be used to
turn polling off.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05 12:17:31 +01:00
David Henningsson f672f65a1c ALSA: hda - Fix phantom jacks on VT1708
The VT1708 has no unsol event capability, and polling is set using
the "Jack Detect" alsamixer control. In order not to create
phantom Jack controls, temporary enable jackpoll during build_controls.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05 12:17:24 +01:00
Olof Johansson 5b399db0b7 Merge branch 'next/cleanup-header' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
From Kukjin Kim:
AS I commented, this makes <mach/*.h> local so that they could be removed.

* 'next/cleanup-header' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (26 commits)
  ARM: S3C64XX: Fix missing header error with CONFIG_CPU_IDLE enabled
  ARM: S3C64XX: make regs-syscon-power.h local
  ARM: S3C64XX: make regs-sys.h local
  ARM: S3C64XX: make regs-srom.h local
  ARM: S3C64XX: make regs-modem.h local
  ARM: S3C64XX: make regs-gpio-memport.h local
  ARM: S3C64XX: make crag6410.h local
  ARM: S3C24XX: remove dsc.c and make regs-dsc.h local
  ARM: S3C24XX: remove idle.h
  ARM: S3C2412: cleanup regs-s3c2412.h
  ARM: S3C2416: remove regs-s3c2416-mem.h and regs-s3c2416.h
  ARM: S3C24XX: make vr1000-cpld.h, vr1000-irq.h and vr1000-map.h local
  ARM: S3C24XX: make otom-map.h local
  ARM: S3C24XX: make osiris-cpld.h and osiris-map.h local
  ARM: S3C24XX: make h1940.h and h1940-latch.h local
  ARM: S3C24XX: make gta02.h local
  ARM: S3C24XX: make bast-cpld.h, bast-irq.h and bast-map.h local
  ARM: S3C24XX: make anubis-cpld, anubis-irq and anubis-map local
  ARM: SAMSUNG: cleanup mach/gpio-fns.h gpio-track.h and gpio-nrs.h
  ARM: SAMSUNG: cleanup mach/regs-audss.h file
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-02-04 21:49:29 -08:00
Mark Brown cf17c83c4a ASoC: wm_adsp: Use asynchronous I/O to write firmware and coefficients
Allow the regmap API to use asynchronous I/O where supported to minimise
the delay between transfers, reducing firmware download times.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 19:52:35 +00:00
Chris Rattray 0d2b642252 ASoC: wm2200: correct IN2L and IN3L digital mute
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-02-04 18:44:27 +00:00
Hebbar Gururaja e2e8bfdf61 ASoC: tlv320aic3x: Convert mic bias to a supply widget
Convert MicBias widgets to supply widget.

On tlv320aic3x, Mic bias power on/off shares the same register bits
with output mic bias voltage.  So, when power on mic bias, we need
reclaim it to voltage value.

Provide a new platform data so that the micbias voltage can be sent
according to board requirement. Now since tlv320aic3x codec driver
is DT aware, update dt files and functions to handle this new
"micbias-vg"  platform data.

Because of sharing of bits, when enabling the micbias, voltage also
needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD
macro to create an event to handle this.

Since micbias is converted to supply widget, updated machine drivers as
well.

This change is runtime tested on da850-evm with audio loopback
(arecord|aplay) for confirmation.

Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:35:19 +00:00
Bo Shen 151edfc757 ASoC: sam9g20_wm8731: disable clock and correct sequence when unload
disable clock and correct sequence when unload

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:34:14 +00:00
Bo Shen 69706028b9 ASoC: atmel_ssc_dai: correct sequence when unload
correct the sequence when unload this module

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:34:14 +00:00
Bo Shen e08b273c38 ASoC: atmel_ssc_dai: remove error set private data
ssc private data has been set in ssc driver, this cause the error
private data set to ssc, remove it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:34:14 +00:00
Bo Shen d8976cfd82 ASoC: atmel_pcm: make it buildable as module
When build as module, it reports following error, using this patch
fix it

sound/soc/atmel/atmel-pcm-pdc.c:387: error: redefinition of 'atmel_pcm_pdc_platform_register'
sound/soc/atmel/atmel-pcm.h:95: note: previous definition of 'atmel_pcm_pdc_platform_register' was here
sound/soc/atmel/atmel-pcm-pdc.c:393: error: redefinition of 'atmel_pcm_pdc_platform_unregister'
sound/soc/atmel/atmel-pcm.h:99: note: previous definition of 'atmel_pcm_pdc_platform_unregister' was here

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:34:13 +00:00
Ryo Tsutsui 01f58153ae ASoC: arizona: Fixed a bug in FLL fractional calculation
Previously arizona_calc_fll() was checking if the target frequency is
exactly divisible by reference frequency, but should have been product
of the ratio and the reference frequency.

Also scale down the Lamba and Theta coefficients be under 16-bits in
order to match the registers.

Signed-off-by: Ryo Tsutsui <ryo.tsutsui@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-02-04 18:29:04 +00:00
Takashi Iwai 24f3cede59 ALSA: hda - Add new Kconfig CONFIG_SND_HDA_CODEC_CA0132_DSP
... to be less confusing for the update path.

This new kconfig will choose CONFIG_SND_HDA_DSP_LOADER, which is
basically a device-independent feature in hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-04 18:30:49 +01:00
Chris Rattray 4c97e8fedf ASoC: wm2200: Add Rx ANC input select control
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 10:51:46 +00:00
Takashi Iwai edac894389 ALSA: aloop: Fix Oops while PM resume
snd-aloop driver has no proper PM implementation, thus the PM resume
may trigger Oops due to leftover timer instance.  This patch adds the
missing suspend/resume implementation.

Reported-and-tested-by: El boulangero <elboulangero@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-04 10:28:15 +01:00
Anssi Hannula 20608731f4 ALSA: hda - Fix default multichannel HDMI mapping regression
Commit d45e6889ee ("ALSA: hda - Provide
the proper channel mapping for generic HDMI driver") added support for
custom channel maps in the HDA HDMI driver. Due to a mistake in an
'if' condition the custom map is always used even when no such map has
been set. This causes incorrect channel mapping for multichannel audio
by default.

Pass per_pin->chmap_set to hdmi_setup_channel_mapping() as a parameter
so that it can use it for detecting if a custom map has been set instead
of checking if map is NULL (which is never the case).

Reported-by: Staffan Lindberg <pike@xbmc.org>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-04 10:26:44 +01:00
Takashi Iwai 2ad779b732 ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()
If the driver detects and invalid ELD, it gives an open error.
But it forgot to release the assigned pin, converter and spdif ctls
before returning.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01 14:01:27 +01:00
Wang Xingchao 4a7c516bf0 ALSA - HDA: New PCI ID for Haswell ULT
Add new PCI ID 0x0a0c for Haswell ULT platform.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01 12:57:01 +01:00
Takashi Iwai 8058e14259 Merge branch 'usb-audio-fix' of git://git.alsa-project.org/alsa-kprivate into for-linus 2013-02-01 07:22:47 +01:00
Vitaliy Kulikov 4e637c6e09 ALSA: hda - add support for IDT 92HD95 HDA codec
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01 07:19:36 +01:00
Clemens Ladisch 7da5804648 ALSA: usb-audio: fix Roland A-PRO support
The quirk for the Roland/Cakewalk A-PRO keyboards accidentally used the
wrong interface number, which prevented the driver from attaching to the
device.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.37+ <stable@vger.kernel.org>
2013-01-31 21:21:59 +01:00
Lee Jones 9fc4cd8281 ASoC: Ux500: Fix build error pertaining to missing include file
Some compilers complain when building sound for MOP500:

sound/soc/ux500/mop500.c:27:27:
        fatal error: mop500_ab8500.h: No such file or directory

That file is actually in the local directory rather than include.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 20:37:05 +08:00
R. Chandrasekar 5b1d3c3472 ASoC: Samsung: I2S: Add support for runtime S2R
This patch adds runtime suspend to resume support for I2S.
I2S clk is disabled at suspend and enabled at resume.

Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 15:35:09 +08:00
Alexey Galakhov 58f5a7151e ASoC: samsung: Fix compilation error on S3C2440
The commit a08485d8 ("ASoC: Samsung: Do not register samsung audio dma
device as pdev") introduced compilation error.

Combination of CONFIG_CPU_S3C2440 and CONFIG_SND_S3C24XX_I2S
caused undefined symbols 's3c_i2sv2_register_dai' and 's3c2412_i2s_dai'
in sound/soc/samsung/s3c24xx-i2s.c.

This patch fixes the problem and makes S3C2440 I2S usable again. It does
not affect S3C2412 (aka I2S-v2).

Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 14:48:39 +08:00
Mark Brown 3f3af6eeff ASoC: wm2000: Expose ANC gain adjustment
No TLV information since it's not actually a direct gain control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 12:32:54 +08:00
Mark Brown 8e9bb423a2 ASoC: wm2000: Lock state machine updates
Need to ensure we don't get confused by simultaneous updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-31 12:18:57 +08:00
Mark Brown 31522764c6 ASoC: wm_adsp: Fix support for firmware switching on DSP2 and higher
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-30 20:11:01 +08:00
Kuninori Morimoto 8c2d6a9f9c ASoC: clock gating is decided by bool on snd_soc_of_parse_daifmt()
ASoC clock gate settings are continuous/gated only.
This patch decides it as bool, then, gated clock will be default.
Special thanks to Stephen

Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-30 16:42:31 +08:00
Benoît Thébaudeau 06378da45d ASoC: tlv320aic3x: Remove mono support
Playing a mono stream on the TLV320AIC3x results in too fast playback rate.

Remove mono support so that mono streams can be played correctly on this codec.

Tested with imx-ssi (i.MX25) and TLV320AIC3104.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-30 10:15:21 +08:00
Takashi Iwai 9ddf1aeb21 ALSA: hda - Fix non-snoop page handling
For non-snoop mode, we fiddle with the page attributes of CORB/RIRB
and the position buffer, but also the ring buffers.  The problem is
that the current code blindly assumes that the buffer is contiguous.
However, the ring buffers may be SG-buffers, thus a wrong vmapped
address is passed there, leading to Oops.

This patch fixes the handling for SG-buffers.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29 18:18:00 +01:00
Antonio Ospite aa53f98674 ALSA: usb: cosmetics, remove a leading space
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29 15:11:13 +01:00
Antonio Ospite febd1cc438 ALSA: caiaq: fix use of MODULE_SUPPORTED_DEVICES()
It looks like MODULE_SUPPORTED_DEVICES() is not implemented yet, but
still, having the entries in the list consistently separated by commas
and with balanced parenthesis won't hurt.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29 15:10:57 +01:00
Jiri Kosina 617677295b Merge branch 'master' into for-next
Conflicts:
	drivers/devfreq/exynos4_bus.c

Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
2013-01-29 10:48:30 +01:00
Takashi Iwai f748abcc5b ALSA: hda - Enable LPIB delay count for Poulsbo / Oaktrail
Currently we use LPIB forcibly for both playback and capture for
Poulsbo and Oaktrail devices, and this seems rather problematic.
The recent fix for LPIB delay count seems working well with these
devices, so let's enable it instead.

Reported-by: Martin Weishart <martin.weishart@telosalliance.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29 10:15:35 +01:00
Padmavathi Venna 313367e7bf ASoC: Samsung: Update Kconfig for I2S,SPDIF and PCM audio
Update Kconfig file to enable I2S,PCM audio for wm8994 and spdif on all
samsung platforms.

Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 15:36:28 +08:00
Padmavathi Venna 28a4805833 ASoC: SMDK: WM8994: Add device tree support for machine file
Add the basic device tree based lookup.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 15:36:28 +08:00
Padmavathi Venna 40476f6189 ASoC: samsung: Add DT support for i2s
Add support for device based discovery.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 12:47:46 +08:00
Prashant Gaikwad 79cf5918aa ASoC: tegra: remove auxdata
Configlink clock information is added to device tree. Get the clocks
using device node. Remove AUXDATA.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:33 -07:00
Prashant Gaikwad 61fd290d21 ARM: tegra: migrate to new clock code
Migrate Tegra clock support to drivers/clk/tegra, this involves
moving:
1. definition of tegra_cpu_car_ops to clk.c
2. definition of reset functions to clk-peripheral.c
3. change parent of cpu clock.
4. Remove legacy clock initialization.
5. Initialize clocks using DT.
6. Remove all instance of mach/clk.h

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: use to_clk_periph_gate().]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:07 -07:00
Mark Brown 06dc374c70 Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp
Conflicts:
	sound/soc/codecs/wm_adsp.c
2013-01-29 00:51:05 +08:00
Mark Brown 2d30b5751d ASoC: wm_adsp: Ensure ADSP2 DMAs are quiesced when DSP is halted
Maximise robustness for the widest range of firmwares by ensuring the DSP
is in a consistent state when halted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29 00:49:09 +08:00
David Henningsson 664389dbd5 ALSA: hda - Fix powermap for external mics on IDT codecs
This patch fixes a regression of the external mic not working on
HP Probook 4520s.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-28 11:33:01 +01:00
David Henningsson fcd8f3b1d4 ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5
This patch enables internal mic input on the machine.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1107477
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-28 09:50:50 +01:00
Shawn Guo 1927661b17 ASoC: fsl: fix snd-soc-imx-pcm module build
When building modules with CONFIG_SND_IMX_SOC=m in imx_v6_v7_defconfig,
we will see the following link error.

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

The module snd-soc-imx-pcm is designed to link imx-pcm.o with
imx-pcm-dma.o or imx-pcm-fiq.o depending on if option SND_SOC_IMX_PCM_DMA
or SND_SOC_IMX_PCM_FIQ is enabled.  Both imx-pcm-dma and imx-pcm-fiq
register their own module_platform_driver.  However, these two options
are not mutually exclusive and can be enabled together.  And that's
why we see above multiple init_module definition error.

Instead of having both imx-pcm-dma and imx-pcm-fiq register their
own platform_driver, we should do only once in imx-pcm.c.  Using
platform_device_id to distinguish between imx-pcm-dma and imx-pcm-fiq,
we can run-time call imx-pcm-dma/fiq specific initialization in .probe
hook to have module snd-soc-imx-pcm work for both cases.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-28 14:46:09 +08:00
Shawn Guo 93d7b7622c Revert "ASoC: fsl: fix multiple definition of init_module"
This reverts commit 25b8d31488.

While the commit fixes multiple init_module definition error with
module build, it breaks build when both imx-pcm-fiq and imx-pcm-dma
are built in as below.

  LD      sound/soc/fsl/snd-soc-fsl-ssi.o
  LD      sound/soc/fsl/snd-soc-fsl-utils.o
  LD      sound/soc/fsl/snd-soc-imx-ssi.o
  LD      sound/soc/fsl/snd-soc-imx-audmux.o
  LD      sound/soc/fsl/snd-soc-imx-pcm-fiq.o
  LD      sound/soc/fsl/snd-soc-imx-pcm-dma.o
  LD      sound/soc/fsl/snd-soc-eukrea-tlv320.o
  LD      sound/soc/fsl/snd-soc-imx-sgtl5000.o
  LD      sound/soc/fsl/snd-soc-imx-mc13783.o
  LD      sound/soc/fsl/built-in.o
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_free':
imx-pcm.c:(.text+0x464): multiple definition of `imx_pcm_free'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0x1a8): first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `snd_imx_pcm_mmap':
imx-pcm.c:(.text+0x35c): multiple definition of `snd_imx_pcm_mmap'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0xa0): first defined here
sound/soc/fsl/snd-soc-imx-pcm-dma.o: In function `imx_pcm_new':
imx-pcm.c:(.text+0x3dc): multiple definition of `imx_pcm_new'
sound/soc/fsl/snd-soc-imx-pcm-fiq.o:imx-pcm-fiq.c:(.text+0x120): first defined here
make[4]: *** [sound/soc/fsl/built-in.o] Error 1

Let's revert the commit and find a proper fix for multiple init_module
definition error later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-28 14:46:09 +08:00
Clemens Ladisch d56268fb10 ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices
Commit 23caaf19b1 (ALSA: usb-mixer: Add support for Audio Class v2.0)
forgot to adjust the length check for UAC 2.0 feature unit descriptors.
This would make the code abort on encountering a feature unit without
per-channel controls, and thus prevented the driver to work with any
device having such a unit, such as the RME Babyface or Fireface UCX.

Reported-by: Florian Hanisch <fhanisch@uni-potsdam.de>
Tested-by: Matthew Robbetts <wingfeathera@gmail.com>
Tested-by: Michael Beer <beerml@sigma6audio.de>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: 2.6.35+ <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-27 10:22:56 +01:00
Takashi Iwai 257c2a02a8 ASoC: Updates for v3.8-rc4
The usual set of driver updates, nothing too thrilling in here - one
 core change for the regulator bypass mode which was just not doing the
 right thing at all and a bunch of driver specifics.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ/k4iAAoJELSic+t+oim9vGoP+wVfKgLrhZFl8N/MN4oGtqIH
 jsirqWaGHURajrQP09JOI0dpQVzHIOIZZrGQxROErCdpD+bykEVFyR1PHejmr1m/
 3Et7HQ+zXHoNycvFj1Bmd800veZC/GOCGXK28fm1VNzVJtYSn4TEebeEsceSL2Hy
 DCBMMhhgnmVuhD9UxwjzJWE36c20jeaTuaBKygnByf4J1j6Y29zR6hNbGLhKD2WC
 fKLy2aC7DtZQjrJF43hK6RIvKvZUeKtNC01vGRYkABnydAI+gPmT+oYO1OgtsUb6
 2Pqb/w35HWYzE1yZErbvhXZLHHfhYDfNOojOpr2AUida7QI42yRVtUpXqQwER2WU
 dpFt9XEjXX0fWsOV6ETKYPpJ6iWuJj9ZVqxjjOMI4Hqarb/PAPpsocjcKIOc8yOm
 PQwajZDQ9O9muMvUs42YKBpVtiFUE3uAx4dv30SvHl3lYGj7r/xLsvpiNo0aJzw2
 GQekVOkGxmHd8Myc7V3yuxibANWg3hRONJpBDpXplpP/1qxWsd/G8ZLm3kUgxBqi
 Y76tGEWUBOAY98/oudciskwEXKV0PQHWv17O75jYvIGlj11UzapahJmSVXZ4Dn8/
 i5cG7tvStJ6H1CzKFPoMD1rMwDpcjq0jOwACoHapGF1mil8ArsWoCtjdpLQxFkGN
 cRs+jfUAZzL3qlIzJoRK
 =wG3s
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.8-rc4

The usual set of driver updates, nothing too thrilling in here - one
core change for the regulator bypass mode which was just not doing the
right thing at all and a bunch of driver specifics.
2013-01-27 10:20:22 +01:00
Michal Bachraty dde109fb46 ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback
u32 rotate = (32 - word_length) / 4;
This implementation is wrong, but it works only for 16, or 32 bit audio data.
(rotation for 16 or 32 bit is same as in code I present) Mcasp rotated data in
4 bits (max value 0x7)and then masks them . That data are sended to i2s bus.
For 24 bit or 20 bit or other data formats, this code rotates data badly and
you hear somethink like noise.  You need to use
u32 rotate = (word_length / 4) & 0x7;
to proper data rotation.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27 14:14:46 +08:00
Kuninori Morimoto a7930ed458 ASoC: add snd_soc_of_parse_daifmt() for DeviceTree
This patch adds snd_soc_of_parse_daifmt() and supports below style on DT.

        [prefix]format = "i2c";
        [prefix]clock-gating = "continuous";
        [prefix]bitclock-inversion;
        [prefix]bitclock-master;
        [prefix]frame-master;

Each driver can use specific [prefix]
(ex simple-card,cpu,dai,format = xxx;)

This sample will be
SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CONT |
SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-27 11:41:54 +08:00
Dan Carpenter 0099d24c6b ASoC: dwc: fix support for more than two channels
There were missing break statements so everything used
TWO_CHANNEL_SUPPORT.

Also I added a return statement to silence a GCC warning:

	sound/soc/dwc/designware_i2s.c: In function ‘dw_i2s_hw_params’:
	sound/soc/dwc/designware_i2s.c:236:32: warning: ‘ch_reg’ may be
		used uninitialized in this function
		[-Wmaybe-uninitialized]

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 15:37:09 +08:00
Padmavathi Venna 2d77828d99 ASoC: Samsung: Add I2S S/W RST in startup function
I2S module need to be reset after S2R. Keeping the S/W rst
control part in resume didn't help in playing audio after resume.
So this patch adds S/W RST control part in startup function which
gets triggered for every new audio stream playback.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: R. Chandrasekar <rcsekar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 15:24:51 +08:00
Greg Kroah-Hartman 422d26b6ec Merge 3.8-rc5 into driver-core-next
This resolves a gpio driver merge issue pointed out in linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 21:06:30 -08:00
Mark Brown 7480800ea6 ASoC: wm_adsp: Accept 0 as a parameter block address
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 11:39:44 +08:00
Mark Brown 36e8fe9901 ASoC: wm_adsp: Add speaker Tx as a firmware option
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 11:39:42 +08:00
Greg Kroah-Hartman 9f9cba810f Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 13:27:36 -08:00
Takashi Iwai 86b2723725 ALSA: Make snd_printd() and snd_printdd() inline
Because currently snd_printd() and snd_printdd() macros are expanded
to empty when CONFIG_SND_DEBUG=n, a compile warning like below
appears sometimes, and we had to covert it by ugly ifdefs:
  sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
  sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]

For "fixing" these issues better, this patch replaces snd_printd() and
snd_printdd() definitions with empty inline functions instead of
macros.  This should have the same effect but shut up warnings like
above.

But since we had already put ifdefs, changing to inline functions
would trigger compile errors.  So, such ifdefs is removed in this
patch.

In addition, snd_pci_quirk name field is defined only when
CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
snd_printdd() argument triggers the build errors, too.  For avoiding
these errors, introduce a new macro snd_pci_quirk_name() that is
defined no matter how the debug option is set.

Reported-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-25 18:32:14 +01:00
Takashi Iwai f4f678d222 ALSA: hda - Enable power down of unused widgets for IDT codecs
IDT codecs can work well with this new feature, so let's enable it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 18:02:43 +01:00
Takashi Iwai 55196fffc9 ALSA: hda - Implement path-based power filter to the generic parser
This patch adds a better power filter hook for powering down unused
widgets in the generic parser.

The feature is enabled by setting hda_gen_spec.power_down_unused
flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 17:55:52 +01:00
Takashi Iwai 9040d102da ALSA: hda - Add snd_hda_check_power_state() helper function
... for small refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 17:47:17 +01:00
Takashi Iwai b9c590bbf1 ALSA: hda - Synchronize the power state at the end of codec init
Put the power state synchronization at the end of the parsing of
codec.  This is necessary when the power filter is changed during the
codec probe.  Since the first power-up sequence is performed without
the special filter, all widgets are supposed to be ON at this point.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 17:32:48 +01:00
Takashi Iwai 9419ab6b72 ALSA: hda - Add power state filtering
Add a hook to struct hda_codec for filtering the target power state of
each widget when powering up/down.  The current hackish EAPD check is
implemented as the default hook pointer, too.

This allows codec drivers to implement own power filter.  In the
upcoming changes, the generic parser will have the better power filter
based on the active paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 17:23:35 +01:00
Takashi Iwai 25368c47ae ALSA: hda/via - Fix wrong checks of power state bits
AC_VERB_GET_POWER_STATE returns the combined bits of the actual state
and the target state.  Thus, comparing the obtained value directly
with the target value can't work.  The value has to be shifted and
masked properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 17:14:35 +01:00
Takashi Iwai 7dddf2aed8 ALSA: hda - Fix wrong arguments for path deactivation checks
The arguments to call is_active_nid() in activate_amp() were swapped,
and this resulted in the muted amp on some SPDIF output pins.

Also, the index to be passed to is_active_nid() must be idx_to_check.
Otherwise it checks the wrong connection in the case of implicit aamix
connection paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-24 16:31:35 +01:00
Sachin Kamat ec05cc554e ASoC: tegra: Staticize some functions in tegra30_i2s.c
'tegra30_i2s_startup' and 'tegra30_i2s_shutdown' are used only in this file and
hence made static. Fixes the following sparse warnings:
sound/soc/tegra/tegra30_i2s.c:74:5: warning:
symbol 'tegra30_i2s_startup' was not declared. Should it be static?
sound/soc/tegra/tegra30_i2s.c:101:6: warning:
symbol 'tegra30_i2s_shutdown' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:17 +08:00
Sachin Kamat ecb2c17434 ASoC: tegra: Use NULL instead of 0 for pointers
Fixes the following sparse warnings:
sound/soc/tegra/tegra30_ahub.c:583:16: warning:
Using plain integer as NULL pointer
sound/soc/tegra/tegra30_ahub.c:600:16: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:16 +08:00
Sachin Kamat d58579e3c3 ASoC: tegra20_ac97: Remove __devinitconst attribute
__devinitconst has been removed from the kernel and gives
the following build errors:
sound/soc/tegra/tegra20_ac97.c:460:58: error: Expected ; at end of declaration
sound/soc/tegra/tegra20_ac97.c:460:58: error: got __devinitconst

Cc: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:15 +08:00
Sachin Kamat b10fedf892 ASoC: tegra_wm9712: Remove __devinitconst attribute
This has been removed from the kernel recently and gives following build errors:
sound/soc/tegra/tegra_wm9712.c:155:58: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__devinitconst’
sound/soc/tegra/tegra_wm9712.c:165:21: error:
‘tegra_wm9712_of_match’ undeclared here (not in a function)

Cc: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:55:15 +08:00
Charles Keepax 202c8f7082 ASoC: soc-compress: Initialise delayed work to power down audio
Delayed work was scheduled but not initialised, this patch adds the
actual work and initialises it.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:43 +08:00
Charles Keepax 15e2e6194a ASoC: soc-compress: Serialise compressed ops
Use the pcm_mutex to serialise the compressed ops.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:34 +08:00
Charles Keepax 8c3d2aa4cf ASoC: soc-compress: Add missing brackets around else
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 18:53:18 +08:00
Mark Brown 33e7546e19 ASoC: wm2000: Expose some additional registers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 15:59:14 +08:00
Padmavathi Venna 7c62eebbf7 ASoC: samsung: Rename samsung i2s secondary device name
All Samsung SoCs has max 3 i2s controllers. So the i2s secondary fifo
interface device id was named as samsung-i2s.4. Renaming this to
"samsung-i2s-sec" to support device tree in i2s driver.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:40:13 +08:00
Chris Rattray 0098389564 ASoC: wm2200: Set system clock control register is adsp structs
Allows ADSP control code to set the dsp clock rate to match the
sys clock rate.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 14:03:23 +08:00
Takashi Iwai 5397145f4f ALSA: hda - Add auto-mute support to PB desktop
Using the new chained_before flag, we can correct the headphone jack
detection capability easily over the existing ALC880 6stack model
(which disables the jack detection intentionally for compatibility
reason).

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 18:25:11 +01:00
Takashi Iwai f7c0bfa060 Merge branch 'for-linus' into for-next
Merge the 3.8 devel branch for correcting the newly added PB desktop
fixup with the automute support.
2013-01-23 18:25:00 +01:00
Takashi Iwai 0712eea349 ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880
A Packard-Bell desktop machine gives no proper pin configuration from
BIOS.  It's almost equivalent with the 6stack+fp standard config, just
take the existing fixup.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 18:24:05 +01:00
Takashi Iwai 1f57825077 ALSA: hda - Add chained_before flag to the fixup entry
Sometimes we want to call a fixup after applying other existing
fixups, but currently the fixup chain mechanism allows only the call
the others after the target fixup.  This patch adds a new flag,
chained_before, to struct hda_fixup, for allowing the chained call
before the current execution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 18:10:10 +01:00
Mark Brown 338c5188f6 ASoC: wm_adsp: Correct handling of some coefficeint blocks
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 00:42:27 +08:00
Takashi Iwai 3e367f155f ALSA: hda - Small code refactoring about path re-initialization
Introduce a helper function to do the same thing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 17:07:23 +01:00
Takashi Iwai e4a395e781 ALSA: hda - Fix missing path between aamix and outputs in AD codecs
AD1988 family and AD1882 codecs have another mixer widget (0x21)
between the analog-loopback mixer widget (0x20) and the actual
outputs.  Due to this hole, the analog-loopbacks aren't sent properly
to the output pins.

As a band-aid fix, introduce another fields holding the aamix merge
path, and activate it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 17:00:31 +01:00
Takashi Iwai 31614bb89b ALSA: hda - Fix inconsistent pin states after resume
The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a
module parameter] introduced the polling jack detection code, but it
also moved the call of snd_hda_jack_set_dirty_all() in the resume path
after resume/init ops call.  This caused a regression when the jack
state has been changed during power-down (e.g. in the power save
mode).  Since the driver doesn't probe the new jack state but keeps
using the cached value due to no dirty flag, the pin state remains
also as if the jack is still plugged.

The fix is simply moving snd_hda_jack_set_dirty_all() to the original
position.

Reported-by: Manolo Díaz <diaz.manolo@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 16:05:37 +01:00
Takashi Iwai 0db75790e2 ALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack()
The fixup function is called multiple times before parsing the pins,
so snd_BUG_ON() hits when loaded.  Move it to the proper place in the
if block.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23 13:57:20 +01:00
Takashi Iwai 2cf215bfaa Merge branch 'topic/hda-gen-parser' into for-next
This is a merge of really big changes: the generic parser is heavily
enhanced for handling all cases, based on the former Realtek codec
driver code.  And all codec drivers except for a few ones (CA0132,
HDMI and modem) have been converted to use the new generic driver.

Conflicts:
	sound/pci/hda/patch_realtek.c
2013-01-23 08:34:12 +01:00
Takashi Iwai e152f18027 Merge branch 'for-linus' into for-next
This is a preliminary merge before the upcoming merge of generic parser
branch.
2013-01-23 08:31:34 +01:00
Takashi Iwai 657e1b931d ALSA: hda - Select auto-parser as default for AD codecs
Now all AD codecs have the proper BIOS auto-parser, and we can make
it for default, finally.  (AD1988 already did it because it had the
auto-parser.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 21:20:41 +01:00
Takashi Iwai a928bd2c56 ALSA: hda - Convert some static quirks to fixup codes for AD codecs
Other remaining quirks are mostly resolvable via pincfg fixes, even if
it matters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 21:20:39 +01:00
Takashi Iwai 9ff4bc8f72 ALSA: hda - Rearrange for dropping static quirk codes in AD codec driver
As done for patch_conexant.c, put ifdef ENABLE_AD_STATIC_QUIRKS for
preparing t odrop the static quirk codes in patch_analog.c.

The whole static quirk code can be omitted by commenting out
ENABLE_AD_STATIC_QUIRKS define now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 21:19:38 +01:00
Thierry Reding b25b5aa066 ASoC: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 11:41:58 -08:00
Takashi Iwai 272f3ea317 ALSA: hda - Add SPDIF mux control to AD codec auto-parser
AD codecs have strange implementations for choosing the SPDIF-output
mux source: the digital audio out widget may take the sources from
multiple connections, where 0x01 indicates it's a PCM while others
point ADCs.  It's obviously invalid in the HD-audio spec POV, but it's
somehow convincing, too.  And, to make things more complex, AD1988A
and AD1882 have deeper connection routes that aren't expressed
correctly.

In this patch, the SPDIF mux control is implemented in two ways:
- For easier one like AD1981, AD1983, AD1884 and AD1984, where the
  SPDIF audio out widget takes just two or three sources, we can
  simply implement via the normal input_mux and connection verb
  calls.

- For the complex routes like AD1988A (but not AD1988B) or AD1882, we
  prepare "faked" paths represented statically, and switch the paths
  using these static ones, instead of parsing the routes from the
  widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 16:41:56 +01:00
Takashi Iwai dc870f38e9 ALSA: hda - Combine snd_hda_codec_flush_*_cache() to a single function
Since both snd_hda_codec_flush_amp_cache() and
snd_hda_codec_flush_cmd_cache() are called usually at the same time,
we can simply combine them to a single function,
snd_hda_codec_flush_cache().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 15:25:25 +01:00
Takashi Iwai a836dbf685 ALSA: hda - Fix missing call of cmd flush in capture volume put callback
The capture volume put callback may call the node selection change,
and its actual call won't be triggered unless flushed.  In general,
we always need to call both snd_hda_codec_flush_amp_cache() and
snd_hda_codec_flush_cmd_cache() at the same place...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 15:18:17 +01:00
Takashi Iwai 4bd01e9336 ALSA: hda - Add missing exports to helper functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 15:17:20 +01:00
Takashi Iwai 42875479b2 ALSA: hda - Revive SPDIF mux for IDT/STAC codecs
The stuff that was dropped while transition to the generic parser is
now recovered.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 14:12:44 +01:00
Takashi Iwai 92603c5945 ALSA: hda - Disable HP auto-mute during independent HP mode
Both the HP auto-mute and the independent HP mode conflict with each
other.  Make HP auto-mute disabled (only for the affected HP jack)
during the driver is in HP independent mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 14:12:42 +01:00
Takashi Iwai a607148ff3 ALSA: hda - Set individual name to secondary analog PCM stream
It'd be better to give another name to the secondary (alt) analog PCM
stream, which is dedicated for the independent HP out and extra
inputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 14:12:40 +01:00
Takashi Iwai f2f8be43c5 ALSA: hda - Add aamix NID to AD codecs
The aamix NIDs are also missing for AD codecs.  All AD codecs seem to
have a (more or less) working aamix widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-22 14:12:08 +01:00
Mark Brown a8c136d2eb Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-22 16:26:33 +08:00
Mark Brown 32eca984f6 Merge remote-tracking branch 'asoc/fix/fsl' into tmp 2013-01-22 16:26:21 +08:00
Mark Brown 05780d7771 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-22 16:26:15 +08:00
Mark Brown bc04c93bbc Merge remote-tracking branch 'asoc/fix/arizona' into tmp 2013-01-22 16:26:06 +08:00
Charles Keepax a4cdbec758 ASoC: wm_adsp: Release firmware on error
This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22 16:40:26 +09:00
Charles Keepax f63d944b71 ASoC: wm_adsp: Release firmware on error
This patch correctly releases the firmware if the magic string in the
firmware header does not match.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22 16:27:21 +09:00
Takashi Iwai 42c364ace5 ALSA: hda - Add Conexant CX20755/20756/20757 codec IDs
These are just compatible with other CX2075x codecs.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 16:53:37 +01:00