Commit graph

22974 commits

Author SHA1 Message Date
Takashi Iwai
fe14f39e88 ALSA: hda - Fix pin config and mapping on Alienware 15
Alienware 15 has CA0132 codec for its onboard sound, but the pin
config and mapping seem quite different from other Creative boards.
This patch corrects them, at least, for providing the right headphone
and mic jack notification, as well as removing the non-existing SPDIF
pins.

Even with this fix, not all stuff works perfectly yet, mainly because
of the badly written ca0132 driver code -- it has too many implicit
assumptions of pin configs and maps.  Nevertheless, this is a small
good step forward.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101981
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 16:53:32 +02:00
Mark Brown
3f6175ece9 ALSA: echoaudio: Use standard C definitions of true and false
The echoaudio locally defines TRUE and FALSE.  Not only is this
redundant given that C now has a boolean type it results in lots of
warnings as other headers also define these macros, causing duplicate
definitions.  Fix this by removing the local defines and converting all
local users to use the standard C true and false instead, simply
removing the macros is less safe due to implicit inclusion of the other
definitons.

[fixed overlooked replacement of FALSE by tiwai]

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 14:27:16 +02:00
Fang, Yang A
e5b94083d0 ASoC: max98090: Fix sequencing when starting additional routes
Enforce correct device sequencing when configuring a new
audio route when there is an existing active audio route(s).

This patch fixed recording noise issue while playback is active.

We have some registers which require the device to be in full shutdown
or to enter full shutdown before the register settings will take effect.
Currently the driver is not shutting down the device when a new audio
route is created. If a new audio route is made active while there is
already an active audio route, then the required register sequencing is
violated. A hardware shutdown toggle when creating a new audio route
corrects the sequencing error. The device must remain in hardware
shutdown for 40ms to allow the internal hardware core to fully shutdown.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Acked-by: Anish Kumar <anish.kumar@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-10 12:57:35 +01:00
Arnaud Pouliquen
36cc093520 ASoC: sti: Add IEC control
Add control to configure IEC60958 settings.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:51:33 +01:00
Jeeja KP
c9b1e834bc ASoC: Intel: Skylake: Add pipe management helpers
To manage DSP we need to create processing pipeline and on cleanup destroy
them. So we add create and destroy routines for pipelines The pipelines need
to to be executed so we add pipeline run and stop routines
All these send required IPCs to DSP using IPC routines added earlier

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:03 +01:00
Jeeja KP
beb73b266a ASoC: Intel: Skylake: Add DSP module init and binding routines
A module needs to be instantiated and then connected with other modules. On
cleanup we need to disconnect the module.
This is achieved by helpers module init, bind and unbind which are added
here

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Hardik T Shah
a0ffe48bb5 ASoC: Intel: Skylake: Add helpers for SRC and converter modules
SRC and converter modules are required to do frequency and channel
conversion in DSP. Both take base module configuration and additional SRC
and converter parameters. The helpers here are added to calculate the values
for these modules

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Jeeja KP
23db472bba ASoC: Intel: Skylake: Add helpers for DSP module configuration
This adds helper functions to calculate parameters required for base module
format and copier module. A generic module is modelled by base module.
Copier module is responsible for getting/sending data to FE (host DMAs) and
BE (link HDA DMA, SSP, PDM)
This also ads module pin management helpers which help in finding pins to
use or freeing them up

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:02 +01:00
Jeeja KP
aba3dd5ace ASoC: Intel: Skylake: Use acpi header for NHLT header
Instead of defining own acpi header, use the available acpi
header defined in acpi framework.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:01 +01:00
Jeeja KP
9f2dd0270d ASoC: Intel: Skylake: Fix the NHLT rate size
Sampling rate type needs to be u32 instead of u8, nhlt wav format
description expected u32 for rate, passing u8 will fetch NULL
config in skl_get_ep_blob().

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 14:26:01 +01:00
Andrzej Hajda
96bab82f6b ALSA: firewire: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-07 14:52:07 +02:00
Andrzej Hajda
376c0afe2f ASoC: topology: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 13:27:51 +01:00
Andrzej Hajda
b42e093e59 ASoC: intel: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07 13:25:06 +01:00
Nik Nyby
99876030b3 ASoC: omap: Fix typo in config option description
This fixes a typo in the description for SND_OMAP_SOC_HDMI_AUDIO.

Signed-off-by: Nik Nyby <nikolas@gnu.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-08-07 14:08:50 +02:00
Geert Uytterhoeven
d8ffcf711c ASoC: fsl_esai: Spelling s/specifially/specifically/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
2015-08-07 13:58:30 +02:00
Takashi Iwai
6ac7ada210 ASoC: Fixes for v4.2
There are a couple of small driver specific fixes here but the
 overwhelming bulk of these changes are fixes to the topology ABI that
 has been newly introduced in v4.2.  Once this makes it into a release we
 will have to firm this up but for now getting enhancements in before
 they've made it into a release is the most expedient thing.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVxJsBAAoJECTWi3JdVIfQHUIH/2NeQyG7bL3TSIm0qK9RdmaT
 UrWyGm6AwhOrg9j9jnZkXag1v4Fsmo4nnslaDbmCKaWJPs7ol94NuWJK7z3He3nr
 47yxl2m8OhxsS7aBDACa4gJFQce+JSjKs1ADnKR7QzY9c1/nTAWLO/LE/I5Ca18u
 tZg77hviip2ftfLYdNXDZvz3HzuCcRnIouc4izTs16DXwU3aYpqcctFrcqU3nNmp
 /+5zPwIoLA7KDwPqdYhSPNRuCnFtjVbI8hTzq+aWFlxFBZYlKmSCTSwpCN2aQDgF
 1oCOP4dlv7s9Xavd2TOMJ8g3Fuyb/gjX2DhIEm7QCYxwBxdkpwm0na6gMrRJqsg=
 =NEOq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.2

There are a couple of small driver specific fixes here but the
overwhelming bulk of these changes are fixes to the topology ABI that
has been newly introduced in v4.2.  Once this makes it into a release we
will have to firm this up but for now getting enhancements in before
they've made it into a release is the most expedient thing.
2015-08-07 13:53:41 +02:00
Mark Brown
d00a9e0217 Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/intel' and 'asoc/fix/topology' into asoc-linus 2015-08-06 12:39:07 +01:00
Mark Brown
78be55af0d Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-08-06 12:39:07 +01:00
Axel Lin
4ca7deb1e1 ASoC: topology: Use kcalloc instead of kzalloc for array allocation
Also remove unnecessary memset.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 12:35:15 +01:00
Mengdong Lin
28a87eebca ASoC: topology: Update TLV support so we can support more TLV types
Currently the TLV topology structure is targeted at only supporting the
DB scale data. This patch extends support for the other TLV types so they
can be easily added at a later stage.

TLV structure is moved to common topology control header since it's a
common field for controls and can be processed in a general way.

Users must set a proper access flag for a control since it's used to
decide if the TLV field is valid and if a TLV callback is needed.

Removed the following fields from topology TLV struct:
- size/count: type can decide the size.
- numid: not needed to initialize TLV for kcontrol.
- data: replaced by the type specific struct.

Added TLV structure to generic control header and removed TLV structure
from mixer control.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 12:34:46 +01:00
Mark Brown
113adf21cf ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
 
  - Fix for binding DAPM stream widgets on devices with prefixes assigned
    to them
  - Minor fixes for the newly added topology interfaces
  - Locking and memory leak fixes for DAPM
  - Driver specific fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVsnNFAAoJECTWi3JdVIfQH9cH/1ddueDFikvXSCyntuJcHAwJ
 a7X5kCVdegMnaMK5fnAbTlJBpDIX/F1UBvsFQQ38eKWeneP44XnkXeh/32fGJzQO
 L730dqy0tkgQdWJkQg0yxaP5/k0BfhnXeRc3ATUG3LBgUBrWRYLTIvaM+G+H3Kf5
 K88QL7cKmeY0Kt6+cms3nnBj9x5oFgbHIW7Y3K/pza+XPVecZ7N3/5gpV+VQDUXh
 Oz3cZOsC5h4+IpxkOrLXY7zgLvrt/HfRTO2QF/3Ntub81anAk190pVAquM+r/CTn
 tQ3sPNGLglQ4VRXNP6yBKJOp5CUTBLt5XWlJ+Kg9p2OiiuOPla4wkhuGDS5AM64=
 =nJJl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc3' into asoc-fix-topology

ASoC: Fixes for v4.2

A lot of small fixes here, a few to the core:

 - Fix for binding DAPM stream widgets on devices with prefixes assigned
   to them
 - Minor fixes for the newly added topology interfaces
 - Locking and memory leak fixes for DAPM
 - Driver specific fixes
2015-08-06 12:34:41 +01:00
Subhransu S. Prusty
6dc6db790a ASoC: topology: Add subsequence in topology
Some widgets may need sorting within, So add this support in topology.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 12:33:53 +01:00
Anatol Pomozov
ac1125daf0 ASoC: rl6231: Simplify DMIC divider calculation expression
Existing implementation checks all divider values and tracks
'red' proximity value for the frequency.

But as divider array is monotonically increasing the first
divider that gives DMIC rate in 3MHz range is the best one
we should use. No need for 'red' zone tracking.

Additionally make sure that DMIC frequency is higher 1MHz.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 10:51:12 +01:00
Lars-Peter Clausen
f6af5df0c7 ALSA: aoa-soundbus: Switch to dev_pm_ops
Update the aoa-soundbus framework to use dev_pm_ops rather than the
deprecated legacy suspend and resume callbacks.

Since there isn't anything special to do at the bus level the bus driver
does not have to implement any callbacks. The device driver core will
automatically pick up and execute the device's PM ops.

