Commit Graph

21805 Commits

Author SHA1 Message Date
Mark Brown 1fa1e0731d Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-next 2015-04-12 19:49:11 +01:00
Mark Brown e1f059937a Merge remote-tracking branches 'asoc/topic/link-param', 'asoc/topic/max98090', 'asoc/topic/max98925' and 'asoc/topic/nuc900' into asoc-next 2015-04-12 19:49:06 +01:00
Mark Brown 626761ad02 Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/kirkwood' into asoc-next 2015-04-12 19:49:03 +01:00
Mark Brown b7af54a992 Merge remote-tracking branches 'asoc/topic/dmaengine', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-ssi' into asoc-next 2015-04-12 19:48:59 +01:00
Mark Brown 41caf0564e Merge remote-tracking branches 'asoc/topic/cx20442' and 'asoc/topic/davinci' into asoc-next 2015-04-12 19:48:56 +01:00
Mark Brown 6ca4aba43e Merge remote-tracking branches 'asoc/topic/4554', 'asoc/topic/ab8500', 'asoc/topic/ak4642', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next 2015-04-12 19:48:51 +01:00
Mark Brown 7ad2d1d5b0 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next 2015-04-12 19:48:49 +01:00
Mark Brown aab0bb17ef Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2015-04-12 19:48:33 +01:00
Mark Brown 77b62fa5d2 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2015-04-12 19:48:31 +01:00
Mark Brown d1113af4e8 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2015-04-12 19:48:30 +01:00
Mark Brown 89a88dd3d6 ASoC: Changes for v4.1
A selection of changes for v4.1 so far.  The main things are:
 
  - Move of jack registration to the card where it belongs.
  - Support for DAPM routes specified by both the machine driver and DT.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU960DAAoJECTWi3JdVIfQkKIH/RDvxRn8dvKOPF5U9Uix3chH
 JWKkzqfsMP0EpmQTzCQPp0ShAyYcWSbYsopicynPxUem5vS4Z8+UmOgEEgkj59pK
 USbF6v1jCQXA6BcbKyUcRRBD9FtRkfVDc7mYbRs2CcwQz2CGCgee41cvPM+2BT+z
 QdNC9UJARSweGvE1IUJSfpfYOly+BJ2s0/28RaQ0PGt+I0auoYx7IMFgMSDjv2p6
 PY0kyQiwm3Kyj2uNXPZ5gEuPxlw/t8n4fbQNrBYAvxzN+EF5NrGdKE3N7MI1xRV/
 EkFhzy+uM3X9c37tb2lT2fgPFlBc9rgPuLPSyoQ6nxa5ghCqAlgRhzpxRem8hhU=
 =VlCw
 -----END PGP SIGNATURE-----

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

ASoC: Changes for v4.1

A selection of changes for v4.1 so far.  The main things are:

 - Move of jack registration to the card where it belongs.
 - Support for DAPM routes specified by both the machine driver and DT.

# gpg: Signature made Thu 05 Mar 2015 01:10:27 GMT using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2015-04-12 19:48:29 +01:00
Mark Brown 3eaecb4b50 Merge remote-tracking branch 'asoc/fix/wm8741' into asoc-linus 2015-04-12 19:48:27 +01:00
Mark Brown 250acc709e Merge remote-tracking branches 'asoc/fix/ak4642', 'asoc/fix/atmel', 'asoc/fix/cs4271', 'asoc/fix/davinci' and 'asoc/fix/rcar' into asoc-linus 2015-04-12 19:48:22 +01:00
Mark Brown a37a9407ca Merge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus 2015-04-12 19:48:21 +01:00
Mark Brown a55ede1661 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2015-04-12 19:48:20 +01:00
Mark Brown dad0e523ed ASoC: Last minute fix for v4.0
This patch backs out a change that came in during the merge window which
 selects a configuration for GPIO4 on pcm512x CODECs that may not be
 suitable for all systems using the device.  Changes for v4.1 will make
 this properly configurable but for now it's safest to revert to the
 v3.19 behaviour and leave the pin configuration alone.
 
 Sorry for sending this direct at the last minute but due to the GPIO
 misuse it'd be really good to get it in the release and I'd not realised
 it hadn't been sent yet - between some travel, a job change and other
 non-urgent fixes coming in I'd lost track of the urgency.  It's been in
 -next for several weeks now, is isolated to the driver and fairly clear
 to inspection.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVKY6pAAoJECTWi3JdVIfQkeAH/1d9FBe2VEqkDR8uJ8T7STsM
 1PWg4pT2dLCRiqqhFgrZkKGqdyVCUWbXFz/ksGoK3bip8VMy8naBen1xKdyWgcQT
 ZZuGQfywFGxOQSI0vdZSXdr1XyQO47AFRiJ2H9NQEOIMOzCRsjpAtihhkZL8rrCn
 AwwViO6TFg09gijkQdbVsm6fxCBlDHM46/EhxP+Xo2K4TEOEeT+ZKxX6IpcJNmA5
 Sw6TgyeQwu8LfHwNREczcojmk1wapytZvVivbNedNw7B6I1ujdPIsmnHWFWbiWv5
 lfhcM77VLKmv3mwB/v1yRBEf3lNCgqn523N+S8Al9SjDkdLyibhuAWqZXUzsjqY=
 =TbSp
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.0-rc7' into asoc-linus

ASoC: Last minute fix for v4.0

This patch backs out a change that came in during the merge window which
selects a configuration for GPIO4 on pcm512x CODECs that may not be
suitable for all systems using the device.  Changes for v4.1 will make
this properly configurable but for now it's safest to revert to the
v3.19 behaviour and leave the pin configuration alone.

Sorry for sending this direct at the last minute but due to the GPIO
misuse it'd be really good to get it in the release and I'd not realised
it hadn't been sent yet - between some travel, a job change and other
non-urgent fixes coming in I'd lost track of the urgency.  It's been in
-next for several weeks now, is isolated to the driver and fairly clear
to inspection.

# gpg: Signature made Sat 11 Apr 2015 22:14:17 BST using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2015-04-12 19:48:19 +01:00
kbuild test robot a5e5e12bd4 ASoC: Intel: fix array_size.cocci warnings
sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE

 Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element

Semantic patch information:
 This makes an effort to find cases where ARRAY_SIZE can be used such as
 where there is a division of sizeof the array by the sizeof its first
 element or by any indexed element or the element type. It replaces the
 division of the two sizeofs by ARRAY_SIZE.

Generated by: scripts/coccinelle/misc/array_size.cocci

CC: Jie Yang <yang.jie@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 19:47:15 +01:00
Lars-Peter Clausen 59c41d15e6 ASoC: n810: Automatically disconnect non-connected pins
All CODEC input and output widgets are either in the DAPM routing table or
manually marked as non-connected. This means the card is fully routed and we
can let the core take care of disconnecting non-connected pins.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:45:26 +01:00
Lars-Peter Clausen d4bdaced1a ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()
Some callers of n810_ext_control() pass the card DAPM context and some pass
the CODEC DAPM context. Given that some of the widgets that are accessed in
the function are in the card's context, always passing it is the obvious
choice.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:45:11 +01:00
Lars-Peter Clausen b213b44a96 ASoC: davinci-evm: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:44:24 +01:00
Lars-Peter Clausen 5cf57f0f6b ASoC: mop500_ab8500: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:43:58 +01:00
Lars-Peter Clausen 02f51640fe ASoC: wm1133-ev1: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:42:34 +01:00
Lars-Peter Clausen ada602b30e ASoC: atmel: Improve machine driver compile test coverage
The Atmel ASoC machine drivers don't have any compile time arch dependencies
anymore. Make it possible to select them when COMPILE_TEST is enabled to get
better compile test coverage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:40:57 +01:00
Lars-Peter Clausen 7ca92b8f5a ASoC: atmel: Add dependency to SND_SOC_I2C_AND_SPI where necessary
The SND_AT91_SOC_SAM9G20_WM8731 and SND_AT91_SOC_SAM9X5_WM8731 machine
driver symbols select SND_SOC_WM8731 which depends on SND_SOC_I2C_AND_SPI.
So the machine driver symbols need to depend on SND_SOC_I2C_AND_SPI as well,
otherwise we might end up with a invalid configuration, which will sooner or
later upset the randconfig auto-builders.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12 12:40:57 +01:00
Takashi Iwai c30cf8cbe5 ALSA: control: Fix a typo of SNDRV_CTL_ELEM_ACCESS_TLV_* with SNDRV_CTL_TLV_OP_*
The commit [39d118677baa: ALSA: ctl: evaluate macro instead of
numerical value] replaced the numbers with constants, but one place
was replaced wrongly with a different type.  Fixed now.

