GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agoALSA: hda - remove controller dependency on i915 power well for Baytrail/Braswell
Mengdong Lin [Wed, 29 Apr 2015 09:43:43 +0000 (17:43 +0800)]
ALSA: hda - remove controller dependency on i915 power well for Baytrail/Braswell

For Baytrail (Valleyview) and Braswell (Cherryview), 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: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - divide controller and codec dependency on i915 gfx power well
Mengdong Lin [Wed, 29 Apr 2015 09:43:36 +0000 (17:43 +0800)]
ALSA: hda - divide controller and codec dependency on i915 gfx power well

This patch can improve power saving for Intel platforms on which only the
display audio codec is in the shared i915 power well:

- Add a flag "need_i915_power" to indicate whether the controller needs the
  i915 power well.

- The driver will always request the i915 power when probing the controller
  and codecs if AZX_DCAPS_I915_POWERWELL is set (either the controller or a
  codec needs this power).

- If the controller needs the i915 power, the power will be held after probe
  until the controller is runtime suspended or S3. If the controller doesn't
  need the power, the power will be released the after probe, and a codec
  that needs the power can request/release the power via bus link_power ops.

Background:
- For Haswell/Broadwell, which has a separate HD-A controller for display audio,
  both the controller and the display codec are in the i915 power well.

- For Baytrail/Braswell, the display and analog audio share the same HDA
  controller and link, and only the display codec is in the i915 power well.

- For Skylake, the display and analog audio share the same HDA controller but
  use separate links. Only the display codec is in the i915 power well. And in
  legacy mode we take the two links as one. So it can follow Baytrail/Braswell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - implement link_power ops for i915 display power control
Mengdong Lin [Wed, 29 Apr 2015 09:43:29 +0000 (17:43 +0800)]
ALSA: hda - implement link_power ops for i915 display power control

This patch implements the bus link_power ops to request/release i915 display
power well. It can be used by the display codec which shares this power well
with GPU on Intel platforms.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - allow a codec to control the link power
Mengdong Lin [Wed, 29 Apr 2015 09:43:20 +0000 (17:43 +0800)]
ALSA: hda - allow a codec to control the link power

A flag "link_power_control" is added to indicate whether a codec needs to
control the link power.  And a new bus ops link_power() is defined for the
codec to request to enable/disable the link power.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - implement a refcount for i915 power well switch
Mengdong Lin [Wed, 29 Apr 2015 09:43:12 +0000 (17:43 +0800)]
ALSA: hda - implement a refcount for i915 power well switch

This is to check the refcount of audio driver and reduce calling to i915.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Replace open codes with snd_hdac_stream_set_params()
Takashi Iwai [Sat, 18 Apr 2015 07:59:38 +0000 (09:59 +0200)]
ALSA: hda - Replace open codes with snd_hdac_stream_set_params()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - add generic functions to set hdac stream params
Jeeja KP [Fri, 17 Apr 2015 12:28:58 +0000 (17:58 +0530)]
ALSA: hda - add generic functions to set hdac stream params

This will be used by hda controller driver to
setup stream params in prepare. This function will
setup the bdl and periods.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - add ASoC device type for hda core
Ramesh Babu [Fri, 17 Apr 2015 12:28:57 +0000 (17:58 +0530)]
ALSA: hda - add ASoC device type for hda core

Add HDA_DEV_ASOC device/driver type to support
ASoC HDA drivers.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Move prepared flag into struct hdac_stream
Takashi Iwai [Fri, 17 Apr 2015 11:34:30 +0000 (13:34 +0200)]
ALSA: hda - Move prepared flag into struct hdac_stream

This flag seems used commonly, so deserves to be located there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Replace hda_bus_ops with static binding
Takashi Iwai [Thu, 16 Apr 2015 21:25:02 +0000 (23:25 +0200)]
ALSA: hda - Replace hda_bus_ops with static binding

Originally hda_bus takes its own ops (hda_bus_ops) to allow different
controller drivers giving individual implementations of PCM
attachment, etc.  But this never happened and we finally merged both
codec and controller helper codes.  Thus there is no merit to keep the
indirect accesses to functions via hda_bus_ops.

This patch replaces these calls with the direct local function calls
for simplification.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Drop azx_sd_read*/write*() macros
Takashi Iwai [Thu, 16 Apr 2015 10:14:17 +0000 (12:14 +0200)]
ALSA: hda - Drop azx_sd_read*/write*() macros

