GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agoALSA: hda: add hda link cleanup routine
Vinod Koul [Wed, 17 Jun 2015 05:50:17 +0000 (11:20 +0530)]
ALSA: hda: add hda link cleanup routine

In HDA extended bus the HDA link objects are created when multilink
capabilities are parsed. We need a routine which free up these link objects
for a bus. So add snd_hdac_link_free_all routine

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>
9 years agoALSA: hda: add hdac_ext stream creation and cleanup routines
Vinod Koul [Wed, 17 Jun 2015 05:50:16 +0000 (11:20 +0530)]
ALSA: hda: add hdac_ext stream creation and cleanup routines

HDAC extended core should create streams for an extended bus and also free
up those on cleanup. So introduce snd_hdac_ext_stream_init_all and
snd_hdac_stream_free_all routines

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>
9 years agoALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
Vinod Koul [Tue, 16 Jun 2015 15:30:22 +0000 (21:00 +0530)]
ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core

Since this is common option for HDA driver to specfiy pre-allocated
buffer, we should make this option availble to all HDA driver by
moving this to HDA core

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 16 Jun 2015 10:47:34 +0000 (12:47 +0200)]
Merge branch 'for-linus' into for-next

Yet another non-trivial conflicts for HDA legacy stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix unused label skip_i915
Takashi Iwai [Tue, 16 Jun 2015 10:23:36 +0000 (12:23 +0200)]
ALSA: hda - Fix unused label skip_i915

When CONFIG_SND_HDA_I915=n, we get a compile warning:
  sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
  sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]

Fix it by putting again ifdef to it.  Sigh.

Fixes: bf06848bdbe5 ('ALSA: hda - Continue probing even if i915 binding fails')
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix noisy outputs on Dell XPS13 (2015 model)
Takashi Iwai [Mon, 15 Jun 2015 18:36:12 +0000 (20:36 +0200)]
ALSA: hda - Fix noisy outputs on Dell XPS13 (2015 model)

The new Dell XPS13 also requires the similar quirk for fixing the
noisy outputs.  (But, as the codec was changed, now the fixup for
Latitude is used instead.)

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99851
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: add support for Behringer FCA 610/1616
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:37 +0000 (12:49 +0900)]
ALSA: bebob: add support for Behringer FCA 610/1616

They're based on DM1500 (ArchWave produced), and BeBoB version 3 is
installed.

$ cat /proc/asound/FCA610/firewire/firmware
Manufacturer: bridgeCo
Protocol Ver: 3
Build Ver: 0
GUID: 0x001564000002AD73
Model ID: 0x03
Model Rev: 0
Firmware Date: 20121102
Firmware Time: 153431
Firmware ID: 0x610
Firmware Ver: 8348
Base Addr: 0x400C0080
Max Size: 1422624
Loader Date: 20121015
Loader Time: 104710

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: keep duplex streams always to keep internal multiplexer properly
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:36 +0000 (12:49 +0900)]
ALSA: bebob: keep duplex streams always to keep internal multiplexer properly

Behringer FCA610 transmits packets with periodic noisy PCM samples
when receiving no streams, and generates a bit noisy sound.

ALSA BeBoB driver is programmed to establish both in/out connections
when starting streaming, then transfers packets as userspace applications
requested. This means that there's a case that one of incoming/outgoing
streams is running, to save CPU and bandwidth usage. Although, it's natural
to start transferring packets in both direction.

This commit makes this driver to keeps duplex streams always.

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: loosen up severity of checking continuity for BeBoB v3 quirk
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:35 +0000 (12:49 +0900)]
ALSA: bebob: loosen up severity of checking continuity for BeBoB v3 quirk

PrismSound Orpheus, Behringer UFX1604 and FCA610 work with BeBoB v3, and
they're confirmed to transmit discontinuous packets in the beginning of
streaming.

payload    CIP headers
  8        0x00070000 0x9002FFFF
  8        0x00070000 0x9002FFFF
  8        0x00070000 0x9002FFFF
  8        0x00070008 0x9002FFFF <-
  8        0x00070008 0x9002FFFF
  8        0x00070008 0x9002FFFF
  8        0x00070008 0x9002FFFF
  8        0x00070008 0x9002FFFF
  8        0x00070008 0x9002FFFF
232        0x00070000 0x9002E798 <-
232        0x00070008 0x9002FB99
232        0x00070010 0x90021398
  8        0x00070018 0x9002FFFF
(This sample was got with Behringer FCA610 and FFADO library.)

This commit sets CIP_EMPTY_HAS_WRONG_DBC and CIP_SKIP_DBC_ZERO_CHECK to
ignore these discontinuities.

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: expand timeout for DM1500 quirk
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:34 +0000 (12:49 +0900)]
ALSA: bebob: expand timeout for DM1500 quirk