As there is only a single aoa-soundbus driver implementing suspend and
resume, update both the core and driver at the same time to avoid
unnecessary code churn.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 16:47:47 +02:00
Vaishali Thakkar
8833c01af6 ASoC: tegra: Use devm_clk_get
This patch introduces the use of managed resource function
devm_clk_get instead of clk_get and removes corresponding calls
to clk_put in the probe and remove functions.

To be compatible with the change various gotos are replaced with
direct returns, and unneeded labels are dropped.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 14:01:43 +01:00
Axel Lin
b970499878 ASoC: wm8753: Drop wm8753_writeable function
When .max_register is set and .writeable_reg is not implement, registers
between 0 and .max_register are writeable. This is the same as current
implementation of wm8753_writeable(), so just drop implementation for
.writeable_reg callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:28:51 +01:00
Axel Lin
f611cdd8eb ASoC: wm8731: Drop wm8731_writeable function
When .max_register is set and .writeable_reg is not implement, registers
between 0 and .max_register are writeable. This is the same as current
implementation of wm8731_writeable(), so just drop implementation for
.writeable_reg callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:28:24 +01:00
Axel Lin
6f55a04137 ASoC: wm8741: Simplify wm8741_set_dai_sysclk implementation
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:28:00 +01:00
Lars-Peter Clausen
2e45a25f9c ASoC: wm_hubs: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:42 +01:00
Lars-Peter Clausen
5092e76b8a ASoC: wm9713: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:38 +01:00
Lars-Peter Clausen
0894e2b3cd ASoC: wm9090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:34 +01:00
Lars-Peter Clausen
5d9a5e609b ASoC: wm9081: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:29 +01:00
Lars-Peter Clausen
f1022087d3 ASoC: wm8993: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:25 +01:00
Lars-Peter Clausen
00769dbe39 ASoC: wm8991: Don't use range container for TLVs with one entry
For TLVs with only a single entry it is not necessary to use a range
container. Use DECLARE_TLV_DB_LINEAR() directly instead of a combination of
TLV_DB_RANGE_HEAD() and TLV_DB_LINEAR_ITEM().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:21 +01:00
Lars-Peter Clausen
dfd0edda1f ASoC: wm8990: Don't use range container for TLV with one entry
For TLVs with only a single entry it is not necessary to use a range
container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of
TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:17 +01:00
Lars-Peter Clausen
fcbb71e9cc ASoC: wm8962: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:13 +01:00
Lars-Peter Clausen
5d272d8933 ASoC: wm8961: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:09 +01:00
Lars-Peter Clausen
11c3727c4e ASoC: wm8753: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:04 +01:00
Lars-Peter Clausen
7d711f63e3 ASoC: wm8737: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:24:00 +01:00
Lars-Peter Clausen
0b65e6c7e2 ASoC: wm8400: Don't use range container for TLV with one entry
For TLVs with only a single entry it is not necessary to use a range
container. Use DECLARE_TLV_DB_SCALE() directly instead of a combination of
TLV_DB_RANGE_HEAD() and TLV_DB_SCALE_ITEM().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:56 +01:00
Lars-Peter Clausen
d3d383ba8b ASoC: wm8350: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:52 +01:00
Lars-Peter Clausen
5ee0b8f829 ASoC: uda1380: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:47 +01:00
Lars-Peter Clausen
2524911e30 ASoC: twl4030: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:43 +01:00
Lars-Peter Clausen
4e0e5f8084 ASoC: tpa6130a2: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:39 +01:00
Lars-Peter Clausen
f9d54802b6 ASoC: ssm2602: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:35 +01:00
Lars-Peter Clausen
53eb1ca3ca ASoC: sgtl5000: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:30 +01:00
Lars-Peter Clausen
53f28609b0 ASoC: rt5677: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:27 +01:00
Lars-Peter Clausen
dea6d32e9e ASoC: rt5670: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:24 +01:00
Lars-Peter Clausen
8e3648e10f ASoC: rt5651: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:21 +01:00
Lars-Peter Clausen
6d698a83fa ASoC: rt5645: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:17 +01:00
Lars-Peter Clausen
8295822dac ASoC: rt5640: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:15 +01:00
Lars-Peter Clausen
7f708abeac ASoC: rt5631: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:11 +01:00
Lars-Peter Clausen
d6e3bb7aca ASoC: max9877: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:08 +01:00
Lars-Peter Clausen
e034098599 ASoC: max9850: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:04 +01:00
Lars-Peter Clausen
54c2011f5a ASoC: max98095: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:23:00 +01:00
Lars-Peter Clausen
8896bc3e08 ASoC: max98090: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:57 +01:00
Lars-Peter Clausen
80170468de ASoC: max98088: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:54 +01:00
Lars-Peter Clausen
44744eeccf ASoC: max9768: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:50 +01:00
Lars-Peter Clausen
4689ac530e ASoC: jz4740: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:47 +01:00
Lars-Peter Clausen
e27c8404a4 ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:44 +01:00
Lars-Peter Clausen
32e933be3f ASoC: da7213: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:40 +01:00
Lars-Peter Clausen
6c1e1bfe22 ASoC: da7210: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:38 +01:00
Lars-Peter Clausen
0c8129152c ASoC: cs42l73: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:22:26 +01:00
Lars-Peter Clausen
37879bafc2 ASoC: cs42l56: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:19:22 +01:00
Lars-Peter Clausen
0a017768e8 ASoC: cs42l52: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:19:04 +01:00
Lars-Peter Clausen
ec7e4dc85c ASoC: alc5632: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:16:19 +01:00
Lars-Peter Clausen
c8aeb0f60f ASoC: alc5623: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:16:18 +01:00
Lars-Peter Clausen
31581f3c09 ASoC: adau1373: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:16:17 +01:00
Lars-Peter Clausen
69dae09f2d ASoC: ab8500: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:16:16 +01:00
Lars-Peter Clausen
f17cbcfef3 ASoC: 88pm860x: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
that it automatically calculates the number of items in the TLV and is
hence less prone to manual error.

Generate using the following coccinelle script

// <smpl>
@@
declarer name DECLARE_TLV_DB_RANGE;
identifier tlv;
constant x;
@@
-unsigned int tlv[] = {
-	TLV_DB_RANGE_HEAD(x),
+DECLARE_TLV_DB_RANGE(tlv,
	...
-};
+);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 13:16:16 +01:00
Takashi Iwai
9f502ff553 ALSA: hda - yet another fix for Dell headset mic with ALC3266
It turned out that there are three variants of pin config values of
NID 0x17 on Dell laptops with ALC3266 (alias of ALC298): 0x90170110,
0x90170140 and 0x90170150.  The first two have been already covered by
commits 703867e2f2 and 977e627684, so this commit adds the missing
last entry.

While we're at it, rearrange the three entries in the order of pincfg
values.

Reported-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:09:45 +02:00
Hui Wang
73851b36fe ALSA: hda - one Dell machine needs the headphone white noise fixup
The fixup ALC292_FIXUP_DISABLE_AAMIX can fix the white noise of
the headphone on this Dell machine.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:08:16 +02:00
Oder Chiou
00a6d6e50f ASoC: Add function "rl6231_get_pre_div" to correct the dmic clock calculation
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-05 10:42:35 +01:00
Takashi Sakamoto
18f5ed365d ALSA: fireworks/firewire-lib: add support for recent firmware quirk
Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
This chip includes ARM7 core, and loads and runs program. The firmware
is stored in on-board memory and loaded every powering-on from it.

Echo Audio ships several versions of firmwares for each model. These
firmwares have each quirk and the quirk changes a sequence of packets.

As long as I investigated, AudioFire2/AudioFire4/AudioFirePre8 have a
quirk to transfer a first packet with 0x02 in its dbc field. This causes
ALSA Fireworks driver to detect discontinuity. In this case, firmware
version 5.7.0, 5.7.3 and 5.8.0 are used.

Payload  CIP      CIP
quadlets header1  header2
02       00050002 90ffffff <-
42       0005000a 90013000
42       00050012 90014400
42       0005001a 90015800
02       0005001a 90ffffff
42       00050022 90019000
42       0005002a 9001a400
42       00050032 9001b800
02       00050032 90ffffff
42       0005003a 9001d000
42       00050042 9001e400
42       0005004a 9001f800
02       0005004a 90ffffff
(AudioFire2 with firmware version 5.7.)

$ dmesg
snd-fireworks fw1.0: Detect discontinuity of CIP: 00 02

These models, AudioFire8 (since Jul 2009 ) and Gibson Robot Interface
Pack series uses the same ARM binary as their firmware. Thus, this
quirk may be observed among them.

This commit adds a new member for AMDTP structure. This member represents
the value of dbc field in a first AMDTP packet. Drivers can set it with
a preferred value according to model's quirk.

Tested-by: Johannes Oertei <johannes.oertel@uni-due.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:52:39 +02:00
Takashi Sakamoto
c85523d1d9 Revert "ALSA: fireworks: add support for AudioFire2 quirk"
This reverts commit 9c6893e0be.

The fix is superseded by the next commit as a better implementation
for supporting AudioFire2/AudioFire4/AudioFirePre8 quirks.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:51:53 +02:00
Woodrow Shen
703867e2f2 ALSA: hda - Fix Dell laptop for internal mic/headset mic
The new Dell laptop with ALC3266 can't use internal microphone to
record. Also, the 3 ring headset mic doesn't work on it. For src of
patch_realtek.c, only the pin cfg of Nid 0x17 is different, so the
Nid 0x17 is added into pin quirk, and others are defined to macro
ALC298_STANDARD_PINS in common use.

Codec: Realtek ALC3266
Vendor Id: 0x10ec0298
Subsystem Id: 0x102806e5