Fixes: 39d118677b ('ALSA: ctl: evaluate macro instead of numerical value')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-12 09:18:14 +02:00
Adam Honse eef0342cf3 ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate
Adds Microsoft LifeCam Cinema USB ID to the snd_usb_get_sample_rate_quirk list as the Lifecam Cinema does not appear to support getting the sample rate.

Fixes the issue where the LifeCam Cinema would wait for USB timeout and log the message "cannot get freq at ep 0x82" when accessed.

Addresses bug report https://bugzilla.kernel.org/show_bug.cgi?id=95961.

Signed-off-by: Adam Honse <calcprogrammer1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-12 09:08:42 +02:00
Al Viro 1c65d98672 pcm: another weird API abuse
readv() and writev() should _not_ ignore all but the first ->iov_len,
among other things.  Really weird abuse of those syscalls - it
expects a vector element per channel, with identical lengths (it
actually assumes them to be identical - no checking is done).
readv() and writev() are really bad match for that.  Unfortunately,
userland API is userland API and we can't do anything about them.

Converted to ->read_iter/->write_iter.  Please, _please_ don't do
anything of that kind when designing new interfaces.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-04-11 22:29:43 -04:00
Al Viro c0fec3a98b Merge branch 'iocb' into for-next 2015-04-11 22:24:41 -04:00
Linus Torvalds 56fd85b5dd ASoC: Last minute fix for v4.0
This patch backs out a change that came in during the merge window which
 selects a configuration for GPIO4 on pcm512x CODECs that may not be
 suitable for all systems using the device.  Changes for v4.1 will make
 this properly configurable but for now it's safest to revert to the
 v3.19 behaviour and leave the pin configuration alone.
 
 Sorry for sending this direct at the last minute but due to the GPIO
 misuse it'd be really good to get it in the release and I'd not realised
 it hadn't been sent yet - between some travel, a job change and other
 non-urgent fixes coming in I'd lost track of the urgency.  It's been in
 -next for several weeks now, is isolated to the driver and fairly clear
 to inspection.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVKY6pAAoJECTWi3JdVIfQkeAH/1d9FBe2VEqkDR8uJ8T7STsM
 1PWg4pT2dLCRiqqhFgrZkKGqdyVCUWbXFz/ksGoK3bip8VMy8naBen1xKdyWgcQT
 ZZuGQfywFGxOQSI0vdZSXdr1XyQO47AFRiJ2H9NQEOIMOzCRsjpAtihhkZL8rrCn
 AwwViO6TFg09gijkQdbVsm6fxCBlDHM46/EhxP+Xo2K4TEOEeT+ZKxX6IpcJNmA5
 Sw6TgyeQwu8LfHwNREczcojmk1wapytZvVivbNedNw7B6I1ujdPIsmnHWFWbiWv5
 lfhcM77VLKmv3mwB/v1yRBEf3lNCgqn523N+S8Al9SjDkdLyibhuAWqZXUzsjqY=
 =TbSp
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound

Pull last-minute ASoC fix from Mark Brown:
 "This patch backs out a change that came in during the merge window
  which selects a configuration for GPIO4 on pcm512x CODECs that may not
  be suitable for all systems using the device.  Changes for v4.1 will
  make this properly configurable but for now it's safest to revert to
  the v3.19 behaviour and leave the pin configuration alone.

  Sorry for sending this direct at the last minute but due to the GPIO
  misuse it'd be really good to get it in the release and I'd not
  realised it hadn't been sent yet - between some travel, a job change
  and other non-urgent fixes coming in I'd lost track of the urgency.

  It's been in -next for several weeks now, is isolated to the driver
  and fairly clear to inspection"

* tag 'asoc-fix-v4.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound:
  ASoC: pcm512x: Remove hardcoding of pll-lock to GPIO4
2015-04-11 15:57:36 -07:00
Arnd Bergmann 8616774968 ASoC: rnsd: fix build regression without CONFIG_OF
The r-car sound driver only works when CONFIG_OF is set, and
after a recent change has a compile-time dependency as well:

sound/built-in.o: In function `rsnd_dma_request_channel':
:(.text+0x9fb84): undefined reference to `of_dma_request_slave_channel'

This could be fixed either by adding a static inline wrapper
for the function, or by adding a Kconfig dependency. This
implements the second approach, which seems appropriate
because the driver in fact has a hard dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 72adc61f46 ("ASoC: rsnd: 1st DMAC dma-names cares subnode")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-11 23:05:18 +01:00
Howard Mitchell 14f0413ce3 ASoC: pcm512x: Remove hardcoding of pll-lock to GPIO4
Currently GPIO4 is hardcoded to output the pll-lock signal.
Unfortunately this is after the pll-out GPIO is configured which
is selectable in the device tree. Therefore it is not possible to
use GPIO4 for pll-out. Therefore this patch removes the
configuration of GPIO4.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-11 22:09:14 +01:00
Michael Gernoth 99dcab46b5 ALSA: emu10k1: add toggles for E-mu 1010 optical ports
The optical ports on the E-mu 1010 (and dock) can be configured
for ADAT- or S/PDIF-mode, which is currently hardcoded to ADAT.
Add two mixer elements to expose this setting.
Tested on an E-mu 1010 PCIe with connected Micro Dock.

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 18:35:06 +02:00
Takashi Sakamoto cab2ed7474 ALSA: ctl: fill identical information to return value when adding userspace elements
currently some members related identical information are not fiiled
in returned parameter of SNDRV_CTL_IOCTL_ELEM_ADD. This is not better
for userspace application.

This commit copies information to returned value. When failing to copy
into userspace, the added elements are going to be removed. Then, no
applications can lock these elements between adding and removing because
these are already locked.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 17:35:17 +02:00
Takashi Sakamoto c378c3b03c ALSA: ctl: fix a bug to return no identical information in info operation for userspace controls
In operations of SNDRV_CTL_IOCTL_ELEM_INFO, identical information in
returned value is cleared. This is not better to userspace application.

This commit confirms to return full identical information to the
operations.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 17:32:16 +02:00
Takashi Sakamoto c78497e010 ALSA: ctl: confirm to return all identical information in 'activate' event
When event originator doesn't set numerical ID in identical information,
the event data includes no numerical ID, thus userspace applications
cannot identify the control just by unique ID in event data.

This commit fix this bug so as the event data includes all of identical
information.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 17:31:31 +02:00
Michael Gernoth fa863b2d5e ALSA: emu10k1: handle dock disconnects
When the dock on an E-mu 1010 card is disconnected, all outputs get
muted by the hardware. Add logic to detect a disconnect and unmute.

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 17:29:19 +02:00
Yves-Alexis Perez c0278669fb ALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)
This model uses the same dock port as the previous generation.

