Commit Graph

14854 Commits

Author SHA1 Message Date
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
Takashi Iwai 2748746f40 ALSA: hda - Add aamix NID to IDT 92HD codecs
IDT codecs have analog-loopback mixer widgets, but we haven't cared
about it, so far.  Let's set them.  This will avoid also possible
wrong routes for the input paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 16:25:18 +01:00
Takashi Iwai 6efcc52653 ALSA: hda - Remove superfluous header inclusions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 16:10:56 +01:00
Takashi Iwai 139611705a ALSA: hda - Enable parsing the independent HP mode as default for VIA codecs
The original VIA codec parser enabled it as default, so let's keep the
behavior as it was.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 15:15:55 +01:00
Takashi Iwai a1e908edcc ALSA: hda - Fix conflicts between Loopback Mixing and Independent HP
This patch eventually fixes two issues:
- Handle the case where the primary output is a headphone and can have
  independent HP mode;
  so far we checked only the case where the headphone is the secondary
  output.

- Fix the conflict of HP independent mode and aamix mode;
  when switched to aamix mode, the DAC might be also switched to
  another widget shared with other outputs.  Then even if we disable
  the DAC for the original output, it doesn't change -- because the
  active route is from another (shared) DAC to HP pin through aamix.
  So, in such a case, we have to prohibit the switch to aamix for HP
  routes.

This fixes issues appearing on VT codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 15:11:25 +01:00
Takashi Iwai f87498b651 ALSA: hda - Check aamix-output paths from other DACs, too
Many codecs provide routes to multiple output pins through an aamix
widget, but most of them do it only from a single DAC.  However, the
current generic parser checks only the aamix paths from the original
(directly bound) DACs through aamix NID, and miss the path:
  primary DAC -> aamix -> target out pin

This patch adds a more check for the routes like the above.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 14:32:53 +01:00
Takashi Iwai 1fa335b0b7 ALSA: hda - Add missing badness evaluation for unresolved paths
When a patch couldn't be resolved in try_assign_dacs() although the
target DAC is expected, we forgot to add a proper badness value but
continued.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 11:47:07 +01:00
Takashi Iwai 9314a5813f ALSA: hda - Set the pin targets after deciding output config
Since fill_and_eval_dacs() may be called repeatedly with different
configurations, setting pinctls at each time there isn't optimal.
We can set it better only once after deciding the output configuration
in parse_output_paths().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 11:09:03 +01:00
Takashi Iwai a769409cf3 ALSA: hda - Improve debug prints for output paths
Print the information of outputs in a bit more details and concisely
in a single place instead of printing the path at each time when
detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 11:08:52 +01:00
Mark Brown b5a8fe439a ASoC: core: Ensure SND_SOC_BYTES writes are from DMA safe memory
With some buses the transfers may DMAed, especially for larger blocks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:49:52 +09:00
Mark Brown c94aa30eda ASoC: arizona: Allow number of channels clocked to be restricted
Place a cap on the number of channels clocks are generated for. This is
intended for use with systems which have the WM5102 master an I2S bus with
multiple data lines.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:47:39 +09:00
Mark Brown 20da6d5ac0 ASoC: wm_adsp: Provide explicit trace of coefficient writes
Helpful for debugging.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:46:35 +09:00
Mark Brown 69485d3e6d Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp 2013-01-21 17:46:16 +09:00
Mark Brown f2c26d48d9 ASoC: arizona: Support clearing clocks
Some systems may wish to support switching between telephony and CD audio
clock rates but this is restricted by enforcement of constraints on the
current DAI clock. Support setting clocks to zero and don't enforce any
constraints in that case in order to facilitate this use case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:38:54 +09:00
Rusty Russell 373d4d0997 taint: add explicit flag to show whether lock dep is still OK.
Fix up all callers as they were before, with make one change: an
unsigned module taints the kernel, but doesn't turn off lockdep.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-01-21 17:17:57 +10:30
Mark Brown f2a93e2a4c ASoC: wm_adsp: Use GFP_DMA for algorithm readback
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:17:30 +09:00
Mark Brown 7881fd0fb3 ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:14:34 +09:00
Mark Brown 25c62f7e70 ASoC: wm_adsp: Make region identification errors more informative
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:13:24 +09:00
Mark Brown 908a5741ab ASoC: wm2200: Implement EQ and LHPF coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:10:25 +09:00
Mark Brown 20fc48632f ASoC: wm5100: Implement DRC, EQ and LHPF coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:09:40 +09:00
Takashi Iwai ec50b4cea6 ALSA: hda - Add fixup for Acer AO725 laptop
Acer AO725 needs the same fixup as AO756.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-19 12:17:54 +01:00
Joe Millenbach 4f73bc4dd3 tty: Added a CONFIG_TTY option to allow removal of TTY
The option allows you to remove TTY and compile without errors. This
saves space on systems that won't support TTY interfaces anyway.
bloat-o-meter output is below.