BugLink: https://bugs.launchpad.net/bugs/1481575
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:47:42 +02:00
Mengdong Lin
5406898354 ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-04 16:45:00 +01:00
Joe Perches
56113f6e6f ASoC: atmel_ssc_dai: Correct misuse of 0x%<decimal>
Correct misuse of 0x%d in logging message.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-04 12:09:31 +01:00
Jeeja KP
5d942ce63c ALSA: HDA: Dont check return for snd_hdac_chip_readl
The snd_hdac_chip_readl return can never be less than zeros,
so no point in checking for the return value

This fixes following static checker warnings in
snd_hdac_ext_bus_parse_capabilities

       sound/hda/ext/hdac_ext_controller.c:47
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'offset' is never less than zero.

       sound/hda/ext/hdac_ext_controller.c:54
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'cur_cap' is never less than zero.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-04 07:04:46 +02:00
Jeeja KP
9b06dc9394 ALSA: HDA: Fix stream assignment for host in decoupled mode
This fixes issue in assigning host stream in case of
decoupled mode. The check to verify if the stream is already
in use was wrong so fix that

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-04 07:04:35 +02:00
Bard Liao
a094935e4e ASoC: rt5645: Fix lost pin setting for DMIC1
I2S2_DAC pin can be used for I2S or GPIO. We should set it as GPIO
if we use GPIO5 as DMIC1 data pin.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-03 17:02:45 +01:00
Hui Wang
1158029733 ALSA: hda - remove no physical connection pins from pin_quirk table
To cleanup the pin_quirk table:
 - rewrite the pin_config_match(), comparing all pins on the machine
   with the corresponding pins in the quirk table.
 - remove all 0x4xxxxxxx pin configurations from pin_quirk table
 - after removing the 0x4xxxxxxx pin configurations, some pin tables
   are exactly same, so removing the redudant pin tables.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:16:20 +02:00
Tomer Barletz
8ec7cfce37 ALSA: oxygen: Fix logical-not-parentheses warning
This fixes the following warning, that is seen with gcc 5.1:
warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses].

Signed-off-by: Tomer Barletz <barletz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:15:09 +02:00
Javier Martinez Canillas
bf08f39e60 ASoC: Export OF module alias information in missing codec drivers
The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So technically there's no need for a driver to export
the OF table since currently it's not used.

In fact, the I2C device ID table is mandatory for I2C drivers since
a i2c_device_id is passed to the driver's probe function even if the
I2C core used the OF table to match the driver.

And since the I2C core uses different tables, OF-only drivers needs to
have duplicated data that has to be kept in sync and also the dev node
compatible manufacturer prefix is stripped when reporting the MODALIAS.

To avoid the above, the I2C core behavior may be changed in the future
to not require an I2C device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table to prevent
breaking module autoloading if that happens.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-31 19:11:26 +01:00
Takashi Iwai
649ccd0853 ALSA: hda - Fix MacBook Pro 5,2 quirk
MacBook Pro 5,2 with ALC889 codec had already a fixup entry, but this
seems not working correctly, a fix for pin NID 0x15 is needed in
addition.  It's equivalent with the fixup for MacBook Air 1,1, so use
this instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102131
Reported-and-tested-by: Jeffery Miller <jefferym@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-30 22:30:29 +02:00
U. Artie Eoff
342e844905 ALSA: hda - Fix race between PM ops and HDA init/probe
PM ops could be triggered before HDA is done initializing
and cause PM to set HDA controller to D3Hot.  This can result
in "CORB reset timeout#2, CORBRP = 65535" and "no codecs
initialized".  Additionally, PM ops can be triggered before
azx_probe_continue finishes (async probe).  This can result
in a NULL deref kernel crash.

To fix this, avoid PM ops if !chip->running.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 19:37:26 +02:00
Axel Lin
62d6d47cb8 ASoC: max98090: Simplify max98090_readable_register implementation
The readable registers are in consecutive ranges:
	0x01 ~ 0x03, 0x0D ~ 0xD1, 0xFF
So simplify the implementation by specifying a range of consecutive values
in a single case label.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-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-07-29 15:11:50 +01:00
Lars-Peter Clausen
d32e03f0b6 ASoC: xtfpga-i2s: Add missing __rcu annotation
tx_substeam is accessed using the RCU API and hence should have the __rcu
annotation. Fixes the following sparse warnings:

	sound/soc/xtensa/xtfpga-i2s.c:165:24: error: incompatible types in
		comparison expression (different address spaces)
	sound/soc/xtensa/xtfpga-i2s.c:165:24: error: 'struct snd_pcm_substream
		[noderef] <asn:4>*' versus
	sound/soc/xtensa/xtfpga-i2s.c:165:24: error: 'struct snd_pcm_substream *'
	sound/soc/xtensa/xtfpga-i2s.c:255:24: error: incompatible types in
		comparison expression (different address spaces)
	sound/soc/xtensa/xtfpga-i2s.c:255:24: error: 'struct snd_pcm_substream
		[noderef] <asn:4>*' versus
	sound/soc/xtensa/xtfpga-i2s.c:255:24: error: 'struct snd_pcm_substream *'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:07:54 +01:00
Lars-Peter Clausen
85cf604edc ASoC: uniperf: Staticise local symbols
uni_player_dai_ops is not used outside of this file so it should be static.
Fixes the following sparse warning:

	sound/soc/sti/uniperif_player.c:959:30: warning: symbol
		'uni_player_dai_ops' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:07:16 +01:00
Lars-Peter Clausen
b917abb406 ASoC: uniperf: Add missing __iomem annotation
base referes to a iomem region, so it should have the __iomem annotation.
Fixes the following warnings from sparse:

	sound/soc/sti/sti_uniperif.c:169:19: warning: incorrect type in
		assignment (different address spaces)
	sound/soc/sti/sti_uniperif.c:169:19:    expected void *base
	sound/soc/sti/sti_uniperif.c:169:19:    got void [noderef] <asn:2>*
	sound/soc/sti/uniperif_player.c:104:18: warning: incorrect type in
		argument 1 (different address spaces)
	sound/soc/sti/uniperif_player.c:104:18:    expected void const volatile
		[noderef] <asn:2>*addr
	sound/soc/sti/uniperif_player.c:104:18:    got void *
	[...]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:07:05 +01:00
Lars-Peter Clausen
e773c2f964 ASoC: rcar ctu: Staticise local symbols
rsnd_of_parse_ctu() is not used outside this file so it can be static.
Fixes the following sparse warning:

	sound/soc/sh/rcar/ctu.c:72:6: warning: symbol 'rsnd_of_parse_ctu' was
		not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:06:08 +01:00
Lars-Peter Clausen
eccad574ef ASoC: lpass-ipq806x: Staticise local symbols
ipq806x_data is not used outside this file, so it can be static.
Fixes the following sparse warning:

	sound/soc/qcom/lpass-ipq806x.c:76:22: warning: symbol 'ipq806x_data'
		was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:05:34 +01:00
Lars-Peter Clausen
c8a6b92be8 ASoC: wm8804: Drop duplicate const
SOC_ENUM_SINGLE_DECL() already includes a const, drop the extra const.
Fixes the following sparse warning:

	sound/soc/codecs/wm8804.c:101:14: warning: duplicate const

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-07-29 15:05:08 +01:00
Jie Yang
45f503df1b ASoC: Intel: sst_byt: fix initialize 'NULL device *' issue
Add initialization for sst_byt.dev at init stage, which fix the
'NULL device *' warning issues.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:55:16 +01:00
Jie Yang
4b563ea317 ASoC: Intel: haswell: fix initialize 'NULL device *' issue
Add initialization for sst_hsw.dev at init stage, which fix the
'NULL device *' warning issues.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:55:06 +01:00
Axel Lin
85e7118412 ASoC: wm8983: Get rid of wm8983_access_masks table
The max8983_access table is used for look up readable/writable
attributes of registers. The writable registers are mostly in continuous
ranges, so we can replace max8983_access table by using case range.
The read fields are all 0, so just drop implement of .readable callback.

Also set .max_register setting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:54:13 +01:00
Axel Lin
5549ce82e2 ASoC: max98095: Get rid of max98095_access table
The max98095_access table is used for look up readable/writable
attributes of registers. The readable/writable/volatile registers are
mostly in continuous ranges, so we can replace the max98095_access table
entirely by using case range.

Below is a summary of the readable/writeable/volatile registers:

readable registers:
        0x01 ~ 0x97, 0xFF
writeable registers:
        0x0F ~ 0x97
volatile registers:
        0x00 ~ 0x0E, 0x98 ~ 0xFF

This patch reworks the implement for .readable and .volatile and also add
implementation for .writable callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:53:55 +01:00
Axel Lin
f102aa1414 ASoC: max98088: Get rid of max98088_access table
The max98088_access table is used for look up readable/writable/volatile
attributes of registers. The readable/writable/volatile registers are
mostly in continuous ranges, so we can replace the max98088_access table
entirely by using case range.

Below is a summary of the readable/writeable/volatile registers:

readable registers:
        0x00 ~ 0xC9, 0xFF
writeable registers:
        0x03 ~ 0xC9
volatile registers:
        0x00 ~ 0x03, 0xFF

Note, 0x00 should be read-only according to the datasheet.

This patch reworks the implement for .readable and .volatile and also add
implementation for .writable callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:53:41 +01:00
Lars-Peter Clausen
e63bfd45ab ASoC: dapm: Add widget path iterators
Add helper iterator macros for iterating over the source and sink paths of
widget. This will make it easier to change the implementation later on.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:01:39 +01:00
Lars-Peter Clausen
1ce43acff0 ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets()
When running dapm_dai_get_connected_widgets() currently in
is_connected_{input,output}_ep() for each widget that gets added the array
is resized and the code also loops over all existing entries to avoid
adding a widget multiple times.

The former can be avoided by collecting the widgets in a linked list and
only once we have all widgets allocate the array.