Behringer FCA610 and UFX1604 is confirmed to require more time till
transmitting packets after establishing connections. This seems to
be a quirk of DM1500 ASIC which ArchWave produced.

For this quirk, this commit extends the time to wait up to 2 seconds.
As a result, in worst cases, below userspace functions require 2 seconds
to return.
 - snd_pcm_prepare()
 - snd_pcm_hw_params()
 - snd_pcm_recover()

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: add 'version' member for BeBoB protocol version
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:33 +0000 (12:49 +0900)]
ALSA: bebob: add 'version' member for BeBoB protocol version

BeBoB installed devices have BeBoB register area. This area stores
basic information about its firmware. A register has its protocol
version.

This commit adds 'version' member and store the device's protocol
version to handle v3 quirks in following commits.

Tested-by: Kim Tore Jensen <kim@incendio.no>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: add SYT-Match support
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:32 +0000 (12:49 +0900)]
ALSA: bebob: add SYT-Match support

In previous commits, this driver can detect the source of clock as mush
as possible. SYT-Match mode is also available.

This commit purge the restriction.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: obsolete string literal expression for clock source
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:31 +0000 (12:49 +0900)]
ALSA: bebob: obsolete string literal expression for clock source

The old string literals were completely replaced by new normalized
representation.

This commit obsoletes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: use normalized representation for the type of clock source
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:30 +0000 (12:49 +0900)]
ALSA: bebob: use normalized representation for the type of clock source

This commit changes function prototype and its processing. As a result,
function caller can execute additional processing according to detected
clock source.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: preparation for replacing string literals by normalized representation...
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:29 +0000 (12:49 +0900)]
ALSA: bebob: preparation for replacing string literals by normalized representation for model-dependent structures

Previous commit adds a enumerator as a normalized representation of
clock source, while model-dependent structures still use string literals
for this purpose.

This commit is a preparation for replacement.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: apply new enumerator to normalize the type of clock source
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:28 +0000 (12:49 +0900)]
ALSA: bebob: apply new enumerator to normalize the type of clock source

Previous commit allows this driver to detect several types of clock
source, while there's no normalized expression for it.

This commit adds a new enumerator for this purpose.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: improve signal mode detection for clock source
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:27 +0000 (12:49 +0900)]
ALSA: bebob: improve signal mode detection for clock source

With BeBoB version 3, current ALSA BeBoB driver detects the type of
current clock signal source wrongly. This is due to a lack of proper
implementation to parse the information.

This commit renews the parser. As a result, this driver detects
SYT-Match clock signal, thus it can start streams with two modes;
SYT-Match mode and the others. SYT-Match mode will be supported in future
commits.

There's a constrain about detected internal/external clock source.
When detecting external clock source, this driver allows userspace
applications to use current sampling rate only. This is due to consider
abour synchronization to external clock sources such as S/PDIF, ADAT or
word-clock.

According to several information from some devices, I guesss that the
internal clock of most devices synchronize to IEEE 1394 cycle start
packet. In this case, by a usual way, it's detect as 'Sync type
of output Music Sub-Unit' connected to 'Sync type of PCR output Unit
(oPCR)', and this driver judges it as internal clock. Therefore,
userspace applications is allowed to request arbitrary supported sampling
rates.

On the other hand, several devices based on BeBoB version 3 have
additional internal clock. In this case, by a usual way, it's detect as
'Sync/Additional type of External input Unit'. Unfortunately, there's no
way to distinguish this sync type from the other external clock sources
such as word-clock. In this case, this driver handles it as external and
userspace applications is forced to use current sampling rate.

I note that when the source of clock is detected as 'Isochronous stream
type of input PCR[0]', it's under 'SYT-Match' mode. In this mode, the
synchronization clock is generated according to SYT-series in received
packets. In this case, this driver generates the series by myself. I
experienced this mode often make the device silent suddenly during
playbacking. This means that the mode is easy to lost synchronization.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: mips: let SND_SGI_O2 select SND_PCM
Nicholas Mc Guire [Sun, 14 Jun 2015 17:16:59 +0000 (19:16 +0200)]
ALSA: mips: let SND_SGI_O2 select SND_PCM

Fix the missing dependency on PCM stuff.

[Add the same fix for HAL2, too -- tiwai]

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 15 Jun 2015 11:15:48 +0000 (13:15 +0200)]
Merge branch 'for-linus' into for-next