Signed-off-by: Yves-Alexis Perez <corsac@debian.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 17:25:37 +02:00
Takashi Sakamoto 3e21a19d1d ALSA: seq: fill client ID in return value of pool operation
The returned value of 'get/seq client pool' operation has zeroed value
for its client ID, against requested client ID.

This commit fix the bug by filling it with index value of referred
client object.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11 09:11:19 +02:00
Jin Yao 0e7921e958 ASoC: Intel: Use the generic IPC/mailbox APIs in Broadwell
Use the generic IPC/mailbox APIs to replace the original processing
code for Broadwell platform.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 19:00:48 +01:00
Jin Yao 48cec59b6f ASoC: Intel: Use the generic IPC/mailbox APIs in Baytrail
Use the generic IPC/mailbox APIs to replace the original processing
code for Baytrail platform.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 19:00:45 +01:00
Jin Yao a33c1ec5cf ASoC: Intel: Refactor common IPC/mailbox code into generic APIs
Currently in Intel SST driver, some similar IPC/mailbox processing
code are used in different platforms (e.g. in baytrail/broadwell).

This patch extracts the common code and creates new files
(sst-ipc.c/sst-ipc.h) to contain the common code and provide the generic
APIs for IPC/mailbox processing.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 19:00:37 +01:00
Fabio Estevam 1169006b05 ASoC: fsl: Add the audio interface acronyms in Kconfig text
To keep consistency with the other Kconfig entries, use the audio
interface acronyms (SSI and SPDIF) in the Kconfig menu text.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 18:30:53 +01:00
Kuninori Morimoto a5053a8e20 ASoC: core: call snd_soc_runtime_set_dai_fmt() before soc_new_pcm()
Current snd_soc_runtime_set_dai_fmt() is called after
soc_probe_link_dais(). this means snd_soc_dai_set_fmt() will be
called after soc_new_pcm().

Before appling 1efb53a220
(ASoC: simple-card: Remove support for setting differing DAI formats)
simple-card user had (1) snd_soc_dai_set_fmt() -> soc_new_pcm(),
but, after that it is (2) soc_new_pcm() -> snd_soc_dai_set_fmt().
At least rsnd driver is assuming (1) pattern.

This patch move snd_soc_dai_set_fmt() into soc_probe_link_dais()
after the dai_link->init section to solve this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 16:11:12 +01:00
Mark Brown 1ddca24c53 Merge branch 'topic/dapm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core 2015-04-10 16:09:21 +01:00
Mark Brown 5f97a4bd2c Merge branch 'topic/delay' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core 2015-04-10 16:04:46 +01:00
Fabio Estevam ca2641891d ASoC: fsl_ssi: Use devm_ioremap_resource()
Using platform_get_resource() and devm_ioremap_resource() can make the
code a bit simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 15:38:37 +01:00
Michael Gernoth 91bf0c2dcb ALSA: emu10k1: don't deadlock in proc-functions
The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read
acquire the emu_lock before accessing the FPGA. The function used
to access the FPGA (snd_emu1010_fpga_read) also tries to take
the emu_lock which causes a deadlock.
Remove the outer locking in the proc-functions (guarding only the
already safe fpga read) to prevent this deadlock.

[removed superfluous flags variables too -- tiwai]

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10 13:02:23 +02:00
Fabio Estevam 299e7e97cc ASoC: fsl_ssi: Use devm_snd_soc_register_component()
Using devm_snd_soc_register_component() can make the code shorter and
cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 11:05:25 +01:00
Kuninori Morimoto c01673e0b7 ASoC: ak4642: fixup channels_min
ak4642 doesn't have Mono record, ak4643 have it, but not supported.
This patch fixes channel mismatch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 11:03:48 +01:00
Takashi Iwai f4d3129c2b ALSA: hda/realtek - Fix a typo
A comma was used instead of a semicolon, which may lead to a build
error.

Fixes: cffd396681 ('ALSA: hda/realtek - Fix the regression by widget power-saving')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10 09:53:04 +02:00
Takashi Sakamoto 39d118677b ALSA: ctl: evaluate macro instead of numerical value
SNDRV_CTL_TLV_OP_XXX is defined but not used in core code. Instead,
raw numerical value is evaluated.

This commit replaces these values to these macros for better looking.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10 09:36:25 +02:00
Dmitry M. Fedin 3dc8523fa7 ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support
Adds an entry for Creative USB X-Fi to the rc_config array in
mixer_quirks.c to allow use of volume knob on the device.
Adds support for newer X-Fi Pro card, known as "Model No. SB1095"
with USB ID "041e:3237"

Signed-off-by: Dmitry M. Fedin <dmitry.fedin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 17:20:39 +02:00
Takashi Iwai cfd3113e7c ALSA: hda/via - Add missing stream_pm ops setup
Similar like the case for Realtek, VIA codec driver needs this ops as
well for making the widget power-save working.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 15:23:59 +02:00
Lars-Peter Clausen 6553bf06a3 ASoC: Don't try to register debugfs entries if the parent does not exist
If the registration of a debugfs directory fails this is treated as a
non-fatal error in ASoC and operation continues as normal. This means we
need to be careful and check if the parent debugfs directory exists if we
try to register a debugfs file or sub-directory. Otherwise we might end up
passing NULL for the parent and the file or directory will be registered in
the top-level debugfs directory.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09 12:23:14 +01:00
Lars-Peter Clausen 2e55b90a5e ASoC: Make soc_dpcm_debugfs_add() non-fatal
Failing to register the debugfs entries is not fatal and will not affect
normal operation of the sound card. Don't abort the card registration if
soc_dpcm_debugfs_add() fails.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09 11:32:29 +01:00
Bard Liao d53d59ecad ASoC: rt286: Restore default in probe
RT286 can't do register reset. If the hardware power is still existing
in power off, rt286 will keep the register settings. So, we need to
restore the default register value in probe to make sure the cache value
is the same as the real register value.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09 11:31:22 +01:00
Lars-Peter Clausen 0757d834eb ASoC: Create card debugfs directory earlier
Create the card debugfs directory at the begining of the initilization
rather then the end as various steps in the initilization sequence will try
to register files and sub-directories in the card directory.

Fixes: 4e2576bd36 ("ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()")
Reported-by: Fabio Estevam <festevam@gmail.com>
Reported-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09 11:24:03 +01:00
Mark Brown 95a9ca7476 Linux 4.0-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVIws/AAoJEHm+PkMAQRiGwEcH/1GCBqrBzXaKwDdCPMRcYVUb
 MYkXmGkCGRYWe5MXI8QNAaa/CdG6mAFMHWN6CaMMpLTxnM1m87uBg01fQMsh73BO
 mRVLKE/soiJDnR1gYzBBDBYV/AUvytN5PhgeNaA95YIJvU3T1f3iTnV8vs30Dp0L
 YpxSqwr3C0k7C9IE0VcgfzvWJPCnQ9IWHuX3jn5s1XjGKVNbBYHMt6FusHdyXMfT
 dp8ksuGHwm30mTFI5xJpKOrRzfi+P5EsEUrsnFRPRM/iFTVrM5R7eaUhsRZb2+Wo
 YApnbYhUYz7om1AuQ+UZ/+S6y7ZLlGWegI1lWI754GIsczG5vPHEYhhgkzMhTsc=
 =kR1V
 -----END PGP SIGNATURE-----

Merge tag 'v4.0-rc7' into asoc-core