They are no longer used (only one place which can be replaced with a
proper helper function).  Let's drop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/tegra - Fix build error and warning
Takashi Iwai [Thu, 16 Apr 2015 10:02:30 +0000 (12:02 +0200)]
ALSA: hda/tegra - Fix build error and warning

I seem to have failed to run the build test properly...
   sound/pci/hda/hda_tegra.c: In function 'hda_tegra_dev_free':
   sound/pci/hda/hda_tegra.c:310:20: error: 'bus' undeclared (first use in this function)
         snd_hdac_bus_exit(bus);

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Reenable tracepoints for controller
Takashi Iwai [Thu, 16 Apr 2015 09:44:58 +0000 (11:44 +0200)]
ALSA: hda - Reenable tracepoints for controller

After correcting the fields to point the right members, tracepoints
can be reenabled again for the legacy controller code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add missing inclusion of <linux/clocksource.h>
Takashi Iwai [Thu, 16 Apr 2015 09:31:12 +0000 (11:31 +0200)]
ALSA: hda - Add missing inclusion of <linux/clocksource.h>

For fixing randconfig build errors like:

   sound/hda/hdac_stream.c: In function 'azx_timecounter_init':
   sound/hda/hdac_stream.c:365:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration]

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Move PCM format and rate handling code to core library
Takashi Iwai [Thu, 16 Apr 2015 06:19:06 +0000 (08:19 +0200)]
ALSA: hda - Move PCM format and rate handling code to core library

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Minor refactoring
Takashi Iwai [Thu, 16 Apr 2015 05:53:08 +0000 (07:53 +0200)]
ALSA: hda - Minor refactoring

Move the small portion of the common sequence in hda_intel.c and
hda_tegra.c into hda_controller.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Embed bus into controller object
Takashi Iwai [Tue, 14 Apr 2015 20:13:18 +0000 (22:13 +0200)]
ALSA: hda - Embed bus into controller object

... and replace with the existing hda-core helper codes.
This reduces lots of lines, finally.

Since struct hda_bus is now embedded into struct azx,
snd_hda_bus_new() is moved and expanded from hda_codec.c to
hda_controller.c, accordingly.  Also private_free bus ops and
private_data field are removed because we no longer need to point azx
object from bus (we can use container_of())

The spin locks are consolidated into the single one, bus->reg_lock.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Migrate more hdac_stream codes
Takashi Iwai [Tue, 14 Apr 2015 20:06:53 +0000 (22:06 +0200)]
ALSA: hda - Migrate more hdac_stream codes

... including dsp loader helpers.  Lots of codes removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Migrate hdac_stream into legacy driver
Takashi Iwai [Tue, 14 Apr 2015 16:13:13 +0000 (18:13 +0200)]
ALSA: hda - Migrate hdac_stream into legacy driver

Embed hdac_stream object into azx_dev, and use a few basic helper
functions.  The most of helper codes for hdac_stream aren't still used
yet.

Also this commit disables the tracepoints temporarily due to build
problems.  It'll be enabled again later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Pass bus io_ops directly from the top-level driver
Takashi Iwai [Tue, 14 Apr 2015 15:26:00 +0000 (17:26 +0200)]
ALSA: hda - Pass bus io_ops directly from the top-level driver

One less redirection again.  This also requires the change of the call
order in the toplevel divers.  Namely, the bus has to be created at
first before other initializations since the memory allocation ops are
called through bus object now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Move send_cmd / get_response to hdac_bus_ops
Takashi Iwai [Tue, 14 Apr 2015 14:55:31 +0000 (16:55 +0200)]
ALSA: hda - Move send_cmd / get_response to hdac_bus_ops

One less redirection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Merge codec and controller helpers
Takashi Iwai [Tue, 14 Apr 2015 14:47:19 +0000 (16:47 +0200)]
ALSA: hda - Merge codec and controller helpers

There is no much merit to keep the HD-audio codec and controller
helper codes in separate modules any longer.  Let's merge them into a
single helper module.

This patch just changes Makefile entries to merge two individual
modules to one.  The only code change is the removal of superfluous
MODULE_*() macros in one side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - moved alloc/free stream pages function to controller library
Jeeja KP [Sun, 12 Apr 2015 12:36:13 +0000 (18:06 +0530)]
ALSA: hda - moved alloc/free stream pages function to controller library

Moved azx_alloc_stream_pages and azx_free_stream_pages
to controller library.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add DSP loader to core library code
Takashi Iwai [Tue, 14 Apr 2015 10:53:28 +0000 (12:53 +0200)]
ALSA: hda - Add DSP loader to core library code