Conflicts:
sound/pci/hda/patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix audio crackles on Dell Latitude E7x40
Takashi Iwai [Mon, 15 Jun 2015 09:59:32 +0000 (11:59 +0200)]
ALSA: hda - Fix audio crackles on Dell Latitude E7x40

We still got a report that the audio crackles and noises occur with
the recent 4.1 kernels on Dell machines.  These machines seem to need
similar workarounds that have been applied to the recent Dell XPS 13
models.  Since the codec of these machines (Dell Latitute E7240 and
E7440) is different from XPS 13's one, we need a new fixup entry.

Also, it was confirmed that the previous workaround to disable the
widget power-save (commit [219f47e4f964: ALSA: hda - Disable widget
power-saving for ALC292 & co]) is no longer needed after this fix.
So, this patch includes the partial revert of the commit, too.

Reported-and-tested-by: Mihai Donțu <mihai.dontu@gmail.com>
Tested-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
Hui Wang [Mon, 15 Jun 2015 09:43:39 +0000 (17:43 +0800)]
ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine

On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
the headphone will be assigned to a DAC and the 2 speakers will be
assigned to another DAC, this assignment makes the surround-2.1
channels invalid.

To fix it, here using a DAC/pin preference map to bind the main
speaker to 1 DAC and the subwoofer speaker will be assigned to another
DAC.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda-beep: Update authors dead email address
Matt Ranostay [Sat, 13 Jun 2015 04:47:46 +0000 (21:47 -0700)]
ALSA: hda-beep: Update authors dead email address

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound: oss/sb_audio: use swap() in sb_audio_close()
Fabian Frederick [Fri, 12 Jun 2015 16:59:08 +0000 (18:59 +0200)]
sound: oss/sb_audio: use swap() in sb_audio_close()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: gus: use swap() in snd_ics_put_double()
Fabian Frederick [Fri, 12 Jun 2015 16:58:59 +0000 (18:58 +0200)]
ALSA: gus: use swap() in snd_ics_put_double()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: aoa: convert bus code to use dev_groups
Quentin Lambert [Fri, 12 Jun 2015 08:38:41 +0000 (10:38 +0200)]
ALSA: aoa: convert bus code to use dev_groups

The dev_attrs field of struct bus_type is going away, use dev_groups instead.
This converts the soundbus code to use the correct field.

These modifications were made using Coccinelle.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Fri, 12 Jun 2015 06:10:20 +0000 (08:10 +0200)]
Merge branch 'for-linus' into for-next

Yet another non-trivial conflicts resolution for the recent HD-audio fix.

Conflicts:
sound/pci/hda/hda_intel.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Abort the probe without i915 binding for HSW/BDW
Takashi Iwai [Fri, 12 Jun 2015 05:53:58 +0000 (07:53 +0200)]
ALSA: hda - Abort the probe without i915 binding for HSW/BDW

The previous patch tried to continue the probe if i915 binding fails.
For for simplicity reason, we haven't implemented abort even for
controller chips that are dedicated for HDMI/DP on HSW and BDW.
However, Mengdong suggested that this can be dangerous; BIOS may
disable gfx power well although the PCI entry for HD-audio is left,
and this may result in the unexpected behavior, kernel errors, etc.

For avoiding this situation, abort the probe at i915 binding failure
only for HSW/BDW chips selectively.  For other chips, it still
continues.

Fixes: bf06848bdbe5 ('ALSA: hda - Continue probing even if i915 binding fails')
Reported-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: HDA: remove the unused function declaration
Vinod Koul [Thu, 11 Jun 2015 16:41:49 +0000 (22:11 +0530)]
ALSA: HDA: remove the unused function declaration

Commit a1b3fda6ae ALSA: hdac_ext: add hdac extended controller,
erroneously added snd_hdac_ext_bus_map_codec_to_link() function
declaration, so remove it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix link power unbalance at device removal
Takashi Iwai [Thu, 11 Jun 2015 12:02:49 +0000 (14:02 +0200)]
ALSA: hda - Fix link power unbalance at device removal