Linux 4.0-rc7
2015-04-09 11:23:57 +01:00
Takashi Iwai cffd396681 ALSA: hda/realtek - Fix the regression by widget power-saving
While enabling the widget power-saving for ALC269 & co, the important
setup was forgotten -- stream_pm ops.  Without this setup, the paths
for PCM won't be powered up at all.

Also, the power_filter callbacks used in ALC269 & co need to chain to
the default snd_hda_gen_path_power_filter().

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 12:09:57 +02:00
Dan Carpenter 75afbd052b ASoC: Intel: do cast earlier in sst_cdev_tstamp()
My static checker complains about these because it looks like the
multiply can overflow and then we cast to a larger data type.  I don't
think this is a problem, but it's also harmless to do the cast earlier
so let's silence the static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09 10:58:06 +01:00
Takashi Iwai 24fef9022a ALSA: hda/generic - Don't override power_filter when power_save_node is set
Currently the generic parser sets codec->power_filter when
power_save_node flag is set.  But this overrides the existing filter
that has been already set by the codec driver, thus it looses some
features.  Instead, set the default power_filter only when it's not
set yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 10:34:00 +02:00
Takashi Iwai b6c09b3c7b ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicable
Add the check of power_save_node flag at the beginning of the function
so that it skips the rest if the flag isn't set.  In this way, we can
call this function safely no matter whether the widget power-saving is
really used or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 10:33:53 +02:00
Takashi Iwai d5ac0100a9 ALSA: hda/generic - Fix wrong initial power state for fixed pins
When the widget power-saving is enabled, the first automute hook
invocation checks through the whole pins and it also tries to
synchronize the power state.  However, this results in a wrong state
because it calls unconditionally snd_hda_jack_detect_state().
This patch adds a check of jack detectability before the actual jack
detection call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 10:33:44 +02:00
Takashi Iwai 2206dc9492 ALSA: hda/generic - Check power state cap at updating the widget power
The new widget power-saving tries to apply the power change no matter
whether the node has a power cap or not.  It's bad (although most of
codecs chip just ignore it).  Check the capability properly
beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 10:33:16 +02:00
Takashi Iwai 9efe2731db ALSA: hda - Always allow access for POWER_STATE verbs via regmap
The hdac regmap code checks whether the codec is powered on while
accessing, but there must be an exception -- the verbs to control the
power state.

Currently HD-audio driver doesn't access them via regmap, so this
patch doesn't fix any current behavior, but it's just for future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 08:24:51 +02:00
Al Viro 237dae8890 Merge branch 'iocb' into for-davem
trivial conflict in net/socket.c and non-trivial one in crypto -
that one had evaded aio_complete() removal.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-04-09 00:01:38 -04:00
Lars-Peter Clausen 1b13fe718b ASoC: tegra_wm9712: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 21:10:01 +01:00
Lars-Peter Clausen 14e954f5dd ASoC: tegra_wm8903: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 21:10:01 +01:00
Lars-Peter Clausen c67a443b11 ASoC: tegra_rt5677: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 21:10:01 +01:00
Lars-Peter Clausen 884c0f5b2a ASoC: tegra_alc5632: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 21:10:01 +01:00
Mark Brown c77dc2c203 Merge branch 'topic/jack' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tegra 2015-04-08 21:09:54 +01:00
Takashi Iwai cc7016ab1a ALSA: hda - Fix headphone pin config for Lifebook T731
Some BIOS version of Fujitsu Lifebook T731 seems to set up the
headphone pin (0x21) without the assoc number 0x0f while it's set only
to the output on the docking port (0x1a).  With the recent commit
[03ad6a8c93b6: ALSA: hda - Fix "PCM" name being used on one DAC when
 there are two DACs], this resulted in the weird mixer element
mapping where the headphone on the laptop is assigned as a shared
volume with the speaker and the docking port is assigned as an
individual headphone.

This patch improves the situation by correcting the headphone pin
config to the more appropriate value.

Reported-and-tested-by: Taylor Smock <smocktaylor@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 20:52:52 +02:00
Charles Keepax 1a60667fc8 ASoC: wm8804: Enable runtime PM
Currently both the oscillator and the PLL are powered up in
set_bias_level. This can be problematic when using output clocks from
the wm8804 for other devices. The snd_soc_codec_set_pll API defines that
a clock should be available once the call returns, however, with all the
clocking controlled in set_bias_level this is not currently the case.

This patch enables pm_runtime for the wm8804, enabling both the
regulators and the oscillator when the chip resumes, and enabling the
PLL in the snd_soc_codec_set_pll call. Naturally the enabling the PLL
will also cause the chip to resume.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 19:25:40 +01:00
Sapthagiri Baratam 5631f18763 ASoC: wm8804: Add DAPM widgets for SPDIF/AIF
This change converts the driver to use DAPM to control the power for the
various blocks on the chip. As part of this change the existing controls
"TX Playback Switch" (controlled power for the SPDIF TX block) and "AIF
Playback Switch" (controlled power for the AIF block) are both removed,
as they are now redundant since the power state of those blocks is
controlled automatically by DAPM.

There are several benefits of this change, the most important of which
is this change adds support for powering down the SPDIF RX block. The RX
block will automatically assume control of the PLL on the chip when it
is receiving a signal, so leaving this enabled all the time as was
currently done in the driver can be problematic. An incoming SPDIF signal
that is not being used can completely destroy the clocking for an in use
TX signal. But this change ensures that the RX block will only be
powered when the user intends to be receiving data, thus avoiding this
issue.

Additional benefits include the chip being simpler to operate as the
power no longer needs to be manually controlled between use-cases and a
small power saving (although it is acknowledged that this is likely
unimportant in the typical use-cases for this chip).

Signed-off-by: Sapthagiri Baratam <sapthagiri.baratam@incubesol.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 19:25:40 +01:00
Caesar Wang c6b424fee7 ASoC: max98090: add shutdown callback for max98090
To fix pop noise when shutdown,the pop noise during shutdown
is the pmic cutoff power of codec without any notice.

Signed-off-by: jay.xu <xjq@rock-chips.com>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 18:08:25 +01:00
Sudip Mukherjee 1f544fd8ff ASoC: Intel: remove unused functions
these functions were never called by anyone.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 17:47:23 +01:00
Takashi Sakamoto a053fc318b ALSA: bebob: fix to processing in big-endian machine for sending cue
Some M-Audio devices require to receive bootup command just after
powering on, while codes in BeBoB driver doesn't work properly in
big-endian machine because the command should be aligned by
little-endian.

This commit fixes this bug. This fix should go to stable kernel.

Cc: Takayuki Shiroma <t.shiroma.oki@gmail.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 18:23:10 +02:00
Takashi Iwai 664c715573 ALSA: hda - Work around races of power up/down with runtime PM
Currently, snd_hdac_power_up()/down() helpers checks whether the codec
is being in pm (suspend/resume), and skips the call of runtime get/put
during it.  This is needed as there are lots of power up/down
sequences called in the paths that are also used in the PM itself.  An
example is found in hda_codec.c::codec_exec_verb(), where this can
power up the codec while it may be called again in its power up
sequence, too.

The above works in most cases, but sometimes we really want to wait
for the real power up.  For example, the control element get/put may
want explicit power up so that the value change is assured to reach to
the hardware.   Using the current snd_hdac_power_up(), however,
results in a race, e.g. when it's called during the runtime suspend is
being performed.  In the worst case, as found in patch_ca0132.c, it
can even lead to the deadlock because the code assumes the power up
while it was skipped due to the check above.