Copied from the legacy driver code, no transition done yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add the controller helper codes to hda-core module
Takashi Iwai [Tue, 14 Apr 2015 10:15:47 +0000 (12:15 +0200)]
ALSA: hda - Add the controller helper codes to hda-core module

This patch adds the controller helper codes to hda-core library.
The I/O access ops are added to the bus ops.  The CORB/RIRB, the basic
attributes like irq# and iomap address, some locks and the list of
streams are added to the bus object, together with the stream object
and its helpers.

Currently the codes are just copied from the legacy driver, so you can
find duplicated codes in both directories.  Only constants are removed
from the original hda_controller.h.  More integration work will follow
in the later patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Handle error from get_response bus ops directly
Takashi Iwai [Wed, 25 Mar 2015 16:57:00 +0000 (17:57 +0100)]
ALSA: hda - Handle error from get_response bus ops directly

... and drop bus->rirb_error flag.  This makes the code simpler.

We treat -EAGAIN from get_response ops as a special meaning: it allows
the caller to retry after bus reset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - set GET bit when adding a vendor verb to the codec regmap
Mengdong Lin [Tue, 14 Apr 2015 03:25:36 +0000 (11:25 +0800)]
ALSA: hda - set GET bit when adding a vendor verb to the codec regmap

Some HD-A codecs may add their own vendor 'set' verb to the regmap, thru func
snd_hdac_add_vendor_verb(). This patch sets the GET bit (bit 11)  when adding
the verb so that its peer vendor 'get' verb is actually added. This can avoid
I/O error when writing the 'set' verb thru remap, since HD-A regmap internally
looks up a writable vendor verb with GET bit set at first.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-v4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 13 Apr 2015 12:14:29 +0000 (14:14 +0200)]
Merge tag 'asoc-v4.1-2' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.1

More updates for v4.1, pretty much all drivers:

 - Lots of cleanups from Lars, mainly moving things from the CODEC level
   to the card level.
 - Continuing improvements to rcar from Morimoto-san, pcm512x from
   Howard and Peter, the Intel platforms from Vinod, Jie, Jin and Han,
   and to rt5670 from Bard.
 - Support for some non-DSP Qualcomm platforms, Google's Storm
   platform, Maxmim MAX98925 CODECs and the Ingenic JZ4780 SoC.

9 years agoALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450
Jo-Philipp Wich [Mon, 13 Apr 2015 10:47:26 +0000 (12:47 +0200)]
ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450

The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in
order to get working sound output on the docking stations headphone jack.

Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in
conjunction with a ThinkPad Ultradock.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix another race in runtime PM refcounting
Takashi Iwai [Mon, 13 Apr 2015 09:01:14 +0000 (11:01 +0200)]
ALSA: hda - Fix another race in runtime PM refcounting

Although some races in runtime PM refcount was fixed by the commit
[664c715573c2: ALSA: hda - Work around races of power up/down with
runtime PM], there is still a race in the following case:

CPU0:                   CPU1 :
runtime suspend:
  codec->in_pm = 1
                        snd_hdac_power_up_pm():
                          pm_runtime_get_sync() skipped
suspend finished:
  codec->in_pm = 0
                        snd_hdac_power_down_pm():
                          pm_runtime_put_*() is called!

For avoiding this situation, increment in_pm flag atomically when it's
non-zero, and decrement accordingly, to ensure that in_pm is set
consistently for the whole concurrent operations.

Also, since atomic_inc_not_zero() and atomic_dec_if_positive() are
lengthy inline functions, move snd_hdac_power_up_pm() and _down_pm()
to sound/hda/hdac_device.c as no inline functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Expose codec type sysfs
Takashi Iwai [Mon, 13 Apr 2015 08:43:54 +0000 (10:43 +0200)]
ALSA: hda - Expose codec type sysfs

The type field of HD-audio codec object should be exposed to
user-space so that it can identify which driver type to bind (legacy /
asoc).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ctl: fix to handle several elements added by one operation for userspace element
Takashi Sakamoto [Sun, 12 Apr 2015 01:12:25 +0000 (10:12 +0900)]
ALSA: ctl: fix to handle several elements added by one operation for userspace element

An element instance can have several elements with the same feature.
Some userspace applications can add such an element instance by add
operation with the number of elements. Then, the element instance
gets a memory object to keep states of these elements.

But the element instance has just one memory object for the elements.
This causes the same result to each read/write operations to the
different elements.