snd_hdac_link_power() has to be called after unregistering the codec
device.  Otherwise the device might be already runtime-suspended, thus
the refcount goes under zero, triggering a warning like:

  WARNING: CPU: 7 PID: 2014 at sound/hda/hdac_i915.c:63 snd_hdac_display_power+0x106/0x120 [snd_hda_core]()
  CPU: 7 PID: 2014 Comm: modprobe Not tainted 4.1.0-rc7-test+ #1
  Call Trace:
   [<ffffffff81697fe3>] dump_stack+0x4c/0x6e
   [<ffffffff810696da>] warn_slowpath_common+0x8a/0xc0
   [<ffffffff810697ca>] warn_slowpath_null+0x1a/0x20
   [<ffffffffa02dd526>] snd_hdac_display_power+0x106/0x120 [snd_hda_core]
   [<ffffffffa030b422>] azx_intel_link_power+0x12/0x20 [snd_hda_intel]
   [<ffffffffa037139f>] azx_link_power+0x1f/0x30 [snd_hda_codec]
   [<ffffffffa02d89fe>] snd_hdac_link_power+0x2e/0x40 [snd_hda_core]
   [<ffffffffa0368524>] snd_hda_codec_dev_free+0x34/0x50 [snd_hda_codec]
   [<ffffffffa0252061>] __snd_device_free+0x51/0xa0 [snd]
   .....

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hdac_ext: add extended stream capabilities
Jeeja KP [Thu, 11 Jun 2015 08:41:49 +0000 (14:11 +0530)]
ALSA: hdac_ext: add extended stream capabilities

Now we have the bus and controller code added to find and initialize
the extended capabilities. Now we need to use them in stream code to
decouple stream, manage links etc

So this patch adds the stream handling code for extended capabilities
introduced in preceding patches

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>
9 years agoALSA: hdac_ext: add hdac extended controller
Jeeja KP [Thu, 11 Jun 2015 08:41:48 +0000 (14:11 +0530)]
ALSA: hdac_ext: add hdac extended controller

The controller needs to support the new capabilities and allow
reading, parsing and initializing of these capabilities, so this patch
does it

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>
9 years agoALSA: hdac_ext: add extended HDA bus
Jeeja KP [Thu, 11 Jun 2015 08:41:47 +0000 (14:11 +0530)]
ALSA: hdac_ext: add extended HDA bus

The new HDA controllers from Intel support new capabilities like
multilink, pipe processing, SPIB, GTS etc In order to use them we
create an extended HDA bus which embed the hdac bus and contains the
fields for extended configurations

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>
9 years agoALSA: usb-audio: Set correct type for some UAC2 mixer controls.
Johan Rastén [Thu, 11 Jun 2015 08:04:51 +0000 (10:04 +0200)]
ALSA: usb-audio: Set correct type for some UAC2 mixer controls.

Changed ctl type for Input Gain Control and Input Gain Pad Control to
USB_MIXER_S16 as per section 5.2.5.7.11-12 in the USB Audio Class 2.0
definition.

Signed-off-by: Johan Rastén <johan@oljud.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Re-add the lost fake mute support
Takashi Iwai [Thu, 11 Jun 2015 08:51:28 +0000 (10:51 +0200)]
ALSA: hda - Re-add the lost fake mute support

Yet another regression by the transition to regmap cache; for better
usability, we had the fake mute control using the zero amp value for
Conexant codecs, and this was forgotten in the new hda core code.

Since the bits 4-7 are unused for the amp registers (as we follow the
syntax of AMP_GET verb), the bit 4 is now used to indicate the fake
mute.  For setting this flag, snd_hda_codec_amp_update() becomes a
function from a simple macro.  The bonus is that it gained a proper
function description.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Thu, 11 Jun 2015 04:52:31 +0000 (06:52 +0200)]
Merge branch 'for-linus' into for-next

This merges and resolves the non-trivial conflicts with the recent fix
for hda-i915 binding fallback.

Conflicts:
sound/pci/hda/hda_intel.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Continue probing even if i915 binding fails
Takashi Iwai [Wed, 10 Jun 2015 10:03:49 +0000 (12:03 +0200)]
ALSA: hda - Continue probing even if i915 binding fails

Currently snd-hda-intel driver aborts the probing of Intel HD-audio
controller with i915 power well management when binding with i915
driver via hda_i915_init() fails.  This is no big problem for Haswell
and Broadwell where the HD-audio controllers are dedicated to
HDMI/DP, thus i915 link is mandatory.  However, Skylake, Baytrail and
Braswell have only one controller and both HDMI/DP and analog codecs
share the same bus.  Thus, even if HDMI/DP isn't usable, we should
keep the controller working for other codecs.

For fixing this, this patch simply allows continuing the probing even
if hda_i915_init() call fails.  This may leave stale sound components
for HDMI/DP devices that are unbound with graphics.  We could abort
the probing selectively, but from the code simplicity POV, it's better
to continue in all cases.

Reported-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Allow calling snd_hdac_i915_*() without actual binding
Takashi Iwai [Wed, 10 Jun 2015 10:15:27 +0000 (12:15 +0200)]
ALSA: hda - Allow calling snd_hdac_i915_*() without actual binding

Add the missing NULL checks so that snd_hdac_i915*() can be called
even after the binding with i915 failed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Don't actually write registers for caps overwrites
Takashi Iwai [Wed, 10 Jun 2015 08:27:00 +0000 (10:27 +0200)]
ALSA: hda - Don't actually write registers for caps overwrites