For dealing with such cases, this patch makes snd_hdac_power_up() and
_down() to two variants: with and without in_pm flag check.  The
version with pm flag check is named as snd_hdac_power_up_pm() while
the version without pm flag check is still kept as
snd_hdac_power_up().  (Just because the usage of the former is fewer.)

Then finally, the patch replaces each call potentially done in PM with
the new _pm() variant.

In theory, we can implement a unified version -- if we can distinguish
the current context whether it's in the pm path.  But such an
implementation is cumbersome, so leave the code like this a bit messy
way for now...

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96271
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 13:50:42 +02:00
Jie Yang 8e64aedf80 ASoC: Intel: Fix a buffer overflow issue
0day robot reported a buffer overflow issue:

...
sound/soc/intel/haswell/sst-haswell-pcm.c:1107 hsw_pcm_probe() error: buffer\
overflow 'hsw_dais' 4 <= 4
sound/soc/intel/haswell/sst-haswell-pcm.c:1109 hsw_pcm_probe() error: buffer\
overflow 'hsw_dais' 4 <= 4
...

Fix it by initializing the index(i) to correct value.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08 11:17:51 +01:00
Takashi Iwai 142267c9e0 ALSA: hda - Create AFG sysfs node at last
... so that user-space can know that the whole nodes have been
created.  Unfortunately, this can't be implemented easily in race-free
way, so it's a kind of compromise.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:41:59 +02:00
Kailang Yang e1e62b98eb ALSA: hda/realtek - Support Dell headset mode for ALC288
Dell create new platform with ALC288 codec.
This patch will enable headset mode for Dino platform.