The bulk of this patch consists of Kconfig changes adding "depends on
TTY" to various serial devices and similar drivers that require the TTY
layer.  Ideally, these dependencies would occur on a common intermediate
symbol such as SERIO, but most drivers "select SERIO" rather than
"depends on SERIO", and "select" does not respect dependencies.

bloat-o-meter output comparing our previous minimal to new minimal by
removing TTY.  The list is filtered to not show removed entries with awk
'$3 != "-"' as the list was very long.

add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
function                                     old     new   delta
chr_dev_init                                 166     170      +4
allow_signal                                  80      82      +2
static.__warned                              143     142      -1
disallow_signal                               63      62      -1
__set_special_pids                            95      94      -1
unregister_console                           126     121      -5
start_kernel                                 546     541      -5
register_console                             593     588      -5
copy_from_user                                45      40      -5
sys_setsid                                   128     120      -8
sys_vhangup                                   32      19     -13
do_exit                                     1543    1526     -17
bitmap_zero                                   60      40     -20
arch_local_irq_save                          137     117     -20
release_task                                 674     652     -22
static.spin_unlock_irqrestore                308     260     -48

Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 16:15:27 -08:00
Takashi Iwai 164a7adac9 ALSA: hda/conexant - Set mixer NID 0x19 for CX20551 codec
Conexant CX20551 codec has a mixer in NID 0x19 and a few outputs have
to take the input through this widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 18:27:29 +01:00
Takashi Iwai cf799aa300 ALSA: hda - Correct more array rooms in hda_gen_spec
Looking through the whole definitions, some fields have inappropriate
array sizes, especially about the capture.  The array assigned to each
input (pin) should have HDA_MAX_NUM_INPUTS entries while the array
assigned to each ADC should have AUTO_CFG_MAX_INS entries.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 16:38:08 +01:00
Takashi Iwai 2a8d53916b ALSA: hda - Fix the wrong adc_idx for capture source
The patch "ALSA: hda - fix wrong adc_idx in generic parser" fixed the
adc_idx for the capture volume and capture switch controls.  But also
modified the adc_idx retrieval for the capture source controls
wrongly.  As multiple capture source controls are created in a single
shot with counts > 1, the id.index doesn't contain the real value.
The real index has to be taken via snd_ctl_get_ioffidx() as in the
original code.

This patch reverts the fixes partially to recover from the
regression.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 16:26:37 +01:00
David Henningsson 3f25dcf691 ALSA: hda - Don't add unnecessary indices on HDMI and SPDIF
If there's one each of HDMI and SPDIF, we should not add an index
on the one that comes second.