Along with the transition to regmap for managing the cached parameter
reads, the caps overwrite was also moved to regmap cache.  The cache
change itself works, but it still tries to write the non-existing verb
(the HDA parameter is read-only) wrongly.  It's harmless in most
cases, but some chips are picky and may result in the codec
communication stall.

This patch avoids it just by adding the missing flag check in
reg_write ops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoDoc: sound:oss: Fix typo in sound/oss
Masanari Iida [Tue, 9 Jun 2015 15:17:42 +0000 (00:17 +0900)]
Doc: sound:oss: Fix typo in sound/oss

This patch fix some spelling typo found in Documentations/sound/oss.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda: Intel: enable automatic runtime pm for HDMI codecs by default
Lu, Han [Tue, 9 Jun 2015 08:50:38 +0000 (16:50 +0800)]
ALSA: hda: Intel: enable automatic runtime pm for HDMI codecs by default

Enable runtime PM of the HDMI audio codec on the latest Intel platforms.
So the HD-A controller or HDMI codec can suspend when idle timeout by
default and release the GFX power well.
The patch influences HSW/BDW/BYT/BSW/SKL. Eariler platforms and third
party analog codecs will not be influenced.

Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 9 Jun 2015 05:22:26 +0000 (07:22 +0200)]
Merge branch 'for-linus' into for-next

Resolve the non-trivial conflict due to the hdac regmap API changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - fix number of devices query on hotplug
Dave Airlie [Tue, 9 Jun 2015 03:39:31 +0000 (13:39 +1000)]
ALSA: hda - fix number of devices query on hotplug

The new regmap code seems to cache this, which isn't helpful
for the hotplug dock situation where this gets updated.

Use the uncached query for this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: intel: Remove unused variable hsw
Takashi Iwai [Mon, 8 Jun 2015 19:04:24 +0000 (21:04 +0200)]
ASoC: intel: Remove unused variable hsw

The recent fix left a variable declaration without usage.
  sound/soc/intel/haswell/sst-haswell-pcm.c:1349:18: warning: unused variable ‘hsw’ [-Wunused-variable]

Fixes: edd8ed496b98 ('ASoC: Intel: handle haswell pcm suspend including runtime modules freeing')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Mon, 8 Jun 2015 18:47:53 +0000 (20:47 +0200)]
Merge tag 'asoc-v4.2' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v4.2

The big thing this release has been Liam's addition of topology support
to the core.  We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.

 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares.
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring.
 - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
   TAS2552 drivers.
 - Support for TI TAS571x power amplifiers.
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
 - Support for x86 systems with RT5650 and Qualcomm Storm.

9 years agoALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB
Jurgen Kramer [Fri, 5 Jun 2015 07:42:49 +0000 (09:42 +0200)]
ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB

This patch adds native DSD support for the XMOS based JLsounds I2SoverUSB board

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc...
Mark Brown [Fri, 5 Jun 2015 17:55:07 +0000 (18:55 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8994', 'asoc/topic/wm8996' and 'asoc/topic/zx' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/twl6040', 'asoc...
Mark Brown [Fri, 5 Jun 2015 17:55:05 +0000 (18:55 +0100)]
Merge remote-tracking branches 'asoc/topic/topology', 'asoc/topic/twl6040', 'asoc/topic/wm5100', 'asoc/topic/wm8741' and 'asoc/topic/wm8960' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/sta350', 'asoc/topic/tas2552', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:55:03 +0000 (18:55 +0100)]
Merge remote-tracking branches 'asoc/topic/sta350', 'asoc/topic/tas2552', 'asoc/topic/tas3a227e' and 'asoc/topic/tas571x' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/ssm2518', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:55:01 +0000 (18:55 +0100)]
Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/ssm4567' and 'asoc/topic/sta32x' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc...
Mark Brown [Fri, 5 Jun 2015 17:54:59 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:54:57 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/max98095', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rcar' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/gpiod-flags', 'asoc/topic/gtm601', 'asoc...
Mark Brown [Fri, 5 Jun 2015 17:54:55 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/gpiod-flags', 'asoc/topic/gtm601', 'asoc/topic/intel', 'asoc/topic/lm3857' and 'asoc/topic/max98090' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-sai', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:54:53 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi' and 'asoc/topic/gpio-jack' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/davinci' and 'asoc/topic/dpcm' into asoc...
Mark Brown [Fri, 5 Jun 2015 17:54:52 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/davinci' and 'asoc/topic/dpcm' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bt-sco', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:54:51 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bt-sco', 'asoc/topic/cs35l32' and 'asoc/topic/da7210' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/adav80x', 'asoc...
Mark Brown [Fri, 5 Jun 2015 17:54:49 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/adav80x', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ad1836', 'asoc/topic...
Mark Brown [Fri, 5 Jun 2015 17:54:47 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ad1836', 'asoc/topic/ada1977', 'asoc/topic/adau1701' and 'asoc/topic/adau17x1' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Mark Brown [Fri, 5 Jun 2015 17:54:46 +0000 (18:54 +0100)]
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dma' into asoc-next
Mark Brown [Fri, 5 Jun 2015 17:54:45 +0000 (18:54 +0100)]
Merge remote-tracking branch 'asoc/topic/dma' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Fri, 5 Jun 2015 17:54:45 +0000 (18:54 +0100)]
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Fri, 5 Jun 2015 17:54:44 +0000 (18:54 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/fix/wm8737', 'asoc/fix/wm8903' and 'asoc/fix...
Mark Brown [Fri, 5 Jun 2015 17:54:43 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/fix/wm8737', 'asoc/fix/wm8903' and 'asoc/fix/wm8955' into asoc-linus

9 years agoMerge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fmtbit', 'asoc/fix/max98...
Mark Brown [Fri, 5 Jun 2015 17:54:41 +0000 (18:54 +0100)]
Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fmtbit', 'asoc/fix/max98925', 'asoc/fix/rcar' and 'asoc/fix/ux500' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Mark Brown [Fri, 5 Jun 2015 17:54:41 +0000 (18:54 +0100)]
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus

9 years agoASoC: tas2552: Configure the WCLK frequency based on the stream
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:30 +0000 (16:04 +0300)]
ASoC: tas2552: Configure the WCLK frequency based on the stream

Instead of hard wiring the WCLK frequency at probe time do it runtime.
The hard wired 88_96KHz was not even setting the correct bits since it was
defined as (1 << 6) which will  change the I2S_OUT_SEL bit and will leave
the amplifier configured for 8KHz.
At the same time clean up and fix the CFG3 register bits.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Add support for word length configuration
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:29 +0000 (16:04 +0300)]
ASoC: tas2552: Add support for word length configuration

Configure the word length based on the params_width of the stream.
Also configure the clock per frame value which is used when tas2552 is bus
master.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Implement startup/stop sequence as per TRM
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:28 +0000 (16:04 +0300)]
ASoC: tas2552: Implement startup/stop sequence as per TRM

Certain sequence need to be followed in order to have smooth power up and
power down performance.
Execute this sequence via DAPM_POST widget.
Remove patching the RESERVED_0D register at probe time since it has to be
handled every time when we stop or start the amplifier.
In order to be able to execute the sequence at the correct time, the driver
need to request to ignore the pmdown time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Correct the Speaker Driver Playback Volume (PGA_GAIN)
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:27 +0000 (16:04 +0300)]
ASoC: tas2552: Correct the Speaker Driver Playback Volume (PGA_GAIN)

The last parameter for DECLARE_TLV_DB_SCALE() is to tell if the gain will
be muted or not when it is set to raw 0. IN this case it is not muted.
The PGA_GAIN is in 0-4 bits in the register. Fix the offset in the
SOC_SINGLE_TLV() for this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Clean up the Digital - Analog DAPM route definition
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:26 +0000 (16:04 +0300)]
ASoC: tas2552: Clean up the Digital - Analog DAPM route definition

The strings should be: 'static const char * const tas2552_input_texts[]'
SOC_DAPM_ENUM should have "Route" in place of xname and no need to have it
as an array.
Also align the parameters.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Add TDM support
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:25 +0000 (16:04 +0300)]
ASoC: tas2552: Add TDM support

TDM support is achieved using DSP transfer mode and setting a programmable
offset which specifies where data begins with respect to the frame sync.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Correct and clean up data format and BCLK/WCLK direction
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:24 +0000 (16:04 +0300)]
ASoC: tas2552: Correct and clean up data format and BCLK/WCLK direction

Use names from the datasheet for the definitions.
Correct the data format definitions since they were not correct.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Correct dai format support
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:23 +0000 (16:04 +0300)]
ASoC: tas2552: Correct dai format support

DSP_A mode require one bit delay from the FS, DSP_B is without data delay.
When checking the requested format, also match the bit and fs inversion
flag along with the format since it is not possible to change inversion.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Add support for pll and pdm source clock selection
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:22 +0000 (16:04 +0300)]
ASoC: tas2552: Add support for pll and pdm source clock selection