The later can be avoided by changing when the widget is added. Currently it
is added when walking the neighbor lists of a widget. Since a widget can be
neighbors with multiple other widgets it could get added twice and hence
the check is necessary. But the main body of is_connected_{input,output}_ep
is guaranteed to be only executed at most once per widget. So adding the
widget to the list at the beginning of the function automatically makes
sure that each widget gets only added once. The only difference is that
using this method the starting point itself will also end up on the list,
but it can easily be skipped when creating the array.

Overall this reduces the code size and speeds things slightly up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:01:38 +01:00
Lars-Peter Clausen
787126ebdb ASoC: dapm: Drop always true checks
list_first_entry() always returns non NULL and since the code previously
checked that list is not empty it will also be a valid pointer. Furthermore
a path has always a sink or a source widget. So both checks are redundant
and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:01:37 +01:00
Axel Lin
82cf77a1bd ASoC: tas2552: Remove unneeded NULL test for tas2552->enable_gpio
It's safe to call gpiod_set_value() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 13:57:15 +01:00
Axel Lin
f8163c8673 ASoC: rt5677: Return error if devm_gpiod_get_optional return ERR_PTR
If devm_gpiod_get_optional() return ERR_PTR, it means something wrong
so request gpio fails. We had better return error in such case.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 13:56:50 +01:00
Yao-Wen Mao
2d1cb7f658 ALSA: usb-audio: add dB range mapping for some devices
Add the correct dB ranges of Bose Companion 5 and Drangonfly DAC 1.2.

Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 09:28:02 +02:00
Takashi Iwai
3a05d12f46 ALSA: hda - Apply a fixup to Dell Vostro 5480
Dell Vostro 5480 (1028:069a) needs the very same quirk used for Vostro
5470 model to make bass speakers properly working.

Reported-and-tested-by: Paulo Roberto de Oliveira Castro <p.oliveira.castro@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 09:04:52 +02:00
Takashi Iwai
527c465a3c Merge branch 'for-linus' into for-next
... to make easier developing HDA ext code.
2015-07-27 14:43:29 +02:00
Woodrow Shen
5ce000b297 ALSA: hda - Add pin quirk for the headset mic jack detection on Dell laptop
The new Dell laptop with codec 256 can't detect headset mic when
headset was inserted on the machine. From alsa-info, we check
init_pin_configs and need to define the new register value for pin
0x1d & 0x1e because the original macro ALC256_STANDARD_PINS can't
match pin definition. Also, the macro ALC256_STANDARD_PINS is
simplified by removing them. This makes headset mic works on laptop.

Codec: Realtek ALC256
Vendor Id: 0x10ec0256
Subsystem Id: 0x102806f2

BugLink: https://bugs.launchpad.net/bugs/1478497
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 12:48:40 +02:00
Takashi Iwai
b9d9c9efc2 ALSA: hda - Apply fixup for another Toshiba Satellite S50D
Toshiba Satellite S50D has another model with a different PCI SSID
(1179:fa93) while the previous fixup was for 1179:fa91.  Adjust the
fixup entry with SND_PCI_QUIRK_MASK() to match with both devices.

Reported-by: Tim Sample <timsample@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 10:18:21 +02:00
Takashi Sakamoto
9c6893e0be ALSA: fireworks: add support for AudioFire2 quirk
Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
This chip includes ARM7 core, and loads and runs program. The firmware
is stored in on-board memory and loaded every powering-on.

Echo Audio ships several versions of firmwares for each model. These
firmwares have each quirk and the quirk changes a sequence of packets.

AudioFire2 has a quirk to transfer a first packet with non-zero in
its dbc field. This causes ALSA Fireworks driver to detect discontinuity.
As long as I investigated, firmware 5.7, 5.7.6 and 5.8 have this quirk.

This commit adds a support for the quirk to handle AudioFire2 packets.
For safe, CIP_SKIP_INIT_DBC_CHECK is applied to all versions of
AudioFire2's firmwares.

02 00050002 90ffffff <-
42 0005000a 90013000
42 00050012 90014400
42 0005001a 90015800
02 0005001a 90ffffff
42 00050022 90019000
42 0005002a 9001a400
42 00050032 9001b800
02 00050032 90ffffff
42 0005003a 9001d000
42 00050042 9001e400
42 0005004a 9001f800
02 0005004a 90ffffff

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 10:12:25 +02:00
Woodrow Shen
e9c28e16a0 ALSA: hda - Fix the headset mic that will not work on Dell desktop machine
When the headset was plugged in the Dell desktop, the mic of headset
can't be detected and workable.
According to the alsa-info, we found the differece between alsa and
init_pin_configs on the machine, so we need to add the pin configs to
make headset work.

Codec: Realtek ALC3234
Vendor Id: 0x10ec0255
Subsystem Id: 0x102806bb

BugLink: https://bugs.launchpad.net/bugs/1477900
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:41 +02:00
Dan Carpenter
44008f0896 ALSA: hda - fix cs4210_spdif_automute()
Smatch complains that we have nested checks for "spdif_present".  It
turns out the current behavior isn't correct, we should remove the first
check and keep the second.