This commit fixes this bug by allocating enough memory objects to the
element instance for each of elements.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-next' into for-linus
Takashi Iwai [Mon, 13 Apr 2015 08:23:18 +0000 (10:23 +0200)]
Merge branch 'for-next' into for-linus

9 years agoMerge remote-tracking branches 'asoc/topic/wm2200', 'asoc/topic/wm5100', 'asoc/topic...
Mark Brown [Sun, 12 Apr 2015 18:49:22 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/wm2200', 'asoc/topic/wm5100', 'asoc/topic/wm8731', 'asoc/topic/wm8804' and 'asoc/topic/wm8996' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/tlv320aic23' and ...
Mark Brown [Sun, 12 Apr 2015 18:49:20 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/tlv320aic23' and 'asoc/topic/ux500' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt5641', 'asoc/topic/rt5677' and 'asoc...
Mark Brown [Sun, 12 Apr 2015 18:49:17 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/rt5641', 'asoc/topic/rt5677' and 'asoc/topic/sh-cleanup' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic...
Mark Brown [Sun, 12 Apr 2015 18:49:11 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/link-param', 'asoc/topic/max98090', 'asoc...
Mark Brown [Sun, 12 Apr 2015 18:49:06 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/link-param', 'asoc/topic/max98090', 'asoc/topic/max98925' and 'asoc/topic/nuc900' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic...
Mark Brown [Sun, 12 Apr 2015 18:49:03 +0000 (19:49 +0100)]
Merge remote-tracking branches 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/kirkwood' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/dmaengine', 'asoc/topic/fsi', 'asoc/topic...
Mark Brown [Sun, 12 Apr 2015 18:48:59 +0000 (19:48 +0100)]
Merge remote-tracking branches 'asoc/topic/dmaengine', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-ssi' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/cx20442' and 'asoc/topic/davinci' into...
Mark Brown [Sun, 12 Apr 2015 18:48:56 +0000 (19:48 +0100)]
Merge remote-tracking branches 'asoc/topic/cx20442' and 'asoc/topic/davinci' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/4554', 'asoc/topic/ab8500', 'asoc/topic...
Mark Brown [Sun, 12 Apr 2015 18:48:51 +0000 (19:48 +0100)]
Merge remote-tracking branches 'asoc/topic/4554', 'asoc/topic/ab8500', 'asoc/topic/ak4642', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Mark Brown [Sun, 12 Apr 2015 18:48:49 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/intel' into asoc-next
Mark Brown [Sun, 12 Apr 2015 18:48:33 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Sun, 12 Apr 2015 18:48:31 +0000 (19:48 +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 [Sun, 12 Apr 2015 18:48:30 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

9 years agoMerge tag 'asoc-v4.1' into asoc-next
Mark Brown [Sun, 12 Apr 2015 18:48:29 +0000 (19:48 +0100)]
Merge tag 'asoc-v4.1' into asoc-next

ASoC: Changes for v4.1

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

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

# gpg: Signature made Thu 05 Mar 2015 01:10:27 GMT using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"

9 years agoMerge remote-tracking branch 'asoc/fix/wm8741' into asoc-linus
Mark Brown [Sun, 12 Apr 2015 18:48:27 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/fix/wm8741' into asoc-linus

9 years agoMerge remote-tracking branches 'asoc/fix/ak4642', 'asoc/fix/atmel', 'asoc/fix/cs4271...
Mark Brown [Sun, 12 Apr 2015 18:48:22 +0000 (19:48 +0100)]
Merge remote-tracking branches 'asoc/fix/ak4642', 'asoc/fix/atmel', 'asoc/fix/cs4271', 'asoc/fix/davinci' and 'asoc/fix/rcar' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus
Mark Brown [Sun, 12 Apr 2015 18:48:21 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Mark Brown [Sun, 12 Apr 2015 18:48:20 +0000 (19:48 +0100)]
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

9 years agoMerge tag 'asoc-fix-v4.0-rc7' into asoc-linus
Mark Brown [Sun, 12 Apr 2015 18:48:19 +0000 (19:48 +0100)]
Merge tag 'asoc-fix-v4.0-rc7' into asoc-linus

ASoC: Last minute fix for v4.0

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

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

# gpg: Signature made Sat 11 Apr 2015 22:14:17 BST using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"

9 years agoASoC: Intel: fix array_size.cocci warnings
kbuild test robot [Sun, 12 Apr 2015 18:16:21 +0000 (02:16 +0800)]
ASoC: Intel: fix array_size.cocci warnings

sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE

 Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element

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

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

CC: Jie Yang <yang.jie@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: n810: Automatically disconnect non-connected pins
Lars-Peter Clausen [Sat, 11 Apr 2015 08:47:58 +0000 (10:47 +0200)]
ASoC: n810: Automatically disconnect non-connected pins

All CODEC input and output widgets are either in the DAPM routing table or
manually marked as non-connected. This means the card is fully routed and we
can let the core take care of disconnecting non-connected pins.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: n810: Consistently pass the card DAPM context to n810_ext_control()
Lars-Peter Clausen [Sat, 11 Apr 2015 08:47:57 +0000 (10:47 +0200)]
ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()

Some callers of n810_ext_control() pass the card DAPM context and some pass
the CODEC DAPM context. Given that some of the widgets that are accessed in
the function are in the card's context, always passing it is the obvious
choice.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: davinci-evm: Use card DAPM context to access widgets
Lars-Peter Clausen [Sat, 11 Apr 2015 11:11:28 +0000 (13:11 +0200)]
ASoC: davinci-evm: Use card DAPM context to access widgets

The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: mop500_ab8500: Use card DAPM context to access widgets
Lars-Peter Clausen [Sat, 11 Apr 2015 11:01:02 +0000 (13:01 +0200)]
ASoC: mop500_ab8500: Use card DAPM context to access widgets

The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm1133-ev1: Use card DAPM context to access widgets
Lars-Peter Clausen [Sat, 11 Apr 2015 10:52:01 +0000 (12:52 +0200)]
ASoC: wm1133-ev1: Use card DAPM context to access widgets

The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: atmel: Improve machine driver compile test coverage
Lars-Peter Clausen [Sat, 11 Apr 2015 09:16:19 +0000 (11:16 +0200)]
ASoC: atmel: Improve machine driver compile test coverage

The Atmel ASoC machine drivers don't have any compile time arch dependencies
anymore. Make it possible to select them when COMPILE_TEST is enabled to get
better compile test coverage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: atmel: Add dependency to SND_SOC_I2C_AND_SPI where necessary
Lars-Peter Clausen [Sat, 11 Apr 2015 09:16:18 +0000 (11:16 +0200)]
ASoC: atmel: Add dependency to SND_SOC_I2C_AND_SPI where necessary

The SND_AT91_SOC_SAM9G20_WM8731 and SND_AT91_SOC_SAM9X5_WM8731 machine
driver symbols select SND_SOC_WM8731 which depends on SND_SOC_I2C_AND_SPI.
So the machine driver symbols need to depend on SND_SOC_I2C_AND_SPI as well,
otherwise we might end up with a invalid configuration, which will sooner or
later upset the randconfig auto-builders.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: control: Fix a typo of SNDRV_CTL_ELEM_ACCESS_TLV_* with SNDRV_CTL_TLV_OP_*
Takashi Iwai [Sun, 12 Apr 2015 07:16:11 +0000 (09:16 +0200)]
ALSA: control: Fix a typo of SNDRV_CTL_ELEM_ACCESS_TLV_* with SNDRV_CTL_TLV_OP_*

The commit [39d118677baa: ALSA: ctl: evaluate macro instead of
numerical value] replaced the numbers with constants, but one place
was replaced wrongly with a different type.  Fixed now.

Fixes: 39d118677baa ('ALSA: ctl: evaluate macro instead of numerical value')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate
Adam Honse [Sun, 12 Apr 2015 06:03:07 +0000 (01:03 -0500)]
ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate

Adds Microsoft LifeCam Cinema USB ID to the snd_usb_get_sample_rate_quirk list as the Lifecam Cinema does not appear to support getting the sample rate.

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

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

Signed-off-by: Adam Honse <calcprogrammer1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: rnsd: fix build regression without CONFIG_OF
Arnd Bergmann [Fri, 10 Apr 2015 22:18:37 +0000 (00:18 +0200)]
ASoC: rnsd: fix build regression without CONFIG_OF

The r-car sound driver only works when CONFIG_OF is set, and
after a recent change has a compile-time dependency as well:

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

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

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 72adc61f4637aa3 ("ASoC: rsnd: 1st DMAC dma-names cares subnode")
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pcm512x: Remove hardcoding of pll-lock to GPIO4
Howard Mitchell [Mon, 23 Mar 2015 21:17:01 +0000 (21:17 +0000)]
ASoC: pcm512x: Remove hardcoding of pll-lock to GPIO4

Currently GPIO4 is hardcoded to output the pll-lock signal.
Unfortunately this is after the pll-out GPIO is configured which
is selectable in the device tree. Therefore it is not possible to
use GPIO4 for pll-out. Therefore this patch removes the
configuration of GPIO4.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: emu10k1: add toggles for E-mu 1010 optical ports
Michael Gernoth [Sat, 11 Apr 2015 16:00:19 +0000 (18:00 +0200)]
ALSA: emu10k1: add toggles for E-mu 1010 optical ports

The optical ports on the E-mu 1010 (and dock) can be configured
for ADAT- or S/PDIF-mode, which is currently hardcoded to ADAT.
Add two mixer elements to expose this setting.
Tested on an E-mu 1010 PCIe with connected Micro Dock.

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ctl: fill identical information to return value when adding userspace elements
Takashi Sakamoto [Sat, 11 Apr 2015 08:41:04 +0000 (17:41 +0900)]
ALSA: ctl: fill identical information to return value when adding userspace elements

currently some members related identical information are not fiiled
in returned parameter of SNDRV_CTL_IOCTL_ELEM_ADD. This is not better
for userspace application.

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

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ctl: fix a bug to return no identical information in info operation for userspa...
Takashi Sakamoto [Sat, 11 Apr 2015 08:41:03 +0000 (17:41 +0900)]
ALSA: ctl: fix a bug to return no identical information in info operation for userspace controls

In operations of SNDRV_CTL_IOCTL_ELEM_INFO, identical information in
returned value is cleared. This is not better to userspace application.

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

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ctl: confirm to return all identical information in 'activate' event
Takashi Sakamoto [Sat, 11 Apr 2015 08:41:02 +0000 (17:41 +0900)]
ALSA: ctl: confirm to return all identical information in 'activate' event

When event originator doesn't set numerical ID in identical information,
the event data includes no numerical ID, thus userspace applications
cannot identify the control just by unique ID in event data.

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

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emu10k1: handle dock disconnects
Michael Gernoth [Sat, 11 Apr 2015 12:34:44 +0000 (14:34 +0200)]
ALSA: emu10k1: handle dock disconnects

When the dock on an E-mu 1010 card is disconnected, all outputs get
muted by the hardware. Add logic to detect a disconnect and unmute.

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)
Yves-Alexis Perez [Sat, 11 Apr 2015 07:31:35 +0000 (09:31 +0200)]
ALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)

This model uses the same dock port as the previous generation.

Signed-off-by: Yves-Alexis Perez <corsac@debian.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: seq: fill client ID in return value of pool operation
Takashi Sakamoto [Sat, 11 Apr 2015 04:24:47 +0000 (13:24 +0900)]
ALSA: seq: fill client ID in return value of pool operation

The returned value of 'get/seq client pool' operation has zeroed value
for its client ID, against requested client ID.

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

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: Intel: Use the generic IPC/mailbox APIs in Broadwell
Jin Yao [Tue, 7 Apr 2015 01:33:32 +0000 (09:33 +0800)]
ASoC: Intel: Use the generic IPC/mailbox APIs in Broadwell

Use the generic IPC/mailbox APIs to replace the original processing
code for Broadwell platform.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Use the generic IPC/mailbox APIs in Baytrail
Jin Yao [Tue, 7 Apr 2015 01:33:31 +0000 (09:33 +0800)]
ASoC: Intel: Use the generic IPC/mailbox APIs in Baytrail

Use the generic IPC/mailbox APIs to replace the original processing
code for Baytrail platform.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Refactor common IPC/mailbox code into generic APIs
Jin Yao [Tue, 7 Apr 2015 01:33:30 +0000 (09:33 +0800)]
ASoC: Intel: Refactor common IPC/mailbox code into generic APIs

Currently in Intel SST driver, some similar IPC/mailbox processing
code are used in different platforms (e.g. in baytrail/broadwell).

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

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Acked-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: fsl: Add the audio interface acronyms in Kconfig text
Fabio Estevam [Thu, 9 Apr 2015 18:32:09 +0000 (15:32 -0300)]
ASoC: fsl: Add the audio interface acronyms in Kconfig text

To keep consistency with the other Kconfig entries, use the audio
interface acronyms (SSI and SPDIF) in the Kconfig menu text.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: core: call snd_soc_runtime_set_dai_fmt() before soc_new_pcm()
Kuninori Morimoto [Fri, 10 Apr 2015 09:47:00 +0000 (09:47 +0000)]
ASoC: core: call snd_soc_runtime_set_dai_fmt() before soc_new_pcm()

Current snd_soc_runtime_set_dai_fmt() is called after
soc_probe_link_dais(). this means snd_soc_dai_set_fmt() will be
called after soc_new_pcm().

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

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

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge branch 'topic/dapm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Fri, 10 Apr 2015 15:09:21 +0000 (16:09 +0100)]
Merge branch 'topic/dapm-dt' of git://git./linux/kernel/git/broonie/sound into asoc-core

9 years agoMerge branch 'topic/delay' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Fri, 10 Apr 2015 15:04:46 +0000 (16:04 +0100)]
Merge branch 'topic/delay' of git://git./linux/kernel/git/broonie/sound into asoc-core

9 years agoASoC: fsl_ssi: Use devm_ioremap_resource()
Fabio Estevam [Fri, 10 Apr 2015 10:12:29 +0000 (07:12 -0300)]
ASoC: fsl_ssi: Use devm_ioremap_resource()

Using platform_get_resource() and devm_ioremap_resource() can make the
code a bit simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: emu10k1: don't deadlock in proc-functions
Michael Gernoth [Thu, 9 Apr 2015 21:42:15 +0000 (23:42 +0200)]
ALSA: emu10k1: don't deadlock in proc-functions

The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read
acquire the emu_lock before accessing the FPGA. The function used
to access the FPGA (snd_emu1010_fpga_read) also tries to take
the emu_lock which causes a deadlock.
Remove the outer locking in the proc-functions (guarding only the
already safe fpga read) to prevent this deadlock.

[removed superfluous flags variables too -- tiwai]

Signed-off-by: Michael Gernoth <michael@gernoth.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: fsl_ssi: Use devm_snd_soc_register_component()
Fabio Estevam [Thu, 9 Apr 2015 17:56:41 +0000 (14:56 -0300)]
ASoC: fsl_ssi: Use devm_snd_soc_register_component()

Using devm_snd_soc_register_component() can make the code shorter and
cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ak4642: fixup channels_min
Kuninori Morimoto [Fri, 10 Apr 2015 08:46:22 +0000 (08:46 +0000)]
ASoC: ak4642: fixup channels_min

ak4642 doesn't have Mono record, ak4643 have it, but not supported.
This patch fixes channel mismatch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda/realtek - Fix a typo
Takashi Iwai [Fri, 10 Apr 2015 07:53:04 +0000 (09:53 +0200)]
ALSA: hda/realtek - Fix a typo

A comma was used instead of a semicolon, which may lead to a build
error.

Fixes: cffd39668177 ('ALSA: hda/realtek - Fix the regression by widget power-saving')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ctl: evaluate macro instead of numerical value
Takashi Sakamoto [Thu, 9 Apr 2015 23:43:00 +0000 (08:43 +0900)]
ALSA: ctl: evaluate macro instead of numerical value

SNDRV_CTL_TLV_OP_XXX is defined but not used in core code. Instead,
raw numerical value is evaluated.

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

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support
Dmitry M. Fedin [Thu, 9 Apr 2015 14:37:03 +0000 (17:37 +0300)]
ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support

Adds an entry for Creative USB X-Fi to the rc_config array in
mixer_quirks.c to allow use of volume knob on the device.
Adds support for newer X-Fi Pro card, known as "Model No. SB1095"
with USB ID "041e:3237"

Signed-off-by: Dmitry M. Fedin <dmitry.fedin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/via - Add missing stream_pm ops setup
Takashi Iwai [Thu, 9 Apr 2015 13:23:59 +0000 (15:23 +0200)]
ALSA: hda/via - Add missing stream_pm ops setup

Similar like the case for Realtek, VIA codec driver needs this ops as
well for making the widget power-save working.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: Don't try to register debugfs entries if the parent does not exist
Lars-Peter Clausen [Thu, 9 Apr 2015 08:52:38 +0000 (10:52 +0200)]
ASoC: Don't try to register debugfs entries if the parent does not exist

If the registration of a debugfs directory fails this is treated as a
non-fatal error in ASoC and operation continues as normal. This means we
need to be careful and check if the parent debugfs directory exists if we
try to register a debugfs file or sub-directory. Otherwise we might end up
passing NULL for the parent and the file or directory will be registered in
the top-level debugfs directory.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Make soc_dpcm_debugfs_add() non-fatal
Lars-Peter Clausen [Thu, 9 Apr 2015 08:52:37 +0000 (10:52 +0200)]
ASoC: Make soc_dpcm_debugfs_add() non-fatal

Failing to register the debugfs entries is not fatal and will not affect
normal operation of the sound card. Don't abort the card registration if
soc_dpcm_debugfs_add() fails.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt286: Restore default in probe
Bard Liao [Thu, 9 Apr 2015 03:20:32 +0000 (11:20 +0800)]
ASoC: rt286: Restore default in probe

RT286 can't do register reset. If the hardware power is still existing
in power off, rt286 will keep the register settings. So, we need to
restore the default register value in probe to make sure the cache value
is the same as the real register value.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Create card debugfs directory earlier
Lars-Peter Clausen [Thu, 9 Apr 2015 08:52:36 +0000 (10:52 +0200)]
ASoC: Create card debugfs directory earlier

Create the card debugfs directory at the begining of the initilization
rather then the end as various steps in the initilization sequence will try
to register files and sub-directories in the card directory.

Fixes: 4e2576bd36a1 ("ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()")
Reported-by: Fabio Estevam <festevam@gmail.com>
Reported-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge tag 'v4.0-rc7' into asoc-core
Mark Brown [Thu, 9 Apr 2015 10:23:57 +0000 (11:23 +0100)]
Merge tag 'v4.0-rc7' into asoc-core

Linux 4.0-rc7

9 years agoALSA: hda/realtek - Fix the regression by widget power-saving
Takashi Iwai [Thu, 9 Apr 2015 08:30:25 +0000 (10:30 +0200)]
ALSA: hda/realtek - Fix the regression by widget power-saving

While enabling the widget power-saving for ALC269 & co, the important
setup was forgotten -- stream_pm ops.  Without this setup, the paths
for PCM won't be powered up at all.

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

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: Intel: do cast earlier in sst_cdev_tstamp()
Dan Carpenter [Thu, 9 Apr 2015 09:02:39 +0000 (12:02 +0300)]
ASoC: Intel: do cast earlier in sst_cdev_tstamp()

My static checker complains about these because it looks like the
multiply can overflow and then we cast to a larger data type.  I don't
think this is a problem, but it's also harmless to do the cast earlier
so let's silence the static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda/generic - Don't override power_filter when power_save_node is set
Takashi Iwai [Thu, 9 Apr 2015 08:28:15 +0000 (10:28 +0200)]
ALSA: hda/generic - Don't override power_filter when power_save_node is set

Currently the generic parser sets codec->power_filter when
power_save_node flag is set.  But this overrides the existing filter
that has been already set by the codec driver, thus it looses some
features.  Instead, set the default power_filter only when it's not
set yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicable
Takashi Iwai [Thu, 9 Apr 2015 08:25:03 +0000 (10:25 +0200)]
ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicable

Add the check of power_save_node flag at the beginning of the function
so that it skips the rest if the flag isn't set.  In this way, we can
call this function safely no matter whether the widget power-saving is
really used or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/generic - Fix wrong initial power state for fixed pins
Takashi Iwai [Thu, 9 Apr 2015 08:21:30 +0000 (10:21 +0200)]
ALSA: hda/generic - Fix wrong initial power state for fixed pins

When the widget power-saving is enabled, the first automute hook
invocation checks through the whole pins and it also tries to
synchronize the power state.  However, this results in a wrong state
because it calls unconditionally snd_hda_jack_detect_state().
This patch adds a check of jack detectability before the actual jack
detection call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/generic - Check power state cap at updating the widget power
Takashi Iwai [Thu, 9 Apr 2015 08:18:31 +0000 (10:18 +0200)]
ALSA: hda/generic - Check power state cap at updating the widget power

The new widget power-saving tries to apply the power change no matter
whether the node has a power cap or not.  It's bad (although most of
codecs chip just ignore it).  Check the capability properly
beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Always allow access for POWER_STATE verbs via regmap
Takashi Iwai [Thu, 9 Apr 2015 05:58:46 +0000 (07:58 +0200)]
ALSA: hda - Always allow access for POWER_STATE verbs via regmap

The hdac regmap code checks whether the codec is powered on while
accessing, but there must be an exception -- the verbs to control the
power state.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: tegra_wm9712: Use card DAPM context to access widgets
Lars-Peter Clausen [Fri, 3 Apr 2015 11:04:08 +0000 (13:04 +0200)]
ASoC: tegra_wm9712: Use card DAPM context to access widgets

The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tegra_wm8903: Use card DAPM context to access widgets
Lars-Peter Clausen [Fri, 3 Apr 2015 11:04:07 +0000 (13:04 +0200)]
ASoC: tegra_wm8903: Use card DAPM context to access widgets

The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>