Instead of hard wiring the PLL_CLKIN and PDM_CLK to be sourced from BCLK add
proper clock configuration via the set_dai_sysclk callback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: bindings header file for tas2552 codec
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:21 +0000 (16:04 +0300)]
ASoC: tas2552: bindings header file for tas2552 codec

Binding header file for clock input selection and configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Init jack_detect_work before registering irq
Nicolas Boichat [Fri, 5 Jun 2015 10:42:12 +0000 (18:42 +0800)]
ASoC: rt5645: Init jack_detect_work before registering irq

Prevents frequent panic on boot, if the irq handler rt5645_irq
gets called before the workqueue rt5645_jack_detect_work is
initialized.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: zx: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Thu, 4 Jun 2015 17:11:27 +0000 (01:11 +0800)]
ASoC: zx: fix platform_no_drv_owner.cocci warnings

sound/soc/zte/zx296702-i2s.c:428:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Rename mclk parameter to pll_clkin to match with the datasheet
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:20 +0000 (16:04 +0300)]
ASoC: tas2552: Rename mclk parameter to pll_clkin to match with the datasheet

MCLK is one of the possible source for the pll_clkin frequency. Make this
clear by renaming the variable.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Simplify and reverse the functionality of tas2552_sw_shutdown
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:19 +0000 (16:04 +0300)]
ASoC: tas2552: Simplify and reverse the functionality of tas2552_sw_shutdown

The function name and parameters of:
tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)

implies that if sw_shutdown is 1 we should be entering to the software
shutdown mode.

The code can be simplified as well within the function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Simplify the tas2552_mute function
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:18 +0000 (16:04 +0300)]
ASoC: tas2552: Simplify the tas2552_mute function

Initialize the cfg1_reg to 0 and set the mute bit only when it is needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Correct CFG1 register bit definitions
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:17 +0000 (16:04 +0300)]
ASoC: tas2552: Correct CFG1 register bit definitions

Remove the _MASK postfix of the bit definitions, collect the CFG1 bit
definition in one place and correct the bit shifts at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Correct PDM configuration register bit definitions
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:16 +0000 (16:04 +0300)]
ASoC: tas2552: Correct PDM configuration register bit definitions

The PDM clock can be selected via bit0-1.
PDM_DATA_ES bit is at bit2.

The code were trying to select BCLK as PDM reference clock but instead
it was selecting PLL and set the DATA_ES bit to 1.
Selecting the PLL output as reference clock as default does make sense,
but the driver should not change the PDM data edge.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tas2552: Fix kernel crash caused by wrong kcontrol entry
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:15 +0000 (16:04 +0300)]
ASoC: tas2552: Fix kernel crash caused by wrong kcontrol entry

SOC_DAPM_SINGLE("Playback AMP", ..) should not be under kcontrols. It
causes kernel crash (NULL pointer) when the mixers are listed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:14 +0000 (16:04 +0300)]
ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card

If the card is not part of any card the tas_data->codec is NULL since it is
set only during snd_soc_codec_driver.probe, which is not yet called.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: tas2552: Make the enable-gpio really optional
Peter Ujfalusi [Thu, 4 Jun 2015 13:04:13 +0000 (16:04 +0300)]
ASoC: tas2552: Make the enable-gpio really optional

Do not fail the probe if the enable-gpio is not specifiedbut handle
deferred probe case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zte: Fix missing dev in devm operation
Mark Brown [Thu, 4 Jun 2015 16:11:18 +0000 (17:11 +0100)]
ASoC: zte: Fix missing dev in devm operation

Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zx: fix simple_return.cocci warnings
kbuild test robot [Thu, 4 Jun 2015 15:57:20 +0000 (23:57 +0800)]
ASoC: zx: fix simple_return.cocci warnings

sound/soc/zte/zx296702-spdif.c:191:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zx: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Thu, 4 Jun 2015 15:57:20 +0000 (23:57 +0800)]
ASoC: zx: fix platform_no_drv_owner.cocci warnings

sound/soc/zte/zx296702-spdif.c:361:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: fix build errors for missing snd_soc_dapm_new_control symbol
Liam Girdwood [Thu, 4 Jun 2015 14:13:09 +0000 (15:13 +0100)]
ASoC: dapm: fix build errors for missing snd_soc_dapm_new_control symbol

Fix the following error:-

All error/warnings (new ones prefixed by >>):
>
>    sound/built-in.o: In function `soc_tplg_dapm_widget_create':
> >> :(.text+0x25a90): undefined reference to `snd_soc_dapm_new_control'

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zx: zx_i2s_dai can be static
kbuild test robot [Thu, 4 Jun 2015 13:00:50 +0000 (21:00 +0800)]
ASoC: zx: zx_i2s_dai can be static

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agodt: Add documentation for the ZTE I2S controller
Jun Nie [Thu, 4 Jun 2015 03:41:21 +0000 (11:41 +0800)]
dt: Add documentation for the ZTE I2S controller