Fixes: 1077a02481 ('ALSA: hda - Use generic parser for Cirrus codec driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:04 +02:00
Takashi Iwai
43cbf02e7a ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
 
  - Fix for binding DAPM stream widgets on devices with prefixes assigned
    to them
  - Minor fixes for the newly added topology interfaces
  - Locking and memory leak fixes for DAPM
  - Driver specific fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVsnNFAAoJECTWi3JdVIfQH9cH/1ddueDFikvXSCyntuJcHAwJ
 a7X5kCVdegMnaMK5fnAbTlJBpDIX/F1UBvsFQQ38eKWeneP44XnkXeh/32fGJzQO
 L730dqy0tkgQdWJkQg0yxaP5/k0BfhnXeRc3ATUG3LBgUBrWRYLTIvaM+G+H3Kf5
 K88QL7cKmeY0Kt6+cms3nnBj9x5oFgbHIW7Y3K/pza+XPVecZ7N3/5gpV+VQDUXh
 Oz3cZOsC5h4+IpxkOrLXY7zgLvrt/HfRTO2QF/3Ntub81anAk190pVAquM+r/CTn
 tQ3sPNGLglQ4VRXNP6yBKJOp5CUTBLt5XWlJ+Kg9p2OiiuOPla4wkhuGDS5AM64=
 =nJJl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.2

A lot of small fixes here, a few to the core:

 - Fix for binding DAPM stream widgets on devices with prefixes assigned
   to them
 - Minor fixes for the newly added topology interfaces
 - Locking and memory leak fixes for DAPM
 - Driver specific fixes
2015-07-24 20:08:13 +02:00
Axel Lin
0a3dcb509a ASoC: Use params_width() at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:31:31 +01:00
Axel Lin
80deaf09cb ASoC: cs4265: CS4265_INT_STATUS is readable register
CS4265_INT_STATUS was missed in cs4265_readable_register, fix it.
The register 0x01 ~ 0x12 are readable, use
CS4265_CHIP_ID ... CS4265_SPDIF_CTL2 syntax for better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:31:03 +01:00
Axel Lin
bffc449688 ASoC: cs4265: Fix setting dai format for Left/Right Justified
The settings in current code does not match the datasheet, fix it.

DAC Control - Address 03h

DAC Digital Interface Format (Bits 5:4)
        DAC_DIF1 DAC_DIF0 Description
        0        0        Left Justified, up to 24-bit data (default)
        0        1        I²S, up to 24-bit data
        1        0        Right-Justified, 16-bit Data
        1        1        Right-Justified, 24-bit Data

Transmitter Control 2 - Address 12h

Transmitter Digital Interface Format (Bits 7:6)
        Tx_DIF1 Tx_DIF0 Description Format Figure
        0       0       Left Justified, up to 24-bit data (default)
        0       1       I²S, up to 24-bit data
        1       0       Right-Justified, 16-bit Data
        1       1       Right-Justified, 24-bit Data

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:30:46 +01:00
Mark Brown
996034b117 Merge remote-tracking branches 'asoc/fix/sgtl5000', 'asoc/fix/topology' and 'asoc/fix/zx' into asoc-linus 2015-07-24 16:18:22 +01:00
Mark Brown
c8a075ab1e Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel', 'asoc/fix/intel-kconfig' and 'asoc/fix/mediatek' into asoc-linus 2015-07-24 16:18:20 +01:00
Mark Brown
5c851ba4d5 Merge remote-tracking branch 'asoc/fix/ssm4567' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
51126f6049 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
66874cc145 Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus 2015-07-24 16:18:18 +01:00
Mark Brown
61710a655f Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2015-07-24 16:18:18 +01:00
Mark Brown
0e375d625b Merge branch 'fix/ssm4567' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ssm4567 2015-07-24 16:15:02 +01:00
Mark Brown
beb8962210 Merge branch 'topic/owner' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ssm4567
Conflicts:
	sound/soc/codecs/ssm4567.c
2015-07-24 16:11:47 +01:00
Harsha Priya
eeffd4b442 ASoC: ssm4567: Added ACPI entry for SSM4567 codec
Added INT343B ACPI ID for the SSM4567 codec

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: M Naveen <naveen.m@intel.com>
Signed-off-by: M R Sathya Prakash <sathya.prakash.m.r@intel.com>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:37:33 +01:00
Axel Lin
97a747117d ASoC: sta529: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
This checking is done by regmap_get_i2c_bus() which is called in
devm_regmap_init_i2c().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:35:28 +01:00
Axel Lin
48f403be3e ASoC: pcm1681: Improve the logic for de-emphasis sampling rate selection
Slightly improve the logic for de-emphasis sampling rate selection by break
out the loop if the rate is matched.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 11:35:13 +01:00
Axel Lin
fa8173a3ef ASoC: pcm1681: Fix setting de-emphasis sampling rate selection
The de-emphasis sampling rate selection is controlled by BIT[3:4] of
PCM1681_DEEMPH_CONTROL register. Do proper left shift to set it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-24 11:34:58 +01:00
Vaishali Thakkar
36e914cc4b ASoC: xtensa: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
The ALSA core takes care that all preallocated memory is freed
when the PCM itself is freed. There is no need to do this
manually in the driver.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:40:37 +01:00
Bard Liao
213213d9d6 ASoC: rl6231: add pll preset table
Currently, rl6231_pll_calc provide a working PLL parameters for
given freq_in and freq_out. However, in some cases it is not the
perfect parameter. For example if freq_in = 19200000 and freq_out
 = 24576000, the calculated parameter will gengrate 24.5647 MHz
which is not exactly the same as what we need. But the PLL can
output 24.576 MHz as exactly what we expect if we set the best
PLL parameter.
To improve it, we put the best match parameters in a preset table.
We can search the preset table first, if there is no preset parameter
for the given freq_in and freq_out, we can still calculate a working
PLL parameter.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:41 +01:00
Jeeja KP
d255b09555 ASoC: Intel: Skylake: Add dsp and ipc init helpers
This helper function will be used by the Skylake driver for dsp and
ipc initialization if processing pipe capability is supported.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:01 +01:00
Jeeja KP
473eb87adc ASoC: Intel: Skylake: Add NHLT support to get BE config
The Non-HD Audio Endpoint Description table contains the link
configuration information for the DSP. This is specific to Non HDA
links only, like I2s and PDM

Skylake driver will use NHLT table to retrieve the configuration based
on the link type, format, channel and rate. This configuration is
passed to DSP FW

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:39:00 +01:00
Lars-Peter Clausen
310398f5e4 ASoC: wm9713: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:43 +01:00
Lars-Peter Clausen
a575be4cbb ASoC: wm9712: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:40 +01:00
Lars-Peter Clausen
6e0b73a0a1 ASoC: wm9705: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:37 +01:00
Lars-Peter Clausen
017e800af9 ASoC: stac9766: Use core reset helper
Use the new snd_ac97_reset() helper and the reset functionality provided by
snd_soc_new_ac97_codec() to perform the device reset rather than
open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:34 +01:00
Lars-Peter Clausen
3ab3dbdfb9 ASoC: ad1980: Use core AC'97 reset helper
Use the new snd_ac97_reset() helper function to perform the reset and
verify the device ID.

Unfortunately the reset can't be done in snd_soc_new_ac97_codec() due to
the special requirements in order to support the non-standard 16-bit slot
mode of the ad1980.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:31 +01:00
Lars-Peter Clausen
7361fbeaea ASoC: ac97: Add support for resetting device before registration
AC97 devices need to be initially reset before they can be used. Currently
each driver does this on its own.

Add support for resetting the device to core in snd_soc_new_ac97_codec().
If the caller supplies a device ID and device ID mask the function will
reset the device and verify that it has the correct ID, if it does not a
error is returned.

This will allow to remove custom code with similar functionality from
individual drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:28 +01:00
Lars-Peter Clausen
5f1d980ee9 ALSA: ac97: Add helper function to reset the AC97 device
There is currently a lot of code duplication in ASoC drivers regarding the
reset handling of devices. This patch introduces a new generic reset
function in the generic AC'97 framework that can be used to replace most
the custom reset functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 17:33:14 +01:00
Axel Lin
9425e9d8c7 ASoC: tas5086: Improve the logic for de-emphasis sampling rate selection
Slightly improve the logic for de-emphasis sampling rate selection by break
out the loop if the rate is matched.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:47:08 +01:00
Axel Lin
95f1044f56 ASoC: tas2552: Fix off-by-one for max_register setting
The latest valid register is TAS2552_VBAT_DATA.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Dan Murphy<dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:46:31 +01:00
Axel Lin
f285f16103 ASoC: rt5677: Remove NULL test for desc before gpiod_set_value_cansleep call
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:46:00 +01:00
Axel Lin
8626e5eb6c ASoC: cs42l73: Fix mask for setting CS42L73_SP_3ST bit
CS42L73_SP_3ST is BIT(7), so the mask field is wrong. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:04:04 +01:00
Axel Lin
d5a78c8ea0 ASoC: cs35l32: Remove unneeded NULL test for cs35l32->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:02:05 +01:00
Axel Lin
4c38b9c30f ASoC: cs35l32: Fix define for CS35L32_SDOUT_3ST
According to the datasheet, the CS35L32_SDOUT_3ST is BIT(3).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-23 16:01:56 +01:00
Koro Chen
775b07de4f ASoC: mediatek: Add suspend/resume callbacks
This adds suspend/resume callbacks, which are common for each DAI.
To be able to continue the last playback/capture after resume
when suspend was done during a playback/capture, in the callbacks
we do backup/restore of registers which were set before prepare stage.
Registers to be backup/restore are defined in a backup list array.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 11:11:18 +01:00
Axel Lin
ec12693e5d ASoC: cs4349: Fix up setting PWR_DWN bit
The PWR_DWN is Bit 7, so current code does not set the PWR_DWN bit. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:55:06 +01:00
Axel Lin
6a75c0b62b ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:55:06 +01:00
Ben Zhang
a6c2a32ac8 ASoC: ssm4567: Keep TDM_BCLKS in ssm4567_set_dai_fmt
The regmap_write in ssm4567_set_dai_fmt accidentally clears the
TDM_BCLKS field which was set earlier by ssm4567_set_tdm_slot.

This patch fixes it by using regmap_update_bits with proper mask.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-22 10:54:22 +01:00
Axel Lin
b101acfabc ASoC: sgtl5000: Fix up define for SGTL5000_SMALL_POP
Currently, below code actually does not update any bit because
SGTL5000_SMALL_POP is 0.

snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, SGTL5000_SMALL_POP, 1);

The SGTL5000_SMALL_POP should be BIT(0) rather than 0, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-By: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-22 10:49:02 +01:00
David Henningsson
cba59972a1 ALSA: hda - Add headset mic pin quirk for a Dell device
Without this patch, the headset mic will not work on this machine.

BugLink: https://bugs.launchpad.net/bugs/1476987
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-22 10:33:32 +02:00
Hui Wang
21e9d017b8 ALSA: hda - remove one pin from ALC292_STANDARD_PINS
One more Dell laptop with alc293 codec needs
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, but the pin 0x1e does not match
the corresponding one in the ALC292_STANDARD_PINS. To use this macro
for this machine, we need to remove pin 0x1e from it.

BugLink: https://bugs.launchpad.net/bugs/1476888
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-22 10:33:00 +02:00
Lars-Peter Clausen
4806896175 ASoC: dapm: Avoid duplicating immutable strings
When creating a new widget from a template the name string of the template
is duplicated for the newly created widget. This is necessary because in
some cases the string might be stored on the stack or other volatile
memory locations.

But most of the time the string is static const data, which means it is
possible to use it directly without having to worry that it might get freed
or changed.

Use kstrdup_const() to handle duplicating the string. This function is
capable of detecting whether a string is immutable and if it is returns the
input without duplicating it. This will slightly reduce the runtime memory
footprint of DAPM and also speed up initialization.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:08:53 +01:00
Lars-Peter Clausen
b97e26980f ASoC: dapm: Add helper function to free a widget
snd_soc_tplg_widget_remove_all() has a verbatim copy of an older version of
the widget freeing code from dapm_free_widgets(). Add a new helper function
that takes care of freeing a widget and use it in both places.

This removes the duplicated code and also makes sure that future changes to
the widget freeing code only have to be made in one location.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:08:53 +01:00
Mark Brown
62d8f23795 Merge branch 'fix/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dapm 2015-07-21 18:08:05 +01:00
Jean-Francois Moine
c4a42915d8 ASoC: kirkwood: prevent double streaming
The kirkwood audio subsystem presents 2 PCM's for one source.
Streaming on a second PCM while the first one is active
cuts this last one.
Then, ending the last stream gives a kernel trap in free_irq().

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 18:07:01 +01:00
Dan Carpenter
a4642e9969 ASoC: sti: error handling bug in sti_uniperiph_cpu_dai_of()
There is a stray '!' which means the condition is never true.

