openwrt/staging/blogic.git
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>
9 years agoALSA: hda - remove controller dependency on i915 power well for SKL
Libin Yang [Wed, 3 Jun 2015 01:30:15 +0000 (09:30 +0800)]
ALSA: hda - remove controller dependency on i915 power well for SKL

For SKL, only the HDMI codec is in the display power well while the
HD-A controller isn't. So the controller flag 'need_i915_power' is
not set to release the display power after probe, and the codec flag
'link_power_control' is set to request/release the display power via
bus link_power ops.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: core: If component doesn't have of_node use parent's node instead
Jyri Sarha [Tue, 26 May 2015 18:59:05 +0000 (21:59 +0300)]
ASoC: core: If component doesn't have of_node use parent's node instead

If an ASoC component device does not have a device tree node, use its
parent's node instead, when looking for a matching DAI based on a
device tree reference.

This allows video device drivers to register a separate child device
for their ASoC side audio functionality.  [And MFDs in general --
broonie]

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoregulator: arizona-ldo1: Do not control DVFS clocking from regulator
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:36 +0000 (11:53 +0100)]
regulator: arizona-ldo1: Do not control DVFS clocking from regulator

Using the driver for the internal regulator to also enable/disable
the codec internal clock frequency controller is an unexpected
side-effect for a regulator, and also means that the core clocks
won't be changed as expected if an external regulator is used to
power the codec.

The DVFS is now handled by the codec driver so can be removed from
the LDO1 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: arizona: Add DVFS handling for sample rate control
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:35 +0000 (11:53 +0100)]
ASoC: arizona: Add DVFS handling for sample rate control

The WM8997 and WM5102 codecs need to boost DVFS for higher sample rates.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Move DVFS control into codec driver
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:34 +0000 (11:53 +0100)]
ASoC: wm_adsp: Move DVFS control into codec driver

In theory the ADSP driver should not need to know anything
about the codec it is part of. But the WM5102 needs DVFS
control based on ADSP clocking speed. This was being handled
by bundling part of the knowledge of this into the ADSP driver.

This change moves this handling out of the ADSP driver and
into the WM5102 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: arizona: Export functions to control subsystem DVFS
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:33 +0000 (11:53 +0100)]
ASoC: arizona: Export functions to control subsystem DVFS

The WM5102 and WM8997 codecs have an internal dynamic clock booster.
When this booster is active, the DCVDD voltage must be increased.
If all the currently active audio paths can run with the root SYSCLK
we can disable the booster, allowing us to turn down DCVDD voltage
to save power.

Previously this was being done by having the booster enable bit set
as a side-effect of the LDO1 regulator driver, which is unexpected
behaviour of a regulator and not compatible with using an external
regulator.  [Originally this was documented as a feature of the internal
LDO -- broonie]

This patch exports functions to handle the booster enable and
DCVDD voltage, with each relevant subsystem flagging whether it can
currently run without the booster. Note that these subsystems are
stateless and none of them are nestable, so there's no need for
reference counting, we only need a simple boolean for each subsystem
of whether their current condition could require the booster or will
allow us to turn the codec down to lower operating power.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge branch 'topic/adsp' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Tue, 2 Jun 2015 20:06:04 +0000 (21:06 +0100)]
Merge branch 'topic/adsp' of git://git./linux/kernel/git/broonie/sound into asoc-arizona

9 years agoASoC: qcom: fix STORM board Kconfig
Arnd Bergmann [Fri, 22 May 2015 15:54:17 +0000 (16:54 +0100)]
ASoC: qcom: fix STORM board Kconfig

This patch is a fixup to correct dependencies in patch 9bae4880acee
("ASoC: qcom: move ipq806x specific bits out of lpass driver.")

Originally this change-set was suggested by Arnd on mailing list.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Allocate for the mailbox with max size
Subhransu S. Prusty [Tue, 19 May 2015 09:30:40 +0000 (15:00 +0530)]
ASoC: Intel: Allocate for the mailbox with max size

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>
9 years agoALSA: hda/realtek - Add a fixup for another Acer Aspire 9420
Takashi Iwai [Tue, 2 Jun 2015 17:57:08 +0000 (19:57 +0200)]
ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420