[slight code refactoring and compile fix by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:37:51 +02:00
Kailang Yang f3b7033265 ALSA: hda/realtek - Support headset mode for ALC286/288
Support headset mode for ALC286 and ALC288 platforms.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:30:59 +02:00
Takashi Iwai 0a59983873 Merge branch 'for-linus' into for-next
Back merge HD-audio quirks to for-next branch, so that we can apply
a couple of more quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:30:49 +02:00
Kailang Yang a59d7199f6 ALSA: hda/realtek - Make more stable to get pin sense for ALC283
Pin sense will active when power pin is wake up.
Power pin will not wake up immediately during resume state.
Add some delay to wait for power pin activated.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08 11:29:45 +02:00
Libin Yang 2d846c7402 ALSA: hda_intel: add AZX_DCAPS_I915_POWERWELL for SKL and BSW
HDMI/DP codec on SKL/BSW is in the power well.
The power well must be turned on before probing the
HDMI/DP codec.

This is a temporary patch, which will power on the
powerwell by adding AZX_DCAPS_I915_POWERWELL for SKL
and BSW. After restructuring and new flag is added,
this patch will be reverted.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-07 14:51:35 +02:00
Charles Keepax 7e5ee1c33e ASoC: wm8804: Add support for hardware reset line
It is best to use the physical reset if it is available. This patch adds
support for a GPIO controlled physical reset for the chip.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-07 12:36:19 +01:00
Peter Ujfalusi 4cd9db0859 ASoC: davinci-mcasp: Fix ruledata setup in davinci_mcasp_startup
Passing &mcasp->ruledata[dir] to snd_pcm_hw_rule_add() is not correct since
commit:
7b3d165a28 ASoC: davinci-mcasp: Index ruledata in drvdata with substream->stream
now sets up the struct based on the substream->stream (0 or 1) while we pass
a pointer which we take with dir (1 or 2). This will lead kernel crash.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-07 12:05:44 +01:00
Michael Ellerman b7f859dda9 Merge branch 'next-remove-ldst' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc into next 2015-04-07 13:25:14 +10:00
kbuild test robot f34c4bc7e5 ASoC: Intel: read_shim_data() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 20:10:43 +01:00
Jie Yang b97169da06 ASoC: Intel: create atom folder and move atom platform files in
Restructure the sound/soc/intel/ directory: create atom folder, and move
sst atom platform files here.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:49:45 +01:00
Jie Yang 66a6fd9846 ASoC: Intel: create baytrail folder and move baytrail platform files in
Restructure the sound/soc/intel/ directory: create baytrail folder, and move
sst baytrail platform files here.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:49:45 +01:00
Jie Yang e56c72d5f2 ASoC: Intel: create boards folder and move sst boards files in
Restructure the sound/soc/intel/ directory: create boards folder, and move
sst boards files here.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:49:45 +01:00
Jie Yang ba57f68235 ASoC: Intel: create haswell folder and move haswell platform files in
Restructure the sound/soc/intel/ directory: create haswell folder, and
move haswell platform files here.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:49:45 +01:00
Jie Yang 2106241a68 ASoC: Intel: create common folder and move common files in
Restructure the sound/soc/intel/ directory: create common folder, and move
sst common files here.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:49:45 +01:00
Charles Keepax 158bf4ed7f ASoC: wm5102: Remove set of volume update bits for output 3R
The earpiece on wm5102 is mono, thus there is no output 3R. Don't toggle
the volume update bits for this output, although worth noting that doing
so had no negative effects it is just redundant.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06 17:12:41 +01:00
Michael Gernoth f32c1c1b46 ALSA: emu10k1: add Audigy 5/Rx
The Audigy 5/Rx is essentially an Audigy 4 behind a PLX PCIe-
bridge with an additional TOSLINK output.

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05 21:10:04 +02:00
Julia Lawall 646cb6dae4 ALSA: au1x00: fix error return code
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05 18:04:27 +02:00
Joe Perches eab0fbfa41 ALSA: Use const struct ac97_quirk
Use const to reduce data by ~3Kb.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-05 08:41:05 +02:00
Sudip Mukherjee 751e221689 ALSA: hda: fix possible null dereference
we are dereferencing pcm first then checking pcm. instead now lets put
them in same if condition so that pcm is checked first.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 14:32:16 +02:00
Eric Wong 9fc88ad6fd ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
Adding this quirk allows us to avoid the noisy
"cannot get freq at ep 0x1" message in dmesg output every time
playback starts.

This ought to affect other Benchmark DAC1 variations using the same
"Microchip Technology, Inc." chip as well, but I have only tested
with the "Pre" variant.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Cc: Joe Turner <joe@oampo.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 14:07:56 +02:00
Kailang Yang 7081adf3f9 ALSA: hda/realtek - Support Dell headset mode for ALC256
Dell new platform of ALC256 audio codec.
Support headset mode for Dell ALC256 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 12:53:23 +02:00
Takashi Iwai 382fd7becc ALSA: hda - Enable widget power saving for Realtek codecs
Recent Realtek codecs support the finer power state control on each
widget.  Let's enable the new feature.

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 12:24:00 +02:00
Takashi Iwai d545a57c5f ALSA: hda - Sync node attributes at resume from widget power saving
So far we assumed that the node attributes like amp values remain
during the power state transition of the node itself.  While this is
true for IDT/STAC codecs I've tested, but some other codecs don't seem
behaving in that way.

This patch implements a partial sync mechanism specific to the given
widget node.  Now we've merged the regmap support, and it can be
easily written with regcache_sync_region().

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 12:22:52 +02:00
Takashi Iwai 664bc5c559 Merge branch 'topic/hda-regmap' into for-next
This merges the support of regmap in HD-audio infrastructure.
Many in-house cache codes in HD-audio driver are relaced with the
more standard regmap base now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 12:16:30 +02:00
David Henningsson ffda568e8b ALSA: hda - Fix subsystem ID read regression
A regression was introduced in 7639a06c23c7d4cda3: if AC_PAR_SUBSYSTEM_ID
reads as zero, one should retry using AC_VERB_GET_SUBSYSTEM_ID.

This seems to hit many codecs (my own laptop included), and causes
quirks for some machines not to apply correctly.

Reported-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-04 12:14:00 +02:00
Pascal Huerst 74ff960222 ASoC: cs4271: Increase delay time after reset
The delay time after a reset in the codec probe callback was too short,
and did not work on certain hw because the codec needs more time to
power on. This increases the delay time from 1us to 1ms.

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-04-02 18:15:48 +01:00
Alexandre Belloni c14e2591bf ASoC: atmel-pcm-dma: increase buffer_bytes_max
atmel-pcm-dma is not limited to a buffer size of 64kB like atmel-pcm-pdc.
Increase buffer_bytes_max to 512kB to allow for higher bit rates (i.e. 32bps at
192kHz) to work correctly. By default, keep the prealloc at 64kB.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-02 10:01:13 +01:00
Jyri Sarha 7b3d165a28 ASoC: davinci-mcasp: Index ruledata in drvdata with substream->stream
The serializer direction definitions runs from 1 to 2, which does not
suite the purpose. The substream->stream is perfect for the purpose
and should have been used from the beginning.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:34:15 +01:00
Jyri Sarha 7b425f264f ASoC: omap-hdmi-audio: No not use IEC958_AES1_PRO_MODE_NOTID
No IEC958_AES?_PRO_* macros should be used in HDMI consumer audio mode
and IEC958_AES1_PRO_MODE_NOTID should be applied to byte 1 when
applicable. However IEC958_AES1_PRO_MODE_NOTID is defined as 0 so this
fix does not affect the functionality in any way.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:29:33 +01:00
Lars-Peter Clausen cd5d822688 ASoC: wm8350: Move delayed work struct from DAPM context to driver state
The wm8350 driver is the last driver that still uses the delayed_work field
from the snd_soc_dapm_context struct. Moving this over to the driver's
private data struct will allow us to remove the field from the DAPM context,
which will drastically reduce its size.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:28:10 +01:00
Lars-Peter Clausen 37660b6daf ASoC: Remove suspend_bias_level from DAPM context struct
The only two users of the suspend_bias_level field were two rather old
drivers which weren't exactly doing things by the book. Those drivers have
been updated and field is now unused and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:28:04 +01:00
Lars-Peter Clausen a1f0b96749 ASoC: wm8753: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:28:01 +01:00
Lars-Peter Clausen 35afd9221b ASoC: wm8753: Integrate capacitor charging into the DAPM sequence
When being powered on, either initially on probe or when resuming from
suspend, the wm8971 configures the device for quick output capacitor
charging. Since the charging can take a rather long time (up to multiple
seconds) it is done asynchronously without blocking. A delayed work item is
run once the charging is finished and the device is switched to the target
bias level.

This all done asynchronously to the regular DAPM sequence accessing the same
data structures and registers without any looking, which can lead to race
conditions. Furthermore this potentially delays the start of stream on the
CODEC while the rest of the system is already up and running, meaning the
first bytes of audio are lost. It also does no comply with the assumption of
the DAPM core that if set_bias_level() returned successfully the device will
be at the requested bias level.

This patch slightly refactors things and makes sure that the caps charging
is properly integrated into the DAPM sequence. When transitioning from
SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY the part will be put into fast
charging mode and a work item will be scheduled that puts it back into
standby charging once the charging period has elapsed. If a playback or
capture stream is started while charging is in progress the driver will now
wait in SND_SOC_BIAS_PREPARE until the charging is done. This makes sure
that charging is done asynchronously in the background when the chip is
idle, but at the same time makes sure that playback/capture is not started
before the charging is done.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:27:44 +01:00
Lars-Peter Clausen c59e6abba9 ASoC: wm8971: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:27:41 +01:00
Lars-Peter Clausen 643518403c ASoC: wm8971: Integrate capacitor charging into the DAPM sequence
When being powered on, either initially on probe or when resuming from
suspend, the wm8971 configures the device for quick output capacitor
charging. Since the charging can take a rather long time (up to multiple
seconds) it is done asynchronously without blocking. A delayed work item is
run once the charging is finished and the device is switched to the target
bias level.

This all done asynchronously to the regular DAPM sequence accessing the same
data structures and registers without any looking, which can lead to race
conditions. Furthermore this potentially delays the start of stream on the
CODEC while the rest of the system is already up and running, meaning the
first bytes of audio are lost. It also does no comply with the assumption of
the DAPM core that if set_bias_level() returned successfully the device will
be at the requested bias level.

This patch slightly refactors things and makes sure that the caps charging
is properly integrated into the DAPM sequence. When transitioning from
SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY the part will be put into fast
charging mode and a work item will be scheduled that puts it back into
standby charging once the charging period has elapsed. If a playback or
capture stream is started while charging is in progress the driver will now
wait in SND_SOC_BIAS_PREPARE until the charging is done. This makes sure
that charging is done asynchronously in the background when the chip is
idle, but at the same time makes sure that playback/capture is not started
before the charging is done.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:27:36 +01:00
Lars-Peter Clausen ab87ce1d9b ASoC: wm8971: Use system_power_efficient_wq instead of custom workqueue
The delayed work used by the wm8971 driver to manage the caps charging
doesn't have any special requirements that would justify using a custom
workqueue, just use the generic system_power_efficient_wq instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:27:33 +01:00
Alexandre Belloni 488cb53391 ASoC: atmel-pcm-pdc: merge atmel-pcm back in
atmel-pcm.c was split into two files to create a generic framework for both PDC
and DMA.

atmel-pcm-dma.c is using the generic dmaengine framework since 95e0e07e71
(ASoC: atmel-pcm: use generic dmaengine framework).

Merge atmel-pcm.c in atmel-pcm-pdc.c as this is now the only user.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:24:27 +01:00
Kuninori Morimoto 43cb6954f8 ASoC: rsnd: add Synchronous SRC mode
Renesas R-Car sound SRC (= Sampling Rate Converter) has
Asynchronous/Synchronous SRC mode. Asynchronous mode is already
supported via DPCM. This patch adds Synchronous mode on it.

The condition of enabling Synchronous mode are
- SoC is clock master
- Sound uses SRC
- Sound doesn't use DVC
- Sound card uses DPCM (= rsrc-card card)

	amixer set "SRC Out Rate" on
	aplay xxx.wav &
	amixer set "SRC Out Rate" 48000

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 21:23:37 +01:00
Greg Kroah-Hartman 86d39839bc Update extcon for v4.1
This patchset include two new extcon driver and fix minor issue of extcon
 driver.
 
 Detailed description for patchset:
 1. new extcon-max77843.c and extcon-usb-gpio.c extcon driver
 - extcon-max77843.c driver support the MAXIM MAX77843 MUIC (Micor-USB Interface
 Controller) device which handles the various external connectors such as TA/USB
 /USB-HOST/JIG and so on.
 - extcon-usb-gpio.c driver support the USB and USB-HOST cable detection by
 using the GPIO pin which is connected to USB ID pin. This GPIO pin updates the
 USB cable states.
 
 2. Rename the filename of extcon core driver and add missing locking mechanism
 - Rename the previous extcon-class driver.c as extcon.c because '-class'
 postfix is not necessary word.
 - extcon core driver (extcon.c) used the raw_notifier_chain. It must be
 protected by locking mechanism to avoid the list changing while
 extcon_update_state() is executed.
 
 3. Fix minor issue of extcon drviers
 - Fix cable name by using the capital letter instead of small letter on
 extcon-max77693.c driver.
 - Clean-up code of extcon-arizona.c to detect headphone cable.
 - Fix the wrong return type and variable type on extcon-max77843.c.
 - Fix the checkpatch warning of all extcon drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJVGLj3AAoJEJzN3yze689TgjAQAI61DDF9E77ezOQlHdtWPmyN
 d2Ny59zvioL3SjKX1zBWQ3Fjj76u0tvvMknVtOBemucz4jJtDNfrsslbHf6zGu7V
 2/nHtGw+PvsawSfUxYfyk8zpXkhQmEekLQICzSxZYNntuFuh0xu+tidlWM5sStAP
 SpJPENYXrMdQUPMoxowPJtgw6dLvIkG86Yk1DFoAQM7SKgsP6f3a4inlnQtajbf1
 J93PRuir0ih06MhLin07BM97JetJ69uHJHjqzKZo1DvAHom8PgfmTqTZLcdFIu/A
 itWtpGTOF2AH6BR5K0xrrAzzyoTwOXhBfY2xvy7zM9oTWV1zyZ9FQc/I0kFaeO8B
 qcT7vSRMpbKciVw/xDnWjBFnOcE+p53SvBQI7p//8pUVoP3P4DdFXUBmwHzWMeCC
 4v7BSFo+LhqbO1vhOBkiTbsraIiTVFNI62b68AE2HwXmO4pjlMifgLrudNdns9QW
 7lqXpdzD1Mbk7yfUVtcvl6xOIPoKD1No37C/iTX2hqLyNwiLIt0VNEvEEO3S6rqX
 2b3CM6JJOsvyMix5+mWlxlmFEPqdpFf3+vvhsviI68cY7617LggKxZsxm1wSe5hO
 faAQMnj7W51YO9t9Umat95LYIMxGkwdilH/n61ocQbV06qwIMro9Ke+hzxzxupyI
 9l4l6Y4j5PH4wTIA+Pty
 =LkOG
 -----END PGP SIGNATURE-----

Merge tag 'extcon-next-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Update extcon for v4.1

This patchset include two new extcon driver and fix minor issue of extcon
driver.

Detailed description for patchset:
1. new extcon-max77843.c and extcon-usb-gpio.c extcon driver
- extcon-max77843.c driver support the MAXIM MAX77843 MUIC (Micor-USB Interface
Controller) device which handles the various external connectors such as TA/USB
/USB-HOST/JIG and so on.
- extcon-usb-gpio.c driver support the USB and USB-HOST cable detection by
using the GPIO pin which is connected to USB ID pin. This GPIO pin updates the
USB cable states.

2. Rename the filename of extcon core driver and add missing locking mechanism
- Rename the previous extcon-class driver.c as extcon.c because '-class'
postfix is not necessary word.
- extcon core driver (extcon.c) used the raw_notifier_chain. It must be
protected by locking mechanism to avoid the list changing while
extcon_update_state() is executed.

3. Fix minor issue of extcon drviers
- Fix cable name by using the capital letter instead of small letter on
extcon-max77693.c driver.
- Clean-up code of extcon-arizona.c to detect headphone cable.
- Fix the wrong return type and variable type on extcon-max77843.c.
- Fix the checkpatch warning of all extcon drivers.
2015-04-01 13:51:59 +02:00
Uwe Kleine-König 969b861906 ASoC: rcar: mark device data as constant
A driver's device data should and can be const. This is a follow-up on
commit 33187fb4a2 (ASoC: rsnd: constify of_device_id array) which
marked the of_device_id as const.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 09:58:40 +01:00
Uwe Kleine-König 9a42ab04aa ASoC: fsi: mark several data structures as const
A driver's platform_device_id and device data should and can be const.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 09:31:19 +01:00
Uwe Kleine-König 3b6281cf28 ASoC: fsi: reorder code to make a forward declaration superfluous
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-01 09:31:19 +01:00
Uwe Kleine-König 1c6ae56c5d ASoC: fsi: fix license specification
According to the file header only GPL v2 applies to it. Fix the
MODULE_LICENSE parameter accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-31 14:31:19 +01:00
Kuninori Morimoto 3b7843ff61 ASoC: rsnd: add DPCM based sampling rate convert
This patch supports DPCM based sampling rate convert on Renesas sound
driver. It assumes...
 1. SRC is implemented as FE
 2. BE dai_link supports .be_hw_params_fixup

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 16:00:49 -07:00
Kuninori Morimoto b543b52a44 ASoC: rsnd: remove useless debug message
This patch removes useless debug message. especially some kind of
"probed" message will be printed from core.c if it has #define DEBUG

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 16:00:47 -07:00
Mark Brown f8d04e7d91 Merge branch 'asoc-fix-rcar' into HEAD 2015-03-27 16:00:39 -07:00
Kuninori Morimoto 2f78dd7f40 ASoC: rsnd: call clk_prepare/unprepare() in probe/remove
clk_prepare_enable()/clk_disable_unprepare() uses mutex inside,
in concretely clk_prepare()/clk_unprepare().And it uses __schedule().
Then, raw_spin_lock/unlock_irq() is called, and it breaks Renesas
sound driver's spin lock irq.
This patch separates thesse into clk_prepare()/clk_unprepare() and
clk_enable/clk_disable. And call clk_prepare()/clk_unprepare() from
probe/remove function. Special thanks to Das Biju.

Reported-by: Das Biju <biju.das@bp.renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 15:59:17 -07:00
Kuninori Morimoto af7e2be966 ASoC: rsrc-card: add .be_hw_params_fixup support for convert rate
Current rsnd-dpcm-card is supporting DPCM FE/BE sound card.
This patch adds .be_hw_params_fixup and enabled sampling convert rate.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 15:58:20 -07:00
Kuninori Morimoto 415f1cb29d ASoC: rsrc-card: add Renesas sampling rate convert sound card support
Renesas sound card has "sampling rate convert" feature which
should be implemented via DPCM.
But, sound card driver point of view, it is difficult to add
this DPCM feature on simple-card driver. Especially, DT binding
support is very difficult.

This patch implements DPCM feature on DT as Renesas specific sound card.
This new driver is copied from current simple-card driver.
Main difference between simple-card and this driver are...
 1. removed unused feature from simple-card
 2. removed driver named prefix from DT property
 3. CPU will be FE, CODEC will be BE with snd-soc-dummy
 4. it supports sampling rate convert via .be_hw_params_fixup
 5. board specific routing is implemented in driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 15:58:20 -07:00
Axel Lin 5116ede10d ASoC: max98925: Fix bit-width 24 settings in max98925_dai_hw_params
Trivial typo fix.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Anish Kumar <Anish.Kumar@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 13:53:49 -07:00
Bard Liao 373225510f ASoC: rt5645: Restore HP depop setting in HP off
This driver will set RT5645_DEPOP_MAN bit in headphone power up
depop process. We need to restore it in headphone power down
process. Otherwise, we will get headphone noise when push button
function is enabled.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 09:48:57 -07:00
Bard Liao 1b5d0160e8 ASoC: rt5645: Use update_bits for bit control
In codec bias level off, we need to disable gate mode with MCLK
for power saving. It is set by one bit. We don't need to write
while register for that.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 09:48:57 -07:00
Bard Liao afefc12801 ASoC: rt5645: Set use_single_rw flag for regmap
RT5645 doesn't support auto incrementing writes so driver should set
the use_single_rw flag for regmap.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 09:48:56 -07:00
Bard Liao 57bf27365c ASoC: rt5645: Redefine format config for rt5650
rt5650 and rt5645 use different register bits for format configuration.
This patch modifies rt5645_hw_params and rt5645_set_dai_fmt to support
both codecs.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 09:48:56 -07:00
Lu, Han 2c0ed63492 ASoC: Intel: fix warning reported by static check tool smatch
The smatch tool report warning:
  ...
    CHECK   sound/soc/intel/sst-haswell-pcm.c
  sound/soc/intel/sst-haswell-pcm.c:1110 hsw_pcm_probe() error: buffer overflow\
'hsw_dais' 4 <= 4
  sound/soc/intel/sst-haswell-pcm.c:1112 hsw_pcm_probe() error: buffer overflow\
'hsw_dais' 4 <= 4
  ...
fix it by use its own struct member for post-process module, rather than sharing
unused pcm member.

Signed-off-by: Lu, Han <han.lu@intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-27 09:25:39 -07:00
Takashi Iwai 9d82f9272d ALSA: hda - Set use_single_rw flag for regmap
HD-audio doesn't support the bulk access.  Currently it works even
without this flag as implicitly assumed, but it's safer to set
explicitly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-27 14:07:26 +01:00
Lars-Peter Clausen 1efb53a220 ASoC: simple-card: Remove support for setting differing DAI formats
Having to set different formats on the CPU side and the CODEC side of a DAI
link is usually indication that something is terribly wrong and in most
cases is a result of a broken driver that implements a set_fmt() callback
which does not follow the specification. In the past this feature has been
used to work around broken drivers, rather than fixing them. We don't really
want to encourage this, so remove support for setting different formats on
both ends of the link.

Along the way switch to static DAI format setup by setting the the dai_fmt
field of the snd_soc_dai_link rather than calling snd_soc_dai_fmt().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-26 18:35:48 -07:00
Manish Badarkhe a57069e33f ASoC: davinci-evm: drop un-necessary remove function
As davinci card gets registered using 'devm_' api
there is no need to unregister the card in 'remove'
function.
Hence drop the 'remove' function.

Fixes: ee2f615d6e (ASoC: davinci-evm: Add device tree binding)
Signed-off-by: Manish Badarkhe <manishvb@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-03-26 10:01:43 -07:00
Takashi Iwai 8bc174e9e3 ALSA: hda - Handle a few verbs as read-only
Although they can be written, handle a few verbs as read-only in
regmap interface: CONFIG_DEFAULT, CONV and CVT_CHAN_COUNT.  These are
either updated in PCM or HDMI management code in a volatile manner, or
just needed only as parameter, thus they don't need to be written at
resume sync.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-26 14:18:34 +01:00
Hui Wang af95b41426 ALSA: hda - Add one more node in the EAPD supporting candidate list
We have a HP machine which use the codec node 0x17 connecting the
internal speaker, and from the node capability, we saw the EAPD,
if we don't set the EAPD on for this node, the internal speaker
can't output any sound.

Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1436745
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-26 11:04:30 +01:00
Libin Yang db48abf436 ALSA: hda_intel: apply the Seperate stream_tag for Sunrise Point
The total stream number of Sunrise Point's input and output stream
exceeds 15, which will cause some streams do not work because
of the overflow on SDxCTL.STRM field if using the legacy
stream tag allocation method.

This patch uses the new stream tag allocation method by add
the flag AZX_DCAPS_SEPARATE_STREAM_TAG for Skylake platform.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-26 07:30:13 +01:00
Christoph Hellwig e2e40f2c1e fs: move struct kiocb to fs.h
struct kiocb now is a generic I/O container, so move it to fs.h.
Also do a #include diet for aio.h while we're at it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-03-25 20:28:11 -04:00
Sergej Sawazki 8787041d9b ASoC: wm8741: Fix rates constraints values
The WM8741 DAC supports the following typical audio sampling rates:
  44.1kHz, 88.2kHz, 176.4kHz (eg: with a master clock of 22.5792MHz)
  32kHz, 48kHz, 96kHz, 192kHz (eg: with a master clock of 24.576MHz)

For the rates lists, we should use 82000 instead of 88235, 176400
instead of 1764000 and 192000 instead of 19200 (seems to be a typo).

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-03-25 08:29:19 -07:00
Charles Keepax 46172b6c26 ASoC: dapm: Fix build warning
commit c66150824b ("ASoC: dapm: add code to configure dai link
parameters") introduced the following build warning:

sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm':
sound/soc/soc-dapm.c:3389:4: warning: passing argument 1 of 'snprintf'
discards 'const' qualifier from pointer target type
snprintf(w_param_text[count], len,

This patch fixes this by switching to using devm_kasprintf. This also
saves a couple of lines of code.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-25 08:26:35 -07:00
W. Trevor King 4738465c37 ALSA: hda/via - Add beep controls to VIA codecs
My codec has a beep-generating node:

  $ cat /proc/asound/card1/codec#0
  Codec: VIA VT1802
  ...
  Vendor Id: 0x11068446
  Subsystem Id: 0x15587410
  Revision Id: 0x100000
  ...
  Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
    Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
    Amp-Out vals:  [0x0a]
    Power states:  D0 D1 D2 D3
    Power: setting=D0, actual=D0
  ...

But I was missing the:

  Control: name=...

entries that I need to manage this widget from alsamixer.  With this
patch (based on the similar Mono Amp-Out handling in
patch_conexant.c), I get a new:

  input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/hdaudioC1D0/input15

entry in dmesg and controls to manage that beep:

  $ cat /proc/asound/card1/codec#0 | grep -A5 Beep
  Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
    Control: name="Beep Playback Volume", index=0, device=0
      ControlAmp: chs=1, dir=Out, idx=0, ofs=0
    Control: name="Beep Playback Switch", index=0, device=0
      ControlAmp: chs=1, dir=Out, idx=0, ofs=0
    Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
    Amp-Out vals:  [0x12]
    Power states:  D0 D1 D2 D3
    Power: setting=D0, actual=D0

[rebased and modified for the latest tree by tiwai]

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-25 08:59:00 +01:00
Takashi Iwai 44e39b9853 ALSA: hda - Remove superfluous hda_nid_t definition in hda_codec.h
Just forgotten to remove.  It's now in sound/hdaudio.h.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-25 07:44:21 +01:00
Kuninori Morimoto 4e2576bd36 ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()
Current soc_init_card_debugfs() is called from snd_soc_register_card()
but, soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(),
not from paired function.

This differences don't matter for now. But if anyone wants to implement
a proper hotplug/unplug, this difference would become clearer.

Now, we can assume that snd_soc_instantiate_card() and
soc_cleanup_card_resources() are paired function.
soc_init_card_debugfs() / soc_cleanup_card_debugfs() paired function
should be called from these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-24 10:48:56 -07:00
Jyri Sarha a75a053f1e ASoC: davinci-mcasp: Set rule constraints if implicit BCLK divider is used
Set rule constraints to allow only combinations of sample-rate,
sample-format, and channels counts that can be played/captured with
reasonable sample-rate accuracy.

The logic with tdm-slots and serializers (=i2s data wires) goes like
this: The first wire will take all channels up to number of tdm-slots,
before following wires (if any) are used. If the first wire is used
fully, the remaining wires share the same clocks and the divider can
be calculated for the first wire.

Also, takes the number of tdm-slots into account when implicitly
selecting the BLCK divider.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-24 10:19:43 -07:00
Krzysztof Kozlowski 2f4b1e6bb2 ASoC: rsnd: Fix duplicate const for DVC ramp rates
Replace duplicated const keyword for 'dvc_ramp_rate' with proper
array of const pointers to const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-24 10:08:58 -07:00
Takeshi Kihara 39c2618064 ASoC: ak4642: enable stereo line output power-save mode
ak4642 has power-save mode for stereo line to reduce pop noise.
This patch enables it.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-24 10:00:40 -07:00