Fixes: f3bd847eb0 ('ASoC: sti: Add uniperipheral dai driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:44:14 +01:00
Dan Carpenter
6eb1c2a63d ASoC: max98925: reading beyond the end of the array
Debug prints are seldom useful and this one has an annoying thing where
it reads one space beyond the end of the array on error.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:40:38 +01:00
Kuninori Morimoto
48725e9cc8 ASoC: rsnd: tidyup parameter assignment position
84e95355602c("ASoC: rsnd: show debug message for SSI/SRC/DVC connection")
added debug message on rsnd_dai_connect(), but the relationship of
parameter check was absurdity. This patch tidyup it.
It is reported via Smatch/Dan

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:39:42 +01:00
Lars-Peter Clausen
a798c24a69 ASoC: dapm: Don't add prefix to widget stream name
Commit fdb6eb0a12 ("ASoC: dapm: Modify widget stream name according to
prefix") fixed the case where a DAPM route between a DAI widget and a
DAC/ADC/AIF widget with a matching stream name was not created when the
DAPM context was using a prefix.

Unfortunately the patch introduced a few issues on its own like leaking the
dynamically allocated stream name memory and also not checking whether the
allocation succeeded in the first place.

It is also incomplete in that it still does not handle the case where
stream name of the widget is a substring of the stream name of the DAI,
which is explicitly allowed and works fine if no DAPM prefix is used.

Revert the commit and take a slightly different approach to solving the
issue. Instead of comparing the widget's stream name to the name of the DAI
widget compare it to the stream name of the DAI widget. The stream name of
the DAI widget is identical to the name of the DAI widget except that it
wont have the DAPM prefix added. So this approach behaves identical
regardless to whether the DAPM context uses a prefix or not.

We don't have to worry about potentially matching with a widget with the
same stream name, but from a different DAPM context with a different
prefix, since the code already makes sure that both the DAI widget and the
matched widget are from the same DAPM context.

Fixes: fdb6eb0a12 ("ASoC: dapm: Modify widget stream name according to prefix")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-07-21 11:32:00 +01:00
Aaron Plattner
6c3d91193d ALSA: hda - Add new GPU codec ID 0x10de007d to snd-hda
Vendor ID 0x10de007d is used by a yet-to-be-named GPU chip.

This chip also has the 2-ch audio swapping bug, so patch_nvhdmi is
appropriate here.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-21 09:37:01 +02:00
Mark Brown
bf9185dda8 ASoC: sti-uniperf: Fix implicit inclusion of pinctrl
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 19:27:40 +01:00
akpm@linux-foundation.org
091571d071 ASoC: cs4349: include gpio/consumer.h
s390 allmodconfig:

sound/soc/codecs/cs4349.c: In function 'cs4349_i2c_probe':
sound/soc/codecs/cs4349.c:300: error: implicit declaration of function 'devm_gpiod_get_optional'
sound/soc/codecs/cs4349.c:301: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)
sound/soc/codecs/cs4349.c:301: error: (Each undeclared identifier is reported only once
sound/soc/codecs/cs4349.c:301: error: for each function it appears in.)
sound/soc/codecs/cs4349.c:306: error: implicit declaration of function 'gpiod_set_value_cansleep'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:32:31 +01:00
Axel Lin
44251551df ASoC: cs4349: Drop platform data support
The struct cs4349_platform_data should be defined in a public header in
include/sound/ rather than in sound/soc/codecs folder.
In additional, the platform data support is not properly handled in this
driver so remove it now.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:18:46 +01:00
Axel Lin
0443de7e7e ASoC: cs4349: Set .writeable_reg for cs4349_regmap
The first valid register index is 1 rather than 0, and the CS4349_CHIPID
is readonly. So set .writeable_reg to avoid writing to these registers.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:18:46 +01:00
Julia Lawall
4313489c25 ASoC: ux500: adjust devm usage
The explicit call to devm_regulator_put in the probe and remove functions
does not seem to be necessary.  In particular, the functions
prcmu_qos_remove_requirement and ux500_msp_i2s_cleanup_msp in the remove
function seem to do nothing that can interfere with devm_regulator_put,
making it safe to allow devm_regulator_put to occur after the end of the
remove function.

Convert the calls to clk_get to devm_clk_get, and remove the corresponding
calls to clk_put in the probe and remove functions.

Replace various gotos by direct returns, and drop unneeded labels.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:17:08 +01:00
Axel Lin
da304ac37e ASoC: cs4349: Fix setting digital interface format
Mode Control - Register 02h

Digital Interface Format (DIF[2:0]) Bits 6-4

DIF2    DIF1    DIF0    Description
0       0       0       Left-Justified, up to 24-bit data
0       0       1       I²S, up to 24-bit data
0       1       0       Right-Justified, 16-bit data
0       1       1       Right-Justified, 24-bit data
1       0       0       TDM slot 0
1       0       1       TDM slot 1
1       1       0       TDM slot 2
1       1       1       TDM slot 3

The DIF_MASK is 0x70, so current code does not correctly set the DIFx
setting. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:16:16 +01:00
Lars-Peter Clausen
dedae86d4d ASoC: cs4349: Don't use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the
callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use
dai->codec instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:29 +01:00
Lars-Peter Clausen
cb2510dac7 ASoC: cs4349: Fix suspend/resume
dev_get_drvdata() will not return the snd_soc_runtime to which this CODEC
is attached, so the current code will result in undefined behavior.
To fix this just use regmap_update_bits(cs4349->regmap, ...) directly
instead of snd_soc_update_bits(rtd->codec, ...).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:28 +01:00
zhengxing
86059653ea ASoC: rockchip: Add machine driver for rt5645/rt5650 codec
The driver is used for rockchip board using a rt5645/rt5650.

Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:07 +01:00
zhengxing
49bdb04405 ASoC: rockchip: Add machine driver for max98090 codec
The driver is used for rockchip board using a max98090.

Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: zhengxing <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:15:07 +01:00
Nicolas Boichat
f136dce451 ASoC: rt5645: Remove return value in jack detect work
"ASoC: rt5645: Check if codec is initialized in workqueue handler"
adds a check if codec is NULL in rt5645_irq_detection, which
returns an int. However, "ASoC: rt5645: Remove irq_jack_detection
function" removes that function, and moves the code in
jack_detect_work, which returns void.

Remove the return value to fix compilation warning.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-20 18:14:15 +01:00
Mark Brown
2c23b0c10f Merge branch 'fix/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645 2015-07-20 18:14:12 +01:00
Maruthi Srinivas Bayyavarapu
5022813ddb ALSA: hda: add new AMD PCI IDs with proper driver caps
Fixes audio problems on newer asics

Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-20 15:29:36 +02:00
David Henningsson
033ea349a7 ALSA: hda - Fix Skylake codec timeout
When the controller is powered up but the HDMI codec is powered down
on Skylake, the power well is turned off. When the codec is then
powered up again, we need to poke the codec a little extra to make
sure it wakes up. Otherwise we'll get sad "no response from codec"
messages and broken audio.

This also changes azx_runtime_resume to actually call
snd_hdac_set_codec_wakeup for Skylake (before STATETS read).
(Otherwise it would only have been called for Haswell and Broadwell,
which both do not need it, so this probably was not the author's
intention.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-20 09:33:24 +02:00
Mateusz Sylwestrzak
0420694ddd ALSA: hda - Add headset mic support for Acer Aspire V5-573G
Acer Aspire V5 with the ALC282 codec is given the wrong value for the
0x19 PIN by the laptop's BIOS. Overriding it with the correct value
adds support for the headset microphone which would not otherwise be
visible in the system.

The fix is based on commit 7819717b11 with a similar quirk for Acer
Aspire with the ALC269 codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96201
Cc: <stable@vger.kernel.org>
Signed-off-by: Mateusz Sylwestrzak <matisec7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-19 17:38:56 +02:00
Axel Lin
b08b338253 ASoC: cs4349: Constify cs4349_regmap
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-18 22:30:21 +01:00
Axel Lin
dd9283e23f ASoC: cs4349: Fix max_register setting for cs4349_regmap
The max_register should be the maximum valid register index rather than
number of registers. Also remove unused defines.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-18 22:30:10 +01:00
Christophe JAILLET
25e5eaf199 ALSA: sparc: Add missing kfree in error path
If 'of_ioremap' fails, then 'amd' should be freed, otherwise, there is a
memory leak.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-17 22:29:43 +02:00
Mark Brown
41a5fefeff regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-reg-default

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.

Conflicts:
	sound/soc/codecs/da7210.c
	sound/soc/codecs/rt5651.c
	sound/soc/codecs/wm8993.c
2015-07-17 19:32:04 +01:00
Kuninori Morimoto
70fb10529f ASoC: rsnd: add MIX (Mixer) support
This patch adds MIX (Mixer) initial support for rsnd driver.
It is assuming that this MIX is used via DPCM.

This is sample code for playback.

	CPU0  : [MEM] -> [SRC1] -> [CTU02] -+
					    |
					    +-> [MIX0] -> [DVC0] -> [SSI0]
	                                    |
	CPU1  : [MEM] -> [SRC2] -> [CTU03] -+

	sound {
		compatible = "renesas,rsrc-card";

		...

		cpu@0 {
			sound-dai = <&rcar_sound 0>;
		};

		cpu@1 {
			sound-dai = <&rcar_sound 1>;
		};

		codec {
			...
		};
	};

	rcar_sound {

		...

		rcar_sound,dai {
			dai0 {
				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
			};
			dai1 {
				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
			};
		};
	};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Kuninori Morimoto
9269e3c3cf ASoC: rsnd: add CTU (Channel Transfer Unit) prototype support
This patch adds CTU (Channel Transfer Unit) support for rsnd driver.
But, it does nothing to data at this point, but is required for MIX
support.

CTU design is a little different from other IPs (CTU0 is including
CTU00 - CTU03, and CTU1 is including CTU10 - CTU13, these have different
register mapping) We need to care about it on this driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Kuninori Morimoto
7dfb491945 ASoC: rsnd: update Audio DMA path search method
Current rsnd driver is assuming Audio DMAC / Audio DMAC peri peri
are used from SSI/SSIU/SRC/DVC. But we will add CTU/MIX to this driver.
Then, current DMA path searching method is not understandable, and good
enough for this purpose. This patch update DMA path search method, more
simply.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Nariman Poushin
dc606e0546 ASoC: wm5110: Use reg_sequence for multi_reg_write/register_patch
Introduced by:
commit 8019ff6cfc
("regmap: Use reg_sequence for multi_reg_write / register_patch")

Interacting with:
commit d1acd31883
("ASoC: wm5110: Add special DRE on/off handling for the headphone path")

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 18:58:02 +01:00
Mark Brown
da7b33739e regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
 without bloating register default tables duplicate the structure under
 the new name reg_sequence and update the APIs to use that instead of
 reg_default.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEbBAABAgAGBQJVqUFGAAoJECTWi3JdVIfQ3YUH+LWLxVerlyUj/uug4vhRLlp2
 KkKLInX1r9Al8cRWo6ln3kdB8jTmOxFxm1XUkpz+IQLiF0yV5kGtVm7uBup/X4DA
 5oi7313rPs4maS/jqwyuOUi8X+ZMkKxp1Pgf4dJAzRJPN5tlks3drYdqY2c7JdT0
 q5IqUR1KIsouK1/wCBy17BEe9PLpjV6U/yN2E/b1tsW1utjtAgY5pPjv/MZpPJ8C
 NI6WXHjdykIi6Peg1mHqczgGEkyRlKBllZVsOvFhX1yjy0ITvao5/Mpv8NK5BwwU
 cOWPVLlXOwa4m+kVXePPgA4GlB2q1Xupw5k6TDPip5aCGUgS+ryKQmOVcNaJnA==
 =C5/o
 -----END PGP SIGNATURE-----

Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-wm5110

regmap: Create a new struct reg_sequence for register sequences

In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.
2015-07-17 18:57:41 +01:00
Linus Torvalds
1ea2a01c1d sound fixes for 4.2-rc3
There are two small fixes for HD-audio and USB LINE6, and the rest are
 a few new quirks and device ID addition that are good enough to get
 into 4.2.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVqNr6AAoJEGwxgFQ9KSmktDUP/0af0005hx/MZ8iWZX3v7Qqj
 zAR5Ils2bbRz+R50WE4X2v6UERoU+DUU5qAh8XOGMAASo4xAUt9Uc/iqDWpPzcv6
 4FJI7lj/8qfsqXT/moO675M1KiPJzPj9CrWQVNZldSCVOC6liGMAcvuLOIxKv8PU
 VBkwsVdZEa5WRwx21DOXeTnqsPWGF/sjz4i1SOFYrHjLPZspNE0lL9rX2xj0jS1Y
 SQgY96zIT58AqVnJNiAmyNVSTQZ915JqgBPrMWJst6xZTKMRSmmFcnLv0ep+SSsn
 DptdMlER8j4bC9YGxj7v1FIEeU6gkyUQ3MZ2c8AVqsrap1zTot2HWBqKQGK+3Rnr
 VkYxTVJ2grEZ53JPw6vI5LydqsW50Iq8lR0dFrLrVTzVzYA02pahp2uovBQ/FJ1P
 Lp03vt3krvSSuOW2a9pK9Y0j5KAJFvxb3YWMONJ922JJPvnur0z6w8kxJ3Y4DwwR
 TD0FeetGptYSh1ZvViBGUv6AfdreQV5J2eqL/bsFMxk2NoXJaiF8tb8cCoQFFl7N
 QZtE1yJKnv8xDjgoxYXhqwDG2+j8okRa3h7ov3MVExjh7KV7wmM+G6H7LiV1SpQ5
 9SIjkgIwoMOSQGt+AubnCZdsMQZWRX8YDQS8048J6X4+SDdNKNwXASNhC5HCtfSS
 kGVXxyJRgEvcoBAnx96n
 =EgRm
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "There are two small fixes for HD-audio and USB LINE6, and the rest are
  a few new quirks and device ID addition that are good enough to get
  into 4.2"

* tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]
  ALSA: line6: Fix -EBUSY error during active monitoring
  ALSA: hda - Fix a wrong busy check in alt PCM open
  ALSA: hda - add codec ID for Broxton display audio codec
  ALSA: usb-audio: Add MIDI support for Steinberg MI2/MI4
2015-07-17 10:54:30 -07:00
Takashi Iwai
fbce23a0b9 ALSA: hda - Check the return value from pm_runtime_get/put*()
This patch changes the return type of snd_hdac_power_up/down() and
variants to pass the error code from the underlying
pm_runtime_get/put() calls.  Currently they are ignored, but in most
places, these should be handled properly.

As an example, the regmap handler is updated to check the return value
and accesses the register only when the wakeup succeeds.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-17 16:27:33 +02:00
Takashi Iwai
67756e3191 ALSA: pcm: Fix lockdep warning with nonatomic PCM ops
With the nonatomic PCM ops, the system may spew lockdep warnings like:

 =============================================
 [ INFO: possible recursive locking detected ]
 4.2.0-rc1-jeejaval3 #12 Not tainted
 ---------------------------------------------
 aplay/4029 is trying to acquire lock:
  (snd_pcm_link_rwsem){.+.+.+}, at: [<ffffffff816fd473>] snd_pcm_stream_lock+0x43/0x60

 but task is already holding lock:
  (snd_pcm_link_rwsem){.+.+.+}, at: [<ffffffff816fcf29>] snd_pcm_action_nonatomic+0x29/0x80

 other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(snd_pcm_link_rwsem);
   lock(snd_pcm_link_rwsem);

Although this is false-positive as the rwsem is taken always as
read-only for these code paths, it's certainly annoying to see this at
any occasion.  A simple fix is to use down_read_nested() in
snd_pcm_stream_lock() that can be called inside another lock.

Reported-by: Vinod Koul <vinod.koul@intel.com>
Reported-by: Jeeja Kp <jeeja.kp@intel.com>
Tested-by: Jeeja Kp <jeeja.kp@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-17 15:36:54 +02:00
Heloise NH
6986a0e255 ALSA: hda: fix kstrdup return value
In kstrdup we should return -ENOMEM when it reports an
memory allocation failure, while the -ENODEV is referred
to a failure in finding the cpu node in the device tree.

Signed-off-by: Heloise NH <kernelpatch_update@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-17 14:56:19 +02:00
Koro Chen
9fc114c5d7 ASoC: rt5645: Add regulator support
This adds basic regulator support for rt5645.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:01 +01:00
Koro Chen
5168c5476a ASoC: rt5645: Fix missing free_irq
The driver does not free irq when snd_soc_register_codec returns error.
It does not return error when request irq failed, either.

Add return when request irq failed, and free_irq if
snd_soc_register_codec failed.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:01 +01:00
Nicolas Boichat
582edace0b ASoC: rt5645: Remove unused rt5645 variable
"ASoC: rt5645: Simplify rt5645_enable_push_button_irq" removes
the test that accessed rt5645->pdata.jd_mode (that test is now
done in rt5645_jack_detect only), so we do not need that
variable anymore.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:16:00 +01:00
Axel Lin
42d1b8ce29 ASoC: Constify dev_pm_ops variables
The dev_pm_ops variables are not modified after initialization in these
drivers, so make them const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:14:48 +01:00
Nicolas Boichat
f2a5ded385 ASoC: rt5645: Check if codec is initialized in workqueue handler
This fixes kernel panic on boot, if rt5645->codec is NULL when
rt5645_jack_detect_work is first called.

rt5645_jack_detect_work needs rt5645->codec to be initialized to setup
dapm pins. Also, reporting jack events is useless, as the jacks cannot
be set before the codec is ready.

Since we manually call the interrupt handler in
rt5645_set_jack_detect, the initial jack state will be reported
correctly, and dapm pins will be setup at that time.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 12:12:20 +01:00
kbuild test robot
f2da454226 ASoC: sti: sti_uniperiph_dai_create_ctrl() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 01:08:47 +01:00
Kuninori Morimoto
78edead449 ASoC: rsnd: tidyup SRC position on each code
This is cleanup for CTU/MIX support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
5cbbadd3d5 ASoC: rsnd: add rsnd_io_to_mod()
Sometimes we would like to get each module directly, especially data path
searching. this patch adds rsnd_io_to_mod() macro, and existing
rsnd_io_to_mod_xxx() use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
ddea1b2e83 ASoC: rsnd: dma: add DMA name on .ops
Current rsnd driver is using Audio DMAC (via DMAEngine) and
Audio DMAC peri peri (via original method), and usage of these DMAC
are different. Indicates its naming is useful for debugging.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
9469b8b609 ASoC: rsnd: check the Gen1 at the beginning of DVC probe
DVC doesn't support Gen1, check it beginning of probe

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
98d358af07 ASoC: rsnd: tidyup rsnd_dma_ops definition place
rsnd_dma_ops is used only from dma.c, rsnd.h doesn't need it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
84e9535560 ASoC: rsnd: show debug message for SSI/SRC/DVC connection
It can help for connection debug

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto
4689032b11 ASoC: rsnd: tidyup data align position
Sound L/R order of SSI is different from Linux sound data order.
So current rsnd driver is using DALIGN (= data align) to exchange data
align on SSIU. OTOH, CMD/SRC/SSIU have DALIGN register. Now inverted
sound volume will be exchanged if user used volume control on DVC.
Because SSIU which exchanges data align is located after DVC.

	MEM -> SRC -> DVC -> SSI

This patch exchanges data align SRC if possible

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
bfe1360d79 ASoC: rsnd: add rsnd_get_adinr_chan()
Current rsnd driver has rsnd_get_adinr_bit() to get bit settings for
ADINR (= Audio Information Register) of SSIU/SRC/DVC.
This patch adds rsnd_get_adinr_chan() to get channel settings for
ADINR (= Audio Information Register) of CTU/MIX.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
3023b384d0 ASoC: rsnd: tidyup ADINR function name
Renesas sound IP (= SSIU/SRC/CTU/MIX/DVC) have ADINR
(= Audio Information Register), but some of them (= SSIU/SRC/DVC)
are for audio data bits, some of them (= CTU/MIX) are for audio data
channels.
Current rsnd driver is supporting SSIU/SRC/DVC, and these ADINR were
for bits. This patch rename rsnd_get_adinr() to rsnd_get_adinr_bit(),
and we will have rsnd_get_adinr_chan() for CTU/MIX.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
d1ade514e8 ASoC: rsnd: add rsnd_src_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_initialize_lock/unlock() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
3bb3d363e5 ASoC: rsnd: add rsnd_dvc_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_initialize_lock/unlock() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
e2c0841619 ASoC: rsnd: add rsnd_path_parse() for CTU/MIX/DVC route setting
Current sound data route settings is done in dvc.c, and it doesn't care
about CTU/MIX at this poinnt, but we need to care about these.
OTOH, rsnd driver already has rsnd_path_xxx() functions for data path which
are good match for CTU/MIX/DVC path selectio.
This patch adds new rsnd_path_parse() to select sound data route which will
care about CTU/MIX/DVC path.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
c8cf15f64f ASoC: rsnd: rename rsnd_path_parse/break() into add/remove
parse/break is a little ambiguous/confusable name for rsnd module path.
Especially for CTU/MIX support. It was renamed to add/remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto
d6f8d5b442 ASoC: rsnd: enable module multi connection
'8a4e379b54f8("ASoC: rsnd: remove io from rsnd_mod")' removed mod/io
relationship. rsnd_dai_connect() mod/io check is no longer needed

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto
379febfd2e ASoC: rsnd: src: make sure SRC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_soft_reset() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto
636e4bad5c ASoC: rsnd: dvc: make sure DVC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_soft_reset() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto
da599fd34b ASoC: rsnd: move SRC specific macro into src.c
rsnd_src_nr() is used only from src.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:34 +01:00
Kuninori Morimoto
4f35fabaa3 ASoC: rsnd: move DVC specific macro into dvc.c
rsnd_dvc_nr() is used only from dvc.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:34 +01:00
Kuninori Morimoto
72413c107e ASoC: rsnd: rsnd_mod_id() return -1 if mod was NULL
enabling to use same method for exception case is useful.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:33 +01:00
Kuninori Morimoto
1a1bf58aaf ASoC: rsnd: add workaround for SRC sync convert + DVC
We couldn't use SRC sync convert mode together with DVC,
but we can use workaround for it.
This patch adds workaround and can use SRC sync convert + DVC

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:33 +01:00
Kuninori Morimoto
a48e3f9747 ASoC: rsnd: fixup each module counter on __rsnd_mod_call()
'5451ea443b ("ASoC: rsnd: count each mod (SSI/SRC/DVC)")' counts each
module's callback status, but counts 1st callback only.
This patch fixup it. Otherwise, multi-called function will be trouble

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:33 +01:00
Kuninori Morimoto
efa991dc91 ASoC: rsnd: rename INT_ENABLE to SSI_INT_ENABLE
based on datasheet

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:33 +01:00
Kuninori Morimoto
cdde84d10d ASoC: rsnd: rename BUSIF_DALIGN to SSI_BUSIF_DALIGN
based on datasheet

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:33 +01:00
Kuninori Morimoto
6abcae32ea ASoC: rsnd: remove unnecessary 'out of memory' message from DVC
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:32 +01:00
Kuninori Morimoto
33363f7a18 ASoC: rsnd: remove unnecessary 'out of memory' message from SRC
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:32 +01:00
Kuninori Morimoto
afa7007296 ASoC: rsnd: remove unnecessary 'out of memory' message from SSI
Current checkpatch.pl indicates 'out of memory' message is unnecessary.
Let's remove it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:32 +01:00
Kuninori Morimoto
b7419dd736 ASoC: rsrc-card: use snd_soc_of_parse_audio_route/prefix for routing
using common audio routing path method makes sense.
Let's use snd_soc_of_parse_audio_route/prefix.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:32 +01:00
Mark Brown
904e8b0b30 Merge branch 'topic/of-name' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar 2015-07-16 22:04:17 +01:00
Nariman Poushin
8019ff6cfc regmap: Use reg_sequence for multi_reg_write / register_patch
Separate the functionality using sequences of register writes from the
functions that take register defaults. This change renames the arguments
in order to support the extension of reg_sequence to take an optional
delay to be applied after any given register in a sequence is written.
This avoids adding an int to all register defaults, which could
substantially increase memory usage for regmaps with large default tables.

This also updates all the clients of multi_reg_write/register_patch.

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:02:55 +01:00
Kuninori Morimoto
5e3cdaa208 ASoC: core: add snd_soc_of_parse_audio_prefix()
Current ASoC can add name_prefix for DAPM, and it is necessary for
route settings. This patch adds snd_soc_of_parse_audio_prefix() for
this purpose. It will be used with snd_soc_of_parse_audio_routing().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:59:41 +01:00
Tim Howe
e40da86a37 ASoC: cs4349: Add support for Cirrus Logic CS4349
Signed-off-by: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:56:02 +01:00
Omair M Abdullah
28f3b6f113 ASoC: Intel: Skylake: Print error code in IPC for SKL
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
a750ba5f5a ASoC: Intel: Skylake: Add SKL DSP initialization
This adds the dsp and ipc initialization for the Skylake platform.
It also requests firmware and uses code loader dma to load it.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
6cb0033380 ASoC: Intel: Skylake: Process code loader DMA interrupt
The code loader DMA interrupt is received by main interrupt handler which
dispatches it to cldma routines

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul
3e40a78461 ASoC: Intel: Skylake: Add code loader DMA APIs
This patch adds the last piece of code loader DMA APIs by adding the code
loader DMA APIs for the driver to use

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul
914426c865 ASoC: Intel: Skylake: add code loader DMA operations
This patch starts adding code loader DMA handling internal operations for
setting up bdle, controller, spb, cleanup routines and buffer filling

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Vinod Koul
e30903877f ASoC: Intel: Skylake: Add code loader DMA registers
Skylake has a DMA controller for loading DSP code and modules to memory.
Add the register defines for this DMA

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Subhransu S. Prusty
b662680252 ASoC: Intel: Skylake: Add dsp loader ops
The ops is initialized during the dsp registration and used for the
allocating dma buffers.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:46:50 +01:00
Arnaud Pouliquen
fa050796b3 ASoC: sti: Add clock adjustement control
Add capability to adjust player clock, for clocks drift management.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:24 +01:00
Arnaud Pouliquen
1e6babb417 ASoC: Add ability to build sti drivers
Define the platform and codec drivers, and how to build them.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:24 +01:00
Arnaud Pouliquen
f3bd847eb0 ASoC: sti: Add uniperipheral dai driver
ASoc uniperipheral dai driver that manages uniperipheral DAIs and registers
associated generic dma engine platform.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Arnaud Pouliquen
c3a0003aaf ASoC: sti: Add CPU DAI driver for capture
Add code to manage Uniperipheral reader IP instances.
These DAIs are dedicated to capture and support I2S and IEC modes.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Arnaud Pouliquen
ed6c75f233 ASoC: sti: minor corrections for uniplayer
Minor corrections after code review.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:38:23 +01:00
Lars-Peter Clausen
04b5cbd80a ASoC: max9768: Convert to component
The driver does not use any CODEC specific constructs anymore. Convert it
to snd_soc_component.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:36:23 +01:00
Lars-Peter Clausen
d79cca1a99 ASoC: max9768: Use managed gpio request
Makes the code a bit shorter and simpler.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:36:23 +01:00
Lars-Peter Clausen
623436af42 ASoC: max9877: Convert to component
The driver does not use any CODEC specific constructs anymore. Convert it
to snd_soc_component.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:35:12 +01:00
Lars-Peter Clausen
df2e268226 ASoC: max9877: Make driver global regmap struct local
Use a stack local variable to handle function local state rather than a
global static variable. The later has a potential for race conditions if
the probe function runs for two devices concurrently.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 21:35:12 +01:00
Mark Brown
7d9fb377a7 Merge branches 'topic/owner' and 'topic/reg-default' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max9877 2015-07-16 21:35:01 +01:00
Nicolas Boichat
a4e3c5fa95 ASoC: rt5645: Simplify rt5645_enable_push_button_irq
LDO2/Mic Det Power pins are already enabled/disabled in rt5645_jack_detect
(the jack out code path previously did not disable those if button function
is enabled: modify it to make it so).

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:10:47 +01:00
Nicolas Boichat
b14c917409 ASoC: rt5645: Update dapm pins when the card is not instantiated yet
This makes sure the dapm state is consistent when the card is
instantiated.

However, if the card is not instantiated yet, we still update the
registers manually in the "jack in" case, so that we can immediately
report if a mic is present or not.

Disabling "Mic Det Power" after detection, and on jack out, can
wait until the card gets instantiated.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:10:46 +01:00
Bard Liao
5efe58c443 ASoC: rt298: remove meanless pr_info
This line doesn't include any information. So, remove it.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 13:09:53 +01:00
Keith Packard
98973f2f08 ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]
This laptop needs GPIO4 pulled high to enable the headphone amplifier,
and has a mute LED on GPIO3. I modelled the patch on the existing
GPIO4 code which pulls the line low for the same purpose; this time,
the HP amp line is pulled high.