This patch adds the devicetree documentation for the ZTE
zx296702 I2S audio controller.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agodt: Add documentation for the ZTE SPDIF controller
Jun Nie [Thu, 4 Jun 2015 03:41:20 +0000 (11:41 +0800)]
dt: Add documentation for the ZTE SPDIF controller

This patch adds the devicetree documentation for the ZTE
zx296702 SPDIF audio controller.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zx: Add ZTE zx296702 I2S DAI driver
Jun Nie [Thu, 4 Jun 2015 03:41:23 +0000 (11:41 +0800)]
ASoC: zx: Add ZTE zx296702 I2S DAI driver

Add ZTE zx296702 I2S interface DAI driver

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: zx: Add zx296702 SPDIF support
Jun Nie [Thu, 4 Jun 2015 03:41:22 +0000 (11:41 +0800)]
ASoC: zx: Add zx296702 SPDIF support

Add driver for zx296702 SPDIF controller

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: topology: Export ID types for TLV controls.
Liam Girdwood [Fri, 29 May 2015 18:06:15 +0000 (19:06 +0100)]
ALSA: topology: Export ID types for TLV controls.

Make sure userspace can define TLV controls for topology using the correct
type numbers and channel mappings.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: topology: Add topology core
Liam Girdwood [Fri, 29 May 2015 18:06:14 +0000 (19:06 +0100)]
ASoC: topology: Add topology core

The topology core parses the FW topology file for known block types and
instanciates any common ALSA/ASoC objects that it discovers. The core
also passes any block that is does not understand to client component
drivers for enumeration.

The core exports some APIs to client drivers in order to load and unload
firmware topology data as use case require.

Currently the core deals with the following object types :-

 o kcontrols. This includes TLV, enumerated and bytes controls.
 o DAPM widgets. All types with any associated kcontrol.
 o DAPM graph.
 o FE PCM. FE PCM capabilities and configuration can be defined.
 o BE DAI Link. BE DAI link capabilities and configuration can be defined.
 o Codec <-> codec style links capabilities and configuration.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: topology: Add topology UAPI header
Liam Girdwood [Fri, 29 May 2015 18:06:13 +0000 (19:06 +0100)]
ASoC: topology: Add topology UAPI header

 The ASoC topology UAPI header defines the structures
 required to define any DSP firmware audio topology and control objects from
 userspace.

The following objects are supported :-
 o kcontrols including TLV controls.
 o DAPM widgets and graph elements
 o Vendor bespoke objects.
 o Coefficient data
 o FE PCM capabilities and config.
 o BE link capabilities and config.
 o Codec <-> codec link capabilities and config.
 o Topology object manifest.

The file format is simple and divided into blocks for each object type and
each block has a header that defines it's size and type. Blocks can be in
any order of type and can either all be in a single file or spread across
more than one file. Blocks also have a group identifier ID so that they can
be loaded and unloaded by ID.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda - add new HDA registers
Jeeja KP [Wed, 3 Jun 2015 06:54:32 +0000 (12:24 +0530)]
ALSA: hda - add new HDA registers

This patch adds new registers as per HD audio Spec like capability registers
for processing pipe, software position based FIFO, Multiple Links and Global
Time Synchronization.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - add HDA default codec match function
Vinod Koul [Wed, 3 Jun 2015 06:54:31 +0000 (12:24 +0530)]
ALSA: hda - add HDA default codec match function

HDA codec drivers can be matched using vendor id and revision id typically.
So provide a match function which does this and is loaded when driver hasn't
provided one (default behaviour)

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>
9 years agoALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)
Clemens Ladisch [Wed, 3 Jun 2015 09:36:51 +0000 (11:36 +0200)]
ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)

The driver worked around an error in the MAYA44 USB(+)'s mixer unit
descriptor by aborting before parsing the missing field.  However,
aborting parsing too early prevented parsing of the other units
connected to this unit, so the capture mixer controls would be missing.

Fix this by moving the check for this descriptor error after the parsing
of the unit's input pins.

Reported-by: nightmixes <nightmixes@gmail.com>
Tested-by: nightmixes <nightmixes@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: add MAYA44 USB+ mixer control names
Clemens Ladisch [Wed, 3 Jun 2015 09:36:42 +0000 (11:36 +0200)]
ALSA: usb-audio: add MAYA44 USB+ mixer control names

Add mixer control names for the ESI Maya44 USB+ (which appears to be
identical width the AudioTrak Maya44 USB).

Reported-by: nightmixes <nightmixes@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>