Acer Aspire 9420 with ALC883 (1025:0107) needs the fixup for EAPD to
make the sound working like other Aspire models.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94111
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration
Vladimir Zapolskiy [Mon, 1 Jun 2015 21:57:53 +0000 (00:57 +0300)]
ASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration

The change fixes the following compilation problem:

  sound/soc/soc-dapm.c: In function 'dapm_kcontrol_data_alloc':
  sound/soc/soc-dapm.c:388:4: error: implicit declaration of function
    'snd_soc_dapm_new_control' [-Werror=implicit-function-declaration]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
    ^

  sound/soc/soc-dapm.c:387:17: warning: assignment makes pointer
    from integer without a cast [enabled by default]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
                 ^
  sound/soc/soc-dapm.c: At top level:
  sound/soc/soc-dapm.c:3269:1: error: conflicting types for
    'snd_soc_dapm_new_control'
  snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
  ^

In addition to the fix add static qualifier to
snd_soc_dapm_new_control() function to silence checkpatch.

Fixes: 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM controls.")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ts3a227e: use device property api
Fang, Yang A [Fri, 29 May 2015 18:56:11 +0000 (11:56 -0700)]
ASoC: ts3a227e: use device property api

replace of_property_read_u32 with device_property_read_u32

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max98090: read micbias from device property
Fang, Yang A [Fri, 29 May 2015 18:56:10 +0000 (11:56 -0700)]
ASoC: max98090: read micbias from device property

This patch reads max98090 micbias from acpi or dt

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: handle haswell pcm suspend including runtime modules freeing
Jie Yang [Sat, 30 May 2015 14:33:59 +0000 (22:33 +0800)]
ASoC: Intel: handle haswell pcm suspend including runtime modules freeing

It needs free pcm runtime modules before unloading firmware, here
add hsw_pcm_suspend() to handle this procedure:
suspends firmware ==> frees runtime modules ==> unloads firmware.

This fixes the broadwell module unload failed issue.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: check and clear runtime module pointer
Jie Yang [Sat, 30 May 2015 14:33:58 +0000 (22:33 +0800)]
ASoC: Intel: check and clear runtime module pointer

Add check runtime module pointers before freeing them, and clear
them to NULL after freed.

With this implemented, we can avoid NULL pointer dereference or
double free errors.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: intel: Revert "ASoC: Intel: fix broadwell module removing failed issue"
Jie Yang [Sat, 30 May 2015 14:33:57 +0000 (22:33 +0800)]
ASoC: intel: Revert "ASoC: Intel: fix broadwell module removing failed issue"

This reverts commit 01f202c7b4b40025f3ea4721c52e7f78545e3b07.

We shouldn't leave the device as suspended state after module freed,
it is not good to do runtime suspend at driver free, here revert
this fixing, and replace it with the procedure:
suspends firmware ==> frees runtime modules ==> unloads firmware.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: intel: Revert "ASoC: Intel: remove unused function hsw_pcm_free_modules()"
Jie Yang [Sat, 30 May 2015 14:33:56 +0000 (22:33 +0800)]
ASoC: intel: Revert "ASoC: Intel: remove unused function hsw_pcm_free_modules()"

This reverts commit 506c148ee5e1bfb836116353305927ca4c21a23e.

We still need this hsw_pcm_free_modules(), we plan to remove the
runtime modules at both fw_unload(D0->D3) and snd_soc_sst_haswell_pcm
module removing.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: don't need compress offload for broadwell
Jie Yang [Sat, 30 May 2015 07:58:47 +0000 (15:58 +0800)]
ASoC: Intel: don't need compress offload for broadwell

We don't need compress offload feature for broadwell broadwell machine,
here remove the non exist dependency.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rsnd: Document r8a7778-specific binding
Geert Uytterhoeven [Mon, 1 Jun 2015 10:44:15 +0000 (12:44 +0200)]
ASoC: rsnd: Document r8a7778-specific binding

Add the missing r8a7778-specific compatible value, which is already in
use since v4.1-rc1.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_hubs: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:06 +0000 (10:11 +0200)]
ASoC: wm_hubs: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

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>
9 years agoASoC: wm9090: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:05 +0000 (10:11 +0200)]
ASoC: wm9090: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

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>