v2: Disable the headphone amplifier when no headphone is connected.
    Don't disable power savings to preserve the LED state.

v3: Remove headset-specific hooks and code; this is just a headphone.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-16 12:20:08 +02:00
Arnaud Pouliquen
601b9d9c7b ASoC: sti-sas: fix x86 compilation issue.
Fixes for compilation warnings and errors reported by Kbuild test robot
for x86_64 and i386.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 09:59:23 +01:00
Geert Uytterhoeven
be9ae23092 ASoC: fsi: Remove obsolete sh_fsi2 platform_device_id entry
Since the removal of the r8a7740 legacy board code in commit
1fa59bda21 ("ARM: shmobile: Remove legacy board code for
Armadillo-800 EVA"), all former users of the "sh_fsi2" platform device
name are only supported in generic DT-only ARM multi-platform builds.
The driver doesn't need to match platform devices by name anymore, hence
remove the corresponding platform_device_id entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 09:58:00 +01:00
Masanari Iida
7d1442b4c4 ASoC: Fix warning caused by a typo in comments of snd_soc_add_platform()
This patch fix following warnings.
Warning(.//sound/soc/soc-core.c:2855): No description found
for parameter 'platform_drv'
Warning(.//sound/soc/soc-core.c:2855): Excess function parameter
'platform_driver' description in 'snd_soc_add_platform'

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 17:56:51 +01:00
Masanari Iida
231b86b1d8 ASoC: Fix warning while make xmldocs caused by soc-core.c
This patch fix following warning while make xmldocs.
Warning(.//sound/soc/soc-core.c:2148): No description found
for parameter 'ratio'

Add missing ":"

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-15 17:56:51 +01:00