[slight code refactoring by tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 15:56:07 +01:00
David Henningsson 8e8db7f123 ALSA: hda - don't compare with yourself in fill_input_pin_labels
Just stumbled over this one while reading the code.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 15:49:04 +01:00
David Henningsson d3d982f744 ALSA: hda - make sure there are enough input labels and paths
I found a codec configuration which had six inputs, so the max of
five was not appropriate.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 15:48:13 +01:00
Takashi Iwai 7513e6dae5 ALSA: hda - Fix speaker pin of FSC Lifebook S7110 laptop
Some BIOS version of FSC Lifebook S7110 laptop seems to give a wrong
default pin config for NID 0x15, which confuses the parser.  Give a
fixup to correct the value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 15:41:34 +01:00
Takashi Iwai 1799cdd51a ALSA: hda - Add boost to line inputs, too
Although I commented that boost volumes would be added only for
line-in and mic pins in the source code, the actual code excludes but
for mic-in.  Fix it to accept the line-ins, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 14:37:16 +01:00
Takashi Iwai 49920427ec ALSA: hda/sigmatel - Add bass speaker support for HP ENVY Spectre XT
The pin configuration for the bass speaker needs to be corrected in a
fixup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 14:34:30 +01:00
Takashi Iwai a90229e051 ALSA: hda - Consolidate cap_sync_hook and capture_switch_hook
Two hooks in hda_gen_spec, cap_sync_hook and capture_switch_hook, play
very similar roles.  The only differences are that the former is
called more often (e.g. at init or switching capsrc) while the latter
can take an on/off argument.

As a more generic implementation, consolidate these two hooks, and
pass snd_ctl_elem_value pointer as the second argument.  If the
secondary argument is non-NULL, it can take the on/off value, so the
caller handles it like the former capture_switch_hook.  If it's NULL,
it's called in the init or capsrc switch case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 14:34:22 +01:00
Takashi Iwai a35bd1e3e6 ALSA: hda - Fix missing call of capture_switch_hook
When a standard capture switch without multiple binding is used, the
call for capture_switch_hook isn't called properly.  Replace the put
ops to add the hook call in that case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 14:02:51 +01:00
David Henningsson e04340375a ALSA: hda - Fix mute led for another HP machine
This machine also has the "HP_Mute_LED_0_A" string in DMI information.

Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1096789
Tested-by: Tammy Yang <tammy.yang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 12:29:10 +01:00
Takashi Iwai 6f7c83afc6 ALSA: hda - Look for boost controls more deeply
In the current generic parser code, we look for the (mic) boost
controls only on input pins.  But many codecs assign the boost volume
to a widget connected to each input pin instead of the input amp of
the pin itself.

In this patch, the parser tries to look through more widgets connected
to the pin and find a boost amp.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 11:07:15 +01:00
Takashi Iwai 8999bf0af0 ALSA: hda - Fix invalid mute in path activation
When an amp in the activation path is associated with mixer controls,
activate_amp() tries to skip the initialization.  It's good, but only
if the mixer really initializes both mute and volume.  Otherwise,
either the mute of the volume is left uninitialized.

This patch adds this missing check and properly initialize the
partially controlled amps in an activation path.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 11:01:33 +01:00
Takashi Iwai c970042c12 ALSA: hda - Unify input label creations in generic parser
There are a few places creating the labels and indices of kctls for
each input pin in the current generic parser code.  This is redundant
and makes harder to maintain.  Let's create the labels and indices at
once and keep them in hda_gen_spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 10:17:30 +01:00
Takashi Iwai 9dba205b48 ALSA: hda - Keep autocfg.input idx value in imux table
Since the imux table entries can be a subset of autocfg.input table,
the indices of these aren't always same.  For passing the proper index
value of autocfg.input at creating input ctl labels (via
snd_hda_autocfg_input_label()), keep the corresponding autocfg.input
idx value in the index field of each imux item, which isn't used in
the generic driver.

Also, this makes easier to check the invalid imux pin for stereo mix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 10:01:15 +01:00
Mark Brown ba3b8cd26d Merge remote-tracking branch 'asoc/topic/adsp' into asoc-wm2200 2013-01-18 17:54:36 +09:00
Chris Rattray 94e205bfb7 ASoC: wm_adsp: Set ADSP1 clock rate to match sys clock
Sets the ADSP1 clock rate to match the system clock
rate. To support this the codec driver provides
details of register containing the system clock
control bits.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 17:46:28 +09:00
Takashi Iwai 8a6c21aee8 ALSA: hda - Fix missing unsol event handler in some codec drivers
This resulted in non-working auto-mute behavior, of course...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18 07:57:46 +01:00
Mark Brown e5ddd30321 ASoC: wm5102: Add controls for firmware selection
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:07:49 +09:00
Mark Brown 82e993fac4 ASoC: wm2200: Add controls for firmware enumeration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:06:26 +09:00
Mark Brown c712326d6c ASoC: wm_adsp: Implement support for coefficeint file format 1
Implement support for a new revision of the coefficeint file format for
ADSP cores.

Since coefficient file format 0 has not been widely deployed and is very
unlikely to ever be used with this driver code support for it has been
removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:02:17 +09:00
Takashi Iwai 36c9db7a1a ALSA: hda - Use generic parser for STAC/IDT codec driver
Finally we reached here.  All codecs driver (except for CA0132, which
has really device-specific requirements) have been converted to use
the generic parser.

This patch appears bigger than others since it also involves with the
code shuffling, but mostly the cut-off of parser codes and adapt to
the generic parser flags.  Most of fixup codecs haven't been changed
but just removed a few unnecessary codes.

The only missing stuff is the SPDIF mux control.  It'll be added again
later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 17:46:13 +01:00
Takashi Iwai 8f0fdc09aa Merge branch 'test/hda-gen-parser' into test/hda-migrate
* test/hda-gen-parser:
  ALSA: hda - Improve naming rule for primary output
  ALSA: hda - Add PCM capture hook to hda_gen_spec
  ALSA: hda - Record all detected ADCs in hda_gen_spec
  ALSA: hda - Move vmaster TLV parsing to snd_hda_gen_parse_auto_config()
  ALSA: hda - Add input jack mode enum controls to generic parser
  ALSA: hda - Give more comments to hda_gen_spec flags
  ALSA: hda - Add suppress_auto_mute flag to hda_gen_spec
  ALSA: hda - Record the current speaker / LO mute status in hda_gen_spec
  ALSA: hda - Properly call automute/switch hooks at init
2013-01-17 16:20:14 +01:00
Takashi Iwai 247d85ee06 ALSA: hda - Improve naming rule for primary output
When the volume or mute control of the primary output is shared with
other (headphone or speaker) outputs, we shouldn't name it as a
specific output type but rather name it with the channel name or a
generic name like "PCM".

Also, this check should be performed individually for the volume and
the mute controls because some codecs may have shared volumes but
separate mute controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 16:18:11 +01:00
Takashi Iwai ac2e87366c ALSA: hda - Add PCM capture hook to hda_gen_spec
Not only PCM playback, a hook for PCM capture would be required for
power controls in codec drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 15:57:10 +01:00
Takashi Iwai 0ffd534eb1 ALSA: hda - Record all detected ADCs in hda_gen_spec
Since the generic parser reduces the ADC list, copy the list of the
all detected ADCs and keep it.

This list can be later referred by the codec driver for finer power
controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 15:53:29 +01:00
Takashi Iwai 7a71bbf310 ALSA: hda - Move vmaster TLV parsing to snd_hda_gen_parse_auto_config()
Add vmaster_tlv[] to hda_gen_spec and store the suggested TLV data
in snd_hda_gen_parse_auto_config().  This allows the codec driver to
correct the TLV data (e.g. mute capability) before actually creating
vmaster instance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 10:25:15 +01:00
Takashi Iwai 29476558de ALSA: hda - Add input jack mode enum controls to generic parser
Just like the jack mode enum ctls for output jacks, add the support
for similar enum ctls for input pins to control the bias Vref.
The new controls will be added when spec->add_in_jack_modes is set
either by the codec driver or by a hint string.

Note that ground and 100% vrefs are excluded from the list for
simplicity, currently.  We may add a new flag to allow them, too.
But I guess it's easier to put a value override in the pinfix in such
a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 09:55:21 +01:00
Takashi Iwai f6655d52a3 ALSA: hda - Minor cleanup/fixes for patch_sigmatel.c fixup transition
- spec->hp_detect has to be overridden in HDA_FIXUP_ACT_PARSE, not in
  PRE_PARSE.
- Remove err == 0 check but return directly -EINVAL from
  stac92xx_parse_auto_config()
- Set spec->default_polarity for 92HD71bxx
- Some code shuffles

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-17 08:49:01 +01:00
Lucas Stach 6995b8cb96 ASoC: tegra: add tegra machine driver using wm9712 codec
This adds a very simple machine driver using the Wolfson wm9712 AC97
codec.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-17 16:02:41 +09:00
Mark Brown 4706ccbbe8 Merge remote-tracking branch 'asoc/fix/arizona' into asoc-arizona
Conflicts:
	sound/soc/codecs/arizona.c
2013-01-17 15:31:54 +09:00
Mark Brown b59e0f82aa ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK
Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than
is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-17 14:36:07 +09:00
Takashi Iwai acc47aafcf ALSA: hda - Give more comments to hda_gen_spec flags
Since we have many bit flags in hda_gen_spec, rearrange in sections
and give more comments there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 18:28:38 +01:00
Takashi Iwai f72706be35 ALSA: hda - Add suppress_auto_mute flag to hda_gen_spec
A new flag to skip the auto-mute handling in the generic parser, just
like suppress_auto_mic flag.  It has to be set before calling
snd_hda_gen_parse_auto_config().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 18:22:37 +01:00
Takashi Iwai 47b9ddb83b ALSA: hda - Record the current speaker / LO mute status in hda_gen_spec
... to be referred by the codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 18:19:50 +01:00
Takashi Iwai a5cc25091c ALSA: hda - Properly call automute/switch hooks at init
... and a little bit of code refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 18:08:55 +01:00
Takashi Iwai ae127005fc Merge branch 'test/hda-gen-parser' into test/hda-migrate
* test/hda-gen-parser:
  ALSA: hda - Make sure fill_all_dac_nids is called for digital only codecs
  ALSA: hda - force different capture controls if amp caps differ
  ALSA: hda - do not add non-existing Mic boost controls
  ALSA: hda - initialize channel counts correctly
  ALSA: hda - fix wrong adc_idx in generic parser
  ALSA: hda - Check array bounds in get_input_path
  ALSA: hda - Add prefer_hp_amp flag to hda_gen_spec
  ALSA: hda - fix OOPS in hda_mark_cmd_cache_dirty
  ALSA: hda - Check pincap while parsing the configuration
2013-01-16 16:25:24 +01:00
David Henningsson 6fc4cb97cb ALSA: hda - Make sure fill_all_dac_nids is called for digital only codecs
Otherwise no PCM will be built for codecs without analog I/O.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 16:24:42 +01:00
David Henningsson 99a5592d6a ALSA: hda - force different capture controls if amp caps differ
Otherwise setting the capture volume for amps will be weird and
inconsistent (it will try to set values outside the range of the
second amp based on capabilities of the first amp).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 16:24:00 +01:00
David Henningsson 02aba55053 ALSA: hda - do not add non-existing Mic boost controls
If the input node does not have any volume capable input amp,
don't add such a control.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 16:22:43 +01:00
Chris Rattray a80cc73428 ASoC: wm2200: correct mixer values and text
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-16 20:47:26 +09:00
Thierry Reding e43fc6af25 ASoC: fsi: Remove __devinitconst
__devinitconst and friends have recently been removed and must not be
used anymore.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 20:28:59 +09:00
David Henningsson c0f3b21643 ALSA: hda - initialize channel counts correctly
Even a single DAC can output two channels, so the channel count
is twice the number of DACs.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 11:57:00 +01:00
David Henningsson a053d1e3c4 ALSA: hda - fix wrong adc_idx in generic parser
We use knew->index for adc_idx when we create "Capture Volume" and
"Capture Switch", so use the same to retrieve adc_idx.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 11:56:50 +01:00
David Henningsson b56fa1ed09 ALSA: hda - Check array bounds in get_input_path
This gives us some additional safety.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 11:56:36 +01:00
Mark Brown c98137bfcb ASoC: arizona: Don't request FLL lock IRQ
We only log the result and since the interrupt triggers on loss of lock
during shutdown this may lead to spurious interrupts during shutdown
delaying the process.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 19:28:59 +09:00
Takashi Iwai ccd7bd3d07 ALSA: hda/ca0132 - Make some symbols static
sound/pci/hda/patch_ca0132.c:387:19: sparse: symbol 'ca0132_voicefx' was not declared. Should it be static?

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 07:56:02 +01:00
Adrian Knoth 49ba4f94bd ALSA: hdsp - Remove obsolete settings functions
With HDSP_TOGGLE_SETTING in place, these functions are no longer
required. Removing them makes the code DRY and considerably shorter.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 07:49:17 +01:00
Adrian Knoth 4833c673de ALSA: hdsp - Use HDSP_TOGGLE_SETTING to alter settings
HDSP_TOGGLE_SETTING and its corresponding functions allow to change
settings in the control register. Instead of using the specialised
functions, use the generic code to make the code DRY.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 07:49:06 +01:00
Adrian Knoth 66d9244ec7 ALSA: hdsp - Implement generic function to toggle settings
The driver contains multiple similar functions that change only a single
bit in the control register, only the bit position varies.

This patch implements a generic function to toggle a certain bit
position that will be used to replace the old code.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 07:48:51 +01:00
Adrian Knoth 0c2bc7c7d8 ALSA: hdsp - Fix detection for RME RPM/Multiface/Digiface ioboxes
The current iobox detection code reportedly fails for various users, so
simply do what the Win32 driver does instead.

Patch originally by Karl Grill <kgrill@chello.at> and then modified to
comply with kernel coding guidelines + current HEAD.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-16 07:48:38 +01:00
Mark Brown 5851cb3daf ASoC: wm2200: Initialise the ADSPs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:25:24 +09:00
Mark Brown 2ce4616e4f Merge remote-tracking branch 'asoc/topic/adsp' into asoc-wm2200 2013-01-16 10:24:08 +09:00
Mark Brown 5e7a7a221f ASoC: wm_adsp: Add initialisation function for ADSP1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:21:57 +09:00
Takashi Iwai ea46c3c87c ALSA: hda - Add prefer_hp_amp flag to hda_gen_spec
Add a new flag to indicate whether HP amp is turned on as default for
speaker or line-outs, and enable this for ALC260 codec, as many
machines with this codec require the HP amp even for speakers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 18:45:53 +01:00
Takashi Iwai dea500c7c6 ALSA: hda/ca0132 - Fix a wrong comma in snd_printdd() call
sound/pci/hda/patch_ca0132.c: In function ‘ca0132_effects_set’:
sound/pci/hda/patch_ca0132.c:3391:2: warning: too many arguments for
  format [-Wformat-extra-args]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:49:56 +01:00
Takashi Iwai 7a527edee4 ALSA: hda/ca0132 - Declare firmware only when really built
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:49:45 +01:00
Takashi Iwai 8ae3124b8f ALSA: hda/ca0132 - Fix possible invalid DMA channel deallocation
... in the error path in dspxfr_image().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:49:38 +01:00
Takashi Iwai 549e8292a1 ALSA: hda/ca0132 - Fix possible NULL dereference
Spotted by smatch,
  sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: potential
  null dereference 'dma_engine'.  (kzalloc returns null)
  sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: we
  previously assumed 'dma_engine' could be null (see line 1857)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:42:15 +01:00
Takashi Iwai 425a7880e8 ALSA: hda/ca0132 - Fix another smatch warning
sound/pci/hda/patch_ca0132.c:1781 dspxfr_one_seg() info: why not
propagate 'status' from dsp_dma_stop() instead of (-5)?

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:41:21 +01:00
Takashi Iwai b645d79619 ALSA: hda/ca0132 - Fix superfluous unsigned check
Fix a warning by smatch,
 sound/pci/hda/patch_ca0132.c:714 dspio_send() warn: always true
 condition '(res >= 0) => (0-u32max >= 0)'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:39:29 +01:00
Takashi Iwai a0c041cb6f ALSA: hda/ca0132 - Use snd_hda_set_pin_ctl() helper again
The recent update of ca0132 driver replaced the pinctl setup to the
direct write via snd_hda_codec_write() again.  This should be covered
by snd_hda_set_pin_ctl() to be safer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:13:31 +01:00
Takashi Iwai 15e4ba666c Revert "ALSA: hda - Add firmware caching to CA0132 codec"
This reverts commit c3b4eea262.

Since the recent firmware loader code supports caching at S3/S4 by
itself, we don't have to handle f/w caching in the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:09:27 +01:00
Ian Minett 406261ce99 ALSA: hda/ca0132: Fix potential init errors and update module description
Handle a potential dma_engine alloc error and fix the possible use of an
uninitialized status variable in dspxfr_one_seg(). Also correct the initial
sampling rate for Mic 1.
Update the module description.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:01:16 +01:00
Ian Minett 441aa6a016 ALSA: hda/ca0132: Shuffle to group together related code
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:01:01 +01:00
Ian Minett e90f29e442 ALSA: hda/ca0132: Code shuffle to group similar functions.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:00:45 +01:00
Ian Minett 44f0c9782c ALSA: hda/ca0132: Add tuning controls
This patch adds the controls used for tuning the DSP effects.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 17:00:31 +01:00
Ian Minett a73d511c48 ALSA: hda/ca0132: Add unsol handler for DSP and jack detection
This patch adds the unsolicited response handler for incoming DSP responses and
jack detection reporting, and routines for reading the incoming DSP response.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 16:59:56 +01:00
Ian Minett 825315bc5b ALSA: hda/ca0132: Add PCM enhancements
Remove the playback PCM open callback.
PCM stream setup and cleanup functions are added for use by PCM callbacks.
Delay stream cleanup if effects are on, to allow time for any effects tail to
finish.
Add the analog capture PCM callbacks.
Change the max channels of analog playback to 6.
Add two new PCMs: AMic2 and What-U-Hear.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 16:59:21 +01:00
Ian Minett a7e76271bd ALSA: hda/ca0132: Add DSP mixer controls and helpers
This patch adds the kcontrols for the DSP effects, playback and recording
source selection.
ca0132_is_vnode_effective() checks whether virtual node settings have
taken effect.
The control change helpers ca0132_pe_switch_set(), ca0132_voicefx_set()
and ca0132_cvoice_switch_set() are added to toggle playback / capture
DSP effects, ca0132_voicefx_info(), _get() and _put() are added for
input path DSP effect value access. The volume helpers are updated to
volume_info(), _get() and _set() to use the virtual nodes.
The redundant headphone and speaker switches and ct_extension function
are removed.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 16:58:12 +01:00
Ian Minett 5aaca44d8d ALSA: hda/ca0132: Init chip, DSP effects and mixer settings
This patch adds the framework to set effect parameters: ca0132_effects_set()
and ca0132_setup_defaults() are general functions for parameter setting and
initializing to default values. dspio_set_param() and dspio_set_uint_param()
are lower-level fns to simplify setting individual DSP parameters via an
SCP buffer transfer to the firmware.
The CA0132 chip parameter init code is added in ca0132_init_params().
In chipio_[write,read]_data(), the current chip address is auto-incremented
if no error has occurred.
ca0132_select_out() selects the current output. If autodetect is enabled,
use headphones (if jack detected) or speakers (if no jack).
ca0132_select_mic() selects the current mic in. If autodetect is enabled,
use exterior mic (if jack detected) or built-in mic (if no jack).
Init digital mic and switch between dmic and amic with ca0132_init_dmic(),
ca0132_set_dmic(). amic2 is initialized in ca0132_init_analog_mic2().
Finally, add verb tables for configuring DSP firmware.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 16:57:56 +01:00
Ian Minett ef6b2eada3 ALSA: hda/ca0132: Add new definitions and structs for DSP
This patch adds definitions and structs used for configuring DSP effects,
virtual nodes, effect tuning controls, and mixer control helpers.
The effect structs are also initialized.

Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 16:57:42 +01:00
David Henningsson f038fcaca8 ALSA: hda - fix OOPS in hda_mark_cmd_cache_dirty
Obvious copy-paste error.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 15:32:46 +01:00
Takashi Iwai 6f54c36132 ALSA: hda/hdmi - Work around "alsactl restore" errors
When "alsactl restore" is performed on HDMI codecs, it tries to
restore the channel map value since the channel map controls are
writable.  But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
is assigned yet, and this results in an error message from alsactl.
Although the error is harmless, it's certainly ugly and can be
regarded as a regression.

As a workaround, this patch changes the return code in such a case to
be zero for making others happy.  (A slight excuse is: when the chmap
is changed through the proper alsa-lib API, the PCM status is checked
there anyway, so we don't have to be too strict in the kernel side.)

Cc: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 14:55:16 +01:00
Takashi Iwai 9b473e8516 ALSA: hda/sigmatel - Remove superfluous fields from sigmatel_spec
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:22:52 +01:00
Takashi Iwai 8c698fe210 ALSA: hda/sigmatel - Move w/a for HP Mini 110 LED to fixup table
Instead of checking the codec SSID in find_mute_led_cfg() for HP Mini
110, set the proper spec->default_polairty in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:22:36 +01:00
Takashi Iwai 89bb3e74b1 ALSA: hda/sigmatel - Remove PCI id check in find_mute_led_cfg()
The PCI vendor ID check in find_mute_led_cfg() is now superfluous
because the function is called in the fixup table entries of HP
machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:12:18 +01:00
Takashi Iwai 372f8c7502 ALSA: hda - Use standard fixup table for IDT92HD83xxx
Finally all codecs in patch_sigmatel.c have been converted to use the
standard fixup helpers.  This change also includes trivial cleanups
like the call of common setup for GPIO LED or the removal of unused
function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:09:26 +01:00
Takashi Iwai 55e30141d8 ALSA: hda - Use standard fixup table for IDT92HD73xx
This one is rather a simple conversion.  The fixups for Dell machines
are implemented by fixup functions in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:09:24 +01:00
Takashi Iwai 0f6fcb73c0 ALSA: hda - Use standard fixup table for IDT92HD71Bxx
This time, the only intrusive changes are for HP machines.
As the mute LED fixup and the bass speaker switch are required only
for HP machines, we can move these checks into the fixup entries; the
former is applied generically to all HP machines while the latter for
only certain models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 11:09:16 +01:00
Takashi Iwai 52fd5cbc9b ALSA: hda - Check pincap while parsing the configuration
Sometimes (or rather often) BIOS sets the pin default configurations
obviously wrongly.  Looking through these failures, one common pattern
is to enable some dead pins that are usually marked as speaker pins.
In such a case, we can skip them if the pins don't have the output
capability.

In this patch, add a check for the valid pin cap bit for each parsed
pin, and filter out when it's invalid.

The fix was originally suggested by Raymond Yau.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 08:49:09 +01:00
Takashi Iwai 29ac83635f ALSA: hda - Use standard fixup table for STAC927x
This conversion is a bit tricky.  Since STAC927x may take two
different volume-knob initialization values depending on the model, a
new flag, spec->volknob_init, is introduced to indicate whether it's
the standard volume-knob initialization or not.

Also, Dell BIOS model is now directly mapped onto the fixup table
instead of parsing in the function.  This resulted in a new model ref,
STAC_927X_DELL_BIOS_SPDIF, which is a chained entry.

Also, for reducing the fixups, virtual entries like
STAC_927X_DELL_DMIC and STAC_D965_VERBS are introduced.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 08:21:50 +01:00
Takashi Iwai 0a4278464e ALSA: hda - Use standard fixup table for STAC922x
Rather straightforward conversion, except for ones for Intel Mac.
As Intel Mac have only unique codec SSIDs, we need to remap the fixup
again for the codec SSID and call the new fixup there.

Also, we can reduce model enums like STAC_MACMINI, which are model
aliases for backward compatibility, since they can be pointed directly
via hda_model_fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 08:20:06 +01:00
Takashi Iwai fe6322ca66 ALSA: hda - Use standard fixup table for STAC9205
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 18:14:58 +01:00
Takashi Iwai fc268c10ca ALSA: hda - Use standard fixup table for STAC9872
Now for STAC9872.  It has a small fixup table, fortunately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 18:14:49 +01:00
Takashi Iwai d2077d40cb ALSA: hda - Use standard fixup table for STAC925x
Similar like the previous commit, convert patch_stac925x() to use the
standard fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 14:21:16 +01:00
Takashi Iwai d39a3ae821 ALSA: hda - Use standard fixup table for STAC9200
Convert patch_stac9200() to use the standard fixup table instead of
manual switch-case with board_config.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 14:21:10 +01:00
Takashi Iwai ac06e2298d Merge branch 'test/hda-gen-parser' into test/hda-migrate
* test/hda-gen-parser:
  ALSA: hda - Add capture_switch_hook to generic parser
2013-01-14 12:36:18 +01:00
Takashi Iwai ae177c3fd0 ALSA: hda - Add capture_switch_hook to generic parser
Add a hook for the capture mixer switch.  This will be used by IDT
codecs for controlling the mic-mute LED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 12:13:06 +01:00
Eldad Zack 39e95156b9 ALSA: usb-audio: selector map for M-Audio FT C400
Add names of the clock sources for the M-Audio Fast Track
C400.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:06:11 +01:00
Eldad Zack 83e3acd494 ALSA: usb-audio: M-Audio FT C400 skip packet quirk
Attain constant real-world latency by skipping 16 data packets.
The number of packets to be skipped was found by trial and error.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:06:03 +01:00
Eldad Zack 2aad272b3f ALSA: usb-audio: correct M-Audio C400 clock source quirk
Taking another look at the C400 descriptors, I see now that there is
a clock selector (0x80) for this device.
Right now, the clock source points to the internal clock (0x81), which
is also valid. When the external clock source (0x82) is selected in the
mixer, and the rates mismatch (if it's free-running it is fixed to
48KHz), xruns will occur.

Set the clock ID to the clock selector unit (0x81), which then
allows the validation code to function correctly.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:05:57 +01:00
David Henningsson b98ae2729d ALSA: usb - fix race in creation of M-Audio Fast track pro driver
A patch in the 3.2 kernel caused regression with hotplugging the
M-Audio Fast track pro, or sound after suspend. I don't have the
device so I haven't done a full analysis, but it seems userspace
(both udev and pulseaudio) got confused when a card was created,
immediately destroyed, and then created again.

However, at least one person in the bug report (martin djfun)
reports that this patch resolves the issue for him. It also leaves
a message in the log:
"snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
a bit misleading. It is better than non-working audio, but maybe
there's a more elegant solution?

BugLink: https://bugs.launchpad.net/bugs/1095315
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:03:03 +01:00
Stephen Rothwell c890caee54 ASoC: ak4642: remove __devinitconst annotation
CONFIG_HOTPLUG is always true now and the __dev* macros have been removed.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 13:52:21 +09:00
Kuninori Morimoto 9e7b6d60d8 ASoC: fsi: add device tree support
Support for loading the Renesas FSI driver via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 08:27:18 +09:00
Lucas Stach 609dad9bdf ASoC: tegra: add ac97 host driver
This adds the driver for the Tegra 2x AC97 host controller.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 08:21:04 +09:00
Kuninori Morimoto a4a2992c53 ASoC: simple-card: add asoc_simple_dai for initializing
Current simple-card driver calls asoc_simple_card_dai_init()
if platform had a asoc_simple_card_dai_init pointer.
And, this initialization function works only
when platform has an applicable initial value for each dai settings.
And basically, almost all sound card requires certain initialization.
This means that almost all platform has initialization settings,
and driver do nothing if it doesn't have settings.

And additionally, current simple-card supports sysclk settings but it was
only for codec.  In order to abolish deviation between cpu and codec,
and in order to simplify processing,
this patch adds asoc_simple_dai, and removed pointless
struct asoc_simple_dai_init_info which was trigger of
calling asoc_simple_card_dai_init().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-14 06:55:43 +09:00
Mark Brown 2eebcef31a Merge branch 'topic/fsi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple-card 2013-01-14 06:55:33 +09:00
Peter Ujfalusi f4d8ada2a0 ASoC: tlv320dac33: Remove suspend/resume soc driver operations
With idle_bias_off these are no longer needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:34:47 +09:00
Mark Brown f48aa39221 Merge remote-tracking branch 'asoc/fix/arizona' into asoc-arizona 2013-01-13 21:34:01 +09:00
Mark Brown d37fb92326 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-arizona 2013-01-13 21:33:03 +09:00
Mark Brown 57a10a1fc3 ASoC: wm5110: Provide MICSUPP widget for regulator driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:31:04 +09:00
Mark Brown 55e7276e93 ASoC: wm5102: Provide MICSUPP widget for regulator driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-13 21:31:03 +09:00
Mark Brown 1023dbd90c ASoC: wm_adsp: Add basic firmware selection support
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 18:36:07 +00:00
Takashi Iwai b3f6008f2d ALSA: hda - Use generic parser for VIA codec driver
Yet another step forward.  As all features for VIA codecs have been
implemented in the generic driver, we can move on to migrate the VIA
codec parser, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12 08:45:02 +01:00
Takashi Iwai 78bb3cb0e2 ALSA: hda - Add generic parser support to Analog Device codec driver
This patch adds the support for the generic auto-parser to AD codec
driver.  For AD1988, the old code is replaced simply with the new
generic parser.  For other codecs, new model "auto" is added and
directed to use the generic parser.

No fixup codes have been implemented yet as of now.  Eventually we'd
replace each static quirk with the generic parser + fixup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12 08:45:00 +01:00
Takashi Iwai bf92d1d503 ALSA: hda - Rearrange for dropping static quirk codes in Coexant driver
Just shuffle the codes and add ifdefs for testing to drop the static
quirk codes from patch_conexant.c.

By commenting out ENABLE_CXT_STATIC_QUIRKS define at the beginning of
the file, you can disable the whole static codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12 08:44:58 +01:00