firefly-linux-kernel-4.4.55.git
9 years agoALSA: hdsp: fix memory leak
Sudip Mukherjee [Fri, 11 Sep 2015 13:40:38 +0000 (19:10 +0530)]
ALSA: hdsp: fix memory leak

If the size of the firmware is less than expected size then we are
exiting with the error code but we missed releasing the firmware.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Change internal PCM order
Johan Rastén [Sun, 6 Sep 2015 16:16:13 +0000 (18:16 +0200)]
ALSA: usb-audio: Change internal PCM order

New PCMs will now be added to the end of the chip's PCM list instead of to the
front. This changes the way streams are combined so that the first capture
stream will now be merged with the first playback stream instead of the last.

This fixes a problem with ASUS U7. Cards with one playback stream and cards
without capture streams should be unaffected by this change.

Exception added for M-Audio Audiophile USB (tm) since it seems to have a fix to
swap capture stream numbering in alsa-lib conf/cards/USB-audio.conf

Signed-off-by: Johan Rastén <johan@oljud.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix white noise on Dell M3800
Niranjan Sivakumar [Sat, 5 Sep 2015 16:20:35 +0000 (18:20 +0200)]
ALSA: hda - Fix white noise on Dell M3800

The M3800 is very minor workstation variant of the XPS 15 which has
already been patched for this issue.  I figured it's probably more
important for this version of the laptop to be patched than the
regular XPS as Dell sells is pre-configured with Ubuntu to be used as
a Linux workstation.  I have tested the patch on my the hardware on
Linux 4.2.0.

Signed-off-by: Niranjan Sivakumar <ns253@cornell.edu>
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Use ALC880_FIXUP_FUJITSU for FSC Amilo M1437
Takashi Iwai [Thu, 13 Aug 2015 16:05:06 +0000 (18:05 +0200)]
ALSA: hda - Use ALC880_FIXUP_FUJITSU for FSC Amilo M1437

It turned out that the machine has a bass speaker, so take a correct
fixup entry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102501
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Enable headphone jack detect on old Fujitsu laptops
Takashi Iwai [Thu, 13 Aug 2015 16:02:39 +0000 (18:02 +0200)]
ALSA: hda - Enable headphone jack detect on old Fujitsu laptops

According to the bug report, FSC Amilo laptops with ALC880 can detect
the headphone jack but currently the driver disables it.  It's partly
intentionally, as non-working jack detect was reported in the past.
Let's enable now.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102501
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sparc: amd7930: Fix module autoload for OF platform driver
Luis de Bethencourt [Thu, 3 Sep 2015 11:03:04 +0000 (13:03 +0200)]
ALSA: sparc: amd7930: Fix module autoload for OF platform driver

This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add some FIXUP quirks for white noise on Dell laptop.
Woodrow Shen [Fri, 4 Sep 2015 07:08:12 +0000 (15:08 +0800)]
ALSA: hda - Add some FIXUP quirks for white noise on Dell laptop.

Dell laptop has a series model to use the same codec but different subsystem ID.
At the same time they happens the white noise by login screen and headphone;
for fixing them together, I only can add these IDs to FIXUP function ALC292_FIXUP_DISABLE_AAMIX,
then try to solve such the similar issues.

Codec: Realtek ALC3235
Vendor Id: 0x10ec0293
Subsystem Id: 0x102806dd
Subsystem Id: 0x102806df
Subsystem Id: 0x102806e0

Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1492132
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agodrm/i915: Add locks around audio component bind/unbind
David Henningsson [Thu, 3 Sep 2015 09:51:35 +0000 (11:51 +0200)]
drm/i915: Add locks around audio component bind/unbind

This will make sure that audio callbacks do not race with
component bind/unbind.

[Note: this is an update patch to commit [51e1d83cab99: drm/i915: Call
 audio pin/ELD notify function] where I mistakenly applied the older
 version.  Jani and Daniel's review tags were to the latest version,
 so I add them below, too -- tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agodrm/i915: Drop port_mst_index parameter from pin/eld callback
David Henningsson [Thu, 3 Sep 2015 09:51:34 +0000 (11:51 +0200)]
drm/i915: Drop port_mst_index parameter from pin/eld callback

The port_mst_index parameter was reserved for future use, but
maintainers prefer to add it later when it is actually used.

[Note: this is an update patch to commit [51e1d83cab99: drm/i915: Call
 audio pin/ELD notify function] where I mistakenly applied the older
 version.  Jani and Daniel's review tags were to the latest version,
 so I add them below, too -- tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix missing inline for dummy snd_hdac_set_codec_wakeup()
Takashi Iwai [Wed, 2 Sep 2015 10:24:55 +0000 (12:24 +0200)]
ALSA: hda - Fix missing inline for dummy snd_hdac_set_codec_wakeup()

This seems overlooked.

Fixes: 98d8fc6c5d36 ('ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda')
Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Wake the codec up on pin/ELD notify events
David Henningsson [Wed, 19 Aug 2015 08:48:58 +0000 (10:48 +0200)]
ALSA: hda - Wake the codec up on pin/ELD notify events

Whenever there is an event from the i915 driver, wake the codec
and recheck plug/unplug + ELD status.

This fixes the issue with lost unsol events in power save mode,
the codec and controller can now sleep in D3 and still know when
the HDMI monitor has been connected.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - allow codecs to access the i915 pin/ELD callback
David Henningsson [Wed, 19 Aug 2015 08:48:57 +0000 (10:48 +0200)]
ALSA: hda - allow codecs to access the i915 pin/ELD callback

This lets the interested codec be notified when an i915 pin/ELD
event happens.

[tiwai: Fixed a trivial build error for CONFIG_SND_HDA_I915=n]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agodrm/i915: Call audio pin/ELD notify function
David Henningsson [Wed, 19 Aug 2015 08:48:56 +0000 (10:48 +0200)]
drm/i915: Call audio pin/ELD notify function

When the audio codec is enabled or disabled, notify the audio driver.
This will enable the audio driver to get the notification at all times
(even when audio is in different powersave states).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agodrm/i915: Add audio pin sense / ELD callback
David Henningsson [Wed, 19 Aug 2015 08:48:55 +0000 (10:48 +0200)]
drm/i915: Add audio pin sense / ELD callback

This callback will be called by the i915 driver to notify the hda
driver that its HDMI information needs to be refreshed, i e,
that audio output is now available (or unavailable) - usually as a
result of a monitor being plugged in (or unplugged).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-v4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 31 Aug 2015 14:25:22 +0000 (16:25 +0200)]
Merge tag 'asoc-v4.2-rc8' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.3

Not many updates to the core here, but an awful lot of driver updates
this time round:

 - Factoring out of AC'97 reset code into the core
 - New drivers for Cirrus CS4349, GTM601, InvenSense ICS43432, Realtek
   RT298 and ST STI controllers.
 - Machine drivers for Rockchip systems with MAX98090 and RT5645 and
   RT5650.
 - Initial driver support for Intel Skylake devices.
 - A large number of cleanups for Lars-Peter Clausen and Axel Lin.

9 years agoMerge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:59:18 +0000 (15:59 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc/topic/zx296702' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:56 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic/wm8904', 'asoc/topic/wm8960' and 'asoc/topic/wm8983' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm5100', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:36 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/wm0010', 'asoc/topic/wm5100', 'asoc/topic/wm5110', 'asoc/topic/wm8004' and 'asoc/topic/wm8731' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:58:18 +0000 (15:58 +0100)]
Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/uda134x', 'asoc/topic/ux500' and 'asoc/topic/width' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:57:34 +0000 (15:57 +0100)]
Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/ssm2518', 'asoc/topic/sta529', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:57:13 +0000 (15:57 +0100)]
Merge remote-tracking branches 'asoc/topic/ssm2518', 'asoc/topic/sta529', 'asoc/topic/sti' and 'asoc/topic/sti-sas' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:56:44 +0000 (15:56 +0100)]
Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf-codec' and 'asoc/topic/spear' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:56:27 +0000 (15:56 +0100)]
Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic/rt5651' and 'asoc/topic/rt5670' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:55:54 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:55:41 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/pm-ops', 'asoc/topic/pxa' and 'asoc/topic/qcom' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/mtk', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:55:21 +0000 (15:55 +0100)]
Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/mtk', 'asoc/topic/nuc900', 'asoc/topic/of-name' and 'asoc/topic/omap' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:54:57 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/max98357a', 'asoc/topic/max9877' and 'asoc/topic/max98925' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:54:38 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic/lm49453', 'asoc/topic/max9768' and 'asoc/topic/max98088' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:54:15 +0000 (15:54 +0100)]
Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fsl-ssi', 'asoc/topic/gtm601', 'asoc/topic/ics43432' and 'asoc/topic/ids' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsi', 'asoc/topic/fsl', 'asoc/topic/fsl...
Mark Brown [Sun, 30 Aug 2015 14:53:56 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/fsi', 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-card' and 'asoc/topic/fsl-sai' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/davinci-vcif', ...
Mark Brown [Sun, 30 Aug 2015 14:53:39 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/davinci-vcif', 'asoc/topic/doc' and 'asoc/topic/dpcm' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc...
Mark Brown [Sun, 30 Aug 2015 14:53:22 +0000 (15:53 +0100)]
Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42l73', 'asoc/topic/cs4349' and 'asoc/topic/da732x' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:59 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bcm2835', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:41 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/au1x', 'asoc/topic/bcm2835', 'asoc/topic/blackfin' and 'asoc/topic/card' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', 'asoc/topic...
Mark Brown [Sun, 30 Aug 2015 14:52:21 +0000 (15:52 +0100)]
Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', 'asoc/topic/ak4542', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/ssm4567' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:16 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/ssm4567' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:12 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:52:08 +0000 (15:52 +0100)]
Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Sun, 30 Aug 2015 14:51:57 +0000 (15:51 +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, 30 Aug 2015 14:51:52 +0000 (15:51 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/fix/adav80x', 'asoc/fix/arizona', 'asoc/fix...
Mark Brown [Sun, 30 Aug 2015 14:51:20 +0000 (15:51 +0100)]
Merge remote-tracking branches 'asoc/fix/adav80x', 'asoc/fix/arizona', 'asoc/fix/max98090', 'asoc/fix/rt5640', 'asoc/fix/samsung' and 'asoc/fix/wm8994' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Mark Brown [Sun, 30 Aug 2015 14:51:15 +0000 (15:51 +0100)]
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus

9 years agoASoC: zx296702-i2s: Fix resource leak when unload module
Axel Lin [Sat, 29 Aug 2015 15:09:30 +0000 (23:09 +0800)]
ASoC: zx296702-i2s: Fix resource leak when unload module

Use devm_* API to fix leaks in current code.
1. Use devm_kzalloc to fix memory leak for zx_i2s when unload the module.
2. Use devm_snd_soc_register_component to ensure component is unregistered
   when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sti_uniperif: Ensure component is unregistered when unload module
Axel Lin [Sat, 29 Aug 2015 15:06:32 +0000 (23:06 +0800)]
ASoC: sti_uniperif: Ensure component is unregistered when unload module

Use devm_snd_soc_register_component to ensure component is unregistered
when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource
Axel Lin [Sun, 30 Aug 2015 03:09:49 +0000 (11:09 +0800)]
ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform
Axel Lin [Sun, 30 Aug 2015 03:07:33 +0000 (11:07 +0800)]
ASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak
Axel Lin [Sun, 30 Aug 2015 00:08:15 +0000 (08:08 +0800)]
ASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak

All the callers assume devm_spear_pcm_platform_register is a devm_ API, so
use devm_snd_dmaengine_pcm_register in devm_spear_pcm_platform_register.

Fixes: e1771bcf99b0 ("ASoC: SPEAr: remove custom DMA alloc compat function")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure
Takashi Sakamoto [Sat, 29 Aug 2015 01:38:46 +0000 (10:38 +0900)]
ALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure

In PCM core, when hw_params() in each driver returns error, the state of
PCM substream is kept as 'open'. In this case, current drivers for sound
units on IEEE 1394 bus doesn't decrement substream counter in hw_free()
correctly. This causes these drivers to keep streams even if not
required.

This commit fixes this bug. When snd_pcm_lib_alloc_vmalloc_buffer()
fails, hw_params function in each driver returns without incrementing the
counter.

Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: Clean up docbook warnings
Jonathan Corbet [Tue, 25 Aug 2015 07:14:48 +0000 (01:14 -0600)]
ASoC: Clean up docbook warnings

A number of functions and structures in the sound subsystem had incomplete
and/or obsolete DocBook comments, leading to warnings when the docs were
built.  Correct those comments so that we can enjoy our audio in the
absence of warning noise.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: txx9: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:14:50 +0000 (09:14 +0800)]
ASoC: txx9: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:13:46 +0000 (09:13 +0800)]
ASoC: pxa: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: nuc900: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:12:17 +0000 (09:12 +0800)]
ASoC: nuc900: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: blackfin: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:11:13 +0000 (09:11 +0800)]
ASoC: blackfin: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: au1x: Convert to devm_snd_soc_register_platform
Axel Lin [Thu, 27 Aug 2015 01:09:29 +0000 (09:09 +0800)]
ASoC: au1x: Convert to devm_snd_soc_register_platform

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops
Axel Lin [Fri, 28 Aug 2015 02:53:31 +0000 (10:53 +0800)]
ASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops

asoc_qcom_lpass_cpu_dai_ops is exported and used by multiple drivers,
make it const to prevent modifying it at run time.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sh: ssi: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:50:53 +0000 (10:50 +0800)]
ASoC: sh: ssi: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa2xx-i2s: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:49:44 +0000 (10:49 +0800)]
ASoC: pxa2xx-i2s: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pxa-ssp: Convert to devm_snd_soc_register_component
Axel Lin [Fri, 28 Aug 2015 02:48:35 +0000 (10:48 +0800)]
ASoC: pxa-ssp: Convert to devm_snd_soc_register_component

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Fix build errors
Ricard Wanderlof [Fri, 28 Aug 2015 10:11:48 +0000 (12:11 +0200)]
ASoC: ics43432: Fix build errors

Fix build errors

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Fix module license
Axel Lin [Fri, 28 Aug 2015 03:23:05 +0000 (11:23 +0800)]
ASoC: ics43432: Fix module license

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Fri, 28 Aug 2015 02:04:03 +0000 (10:04 +0800)]
ASoC: ics43432: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/ics43432.c:66: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

CC: Ricard Wanderlof <ricard.wanderlof@axis.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: usb-audio: correct the value cache check.
Yao-Wen Mao [Fri, 28 Aug 2015 08:33:25 +0000 (16:33 +0800)]
ALSA: usb-audio: correct the value cache check.

The check of cval->cached should be zero-based (including master channel).

Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'topic/ics43432' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Mark Brown [Thu, 27 Aug 2015 19:30:46 +0000 (20:30 +0100)]
Merge branch 'topic/ics43432' of git://git./linux/kernel/git/broonie/sound into asoc-gtm601

9 years agoMerge branch 'topic/gtm601' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Thu, 27 Aug 2015 19:29:18 +0000 (20:29 +0100)]
Merge branch 'topic/gtm601' of git://git./linux/kernel/git/broonie/sound into asoc-ics43432

9 years agoASoC: bcm2835-i2s: Fix module autoload for OF platform drivers
Luis de Bethencourt [Thu, 27 Aug 2015 15:04:01 +0000 (17:04 +0200)]
ASoC: bcm2835-i2s: Fix module autoload for OF platform drivers

These platform drivers have a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning
Oder Chiou [Thu, 27 Aug 2015 07:14:51 +0000 (15:14 +0800)]
ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning

Add i2c shutdown function to prevent the pop sound of the headphone while
the system is rebooting or shutdowning. It de-initials the jack detection
function, and it cannot be turned off in _BIAS_OFF. If we don't de-initial
it, the pop sound will be heard in the situation of powering off. And
replace the related register settings from magic number to meaningful
defined name.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ics43432: Add codec driver for InvenSense ICS-43432
Ricard Wanderlof [Thu, 27 Aug 2015 09:35:20 +0000 (11:35 +0200)]
ASoC: ics43432: Add codec driver for InvenSense ICS-43432

Add support for the InvenSense ICS-43432 I2S MEMS microphone.

This is a non-software-configurable MEMS microphone with I2S output.

Tested on a setup with a single ICS-43432 (the device itself supports
stereo operation using a hardware pin controlling left vs. right channel
output).

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tegra: Use devm_ioremap_resource instead of open code
Axel Lin [Sun, 23 Aug 2015 15:32:14 +0000 (23:32 +0800)]
ASoC: tegra: Use devm_ioremap_resource instead of open code

Use devm_ioremap_resource() to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128
Jyri Sarha [Wed, 26 Aug 2015 13:11:40 +0000 (16:11 +0300)]
ASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128

Set buffer bytes step constraint to 128. A matching constraint has
already been set to period size. This helps PCM setup to tolerate ALSA
clients that set the PCM hw params in unusual order.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: usb-audio: Handle normal and auto-suspend equally
Takashi Iwai [Wed, 26 Aug 2015 08:23:26 +0000 (10:23 +0200)]
ALSA: usb-audio: Handle normal and auto-suspend equally

In theory, the device may get suspended even at runtime PM suspend.
Currently we don't save the mixer state for autopm, and it may bring
inconsistency.

This patch removes the special handling for autosuspend.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Replace probing flag with active refcount
Takashi Iwai [Wed, 26 Aug 2015 08:20:59 +0000 (10:20 +0200)]
ALSA: usb-audio: Replace probing flag with active refcount

We can use active refcount for preventing autopm during probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Avoid nested autoresume calls
Takashi Iwai [Tue, 25 Aug 2015 14:09:00 +0000 (16:09 +0200)]
ALSA: usb-audio: Avoid nested autoresume calls

After the recent fix of runtime PM for USB-audio driver, we got a
lockdep warning like:

  =============================================
  [ INFO: possible recursive locking detected ]
  4.2.0-rc8+ #61 Not tainted
  ---------------------------------------------
  pulseaudio/980 is trying to acquire lock:
   (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
  but task is already holding lock:
   (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]

This comes from snd_usb_autoresume() invoking down_read() and it's
used in a nested way.  Although it's basically safe, per se (as these
are read locks), it's better to reduce such spurious warnings.

The read lock is needed to guarantee the execution of "shutdown"
(cleanup at disconnection) task after all concurrent tasks are
finished.  This can be implemented in another better way.

Also, the current check of chip->in_pm isn't good enough for
protecting the racy execution of multiple auto-resumes.

This patch rewrites the logic of snd_usb_autoresume() & co; namely,
- The recursive call of autopm is avoided by the new refcount,
  chip->active.  The chip->in_pm flag is removed accordingly.
- Instead of rwsem, another refcount, chip->usage_count, is introduced
  for tracking the period to delay the shutdown procedure.  At
  the last clear of this refcount, wake_up() to the shutdown waiter is
  called.
- The shutdown flag is replaced with shutdown atomic count; this is
  for reducing the lock.
- Two new helpers are introduced to simplify the management of these
  refcounts; snd_usb_lock_shutdown() increases the usage_count, checks
  the shutdown state, and does autoresume.  snd_usb_unlock_shutdown()
  does the opposite.  Most of mixer and other codes just need this,
  and simply returns an error if it receives an error from lock.

Fixes: 9003ebb13f61 ('ALSA: usb-audio: Fix runtime PM unbalance')
Reported-and-tested-by: Alexnader Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Remove superfluous pcm NULL check
Takashi Iwai [Wed, 26 Aug 2015 12:21:14 +0000 (14:21 +0200)]
ALSA: hda - Remove superfluous pcm NULL check

The variable pcm can be never NULL since it was rewritten with
list_for_each_entry().

Suggested-by: Markus Osterhoff <linux-kernel@k-raum.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: rockchip: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Wed, 26 Aug 2015 11:48:13 +0000 (19:48 +0800)]
ASoC: rockchip: fix platform_no_drv_owner.cocci warnings

sound/soc/rockchip/rockchip_rt5645.c:214: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: rockchip: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Wed, 26 Aug 2015 11:44:10 +0000 (19:44 +0800)]
ASoC: rockchip: fix platform_no_drv_owner.cocci warnings

sound/soc/rockchip/rockchip_max98090.c:225: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: rockchip: fix a misjudgement by return
Xing Zheng [Tue, 25 Aug 2015 07:52:42 +0000 (15:52 +0800)]
ASoC: rockchip: fix a misjudgement by return

Being careless, judge the return value of snd_soc_card_jack_new
is opposite, so it should be fixed.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda - Fix widget sysfs tree corruption after refresh
Takashi Iwai [Wed, 26 Aug 2015 05:22:49 +0000 (07:22 +0200)]
ALSA: hda - Fix widget sysfs tree corruption after refresh

When snd_hdac_refresh_widget_sysfs() is called before the first
hda_widget_sysfs_init(), the next call overrides and eventually
fails.  This results in unexpected Oops, something like:
  BUG: unable to handle kernel NULL pointer dereference at 00000000000000c8
  IP: [<ffffffff8180e2a3>] hdmi_chmap_ctl_info+0x23/0x40

The fix is to add a check of the existing sysfs tree.  Also, for more
safety, this patch adds the checks of device_is_registered() in
snd-hdac_refresh_wdiget_sysfs(), too.

Fixes: fa4f18b4f402 ('ALSA: hda - Refresh widgets sysfs at probing Haswell+ HDMI codecs')
Bugizlla: https://bugzilla.kernel.org/show_bug.cgi?id=103431
Reported-by: Andreas Reis <andreas.reis@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: arizona: Poll for FLL clock OK rather than use interrupts
Charles Keepax [Tue, 25 Aug 2015 11:43:48 +0000 (12:43 +0100)]
ASoC: arizona: Poll for FLL clock OK rather than use interrupts

The extcon driver takes the DAPM mutex from within the interrupt thread
in several places, which makes it possible to get into a situation where
the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM
sequence is running which is attempting to configure the FLL. In this
case the FLL completion can't be completed as as the IRQ handler is
ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and
report that the process timed out.

It is not really practical to make the extcon driver not take the DAPM
mutex from within the interrupt thread, at least not without extensive
modification. So this patch fixes the issue by switching the wait for
the FLL lock to polling. A few fast polls are done first as the FLL
should lock quickly for a good quality reference clock, (indeed it hits
on the first poll on my system) and it will poll every 20mS after that
until it times out.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform
Oder Chiou [Tue, 25 Aug 2015 08:03:48 +0000 (16:03 +0800)]
ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platform

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function
Oder Chiou [Mon, 24 Aug 2015 12:32:59 +0000 (20:32 +0800)]
ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Remove the incorrect setting of the JD mode
Oder Chiou [Mon, 24 Aug 2015 12:32:58 +0000 (20:32 +0800)]
ASoC: rt5645: Remove the incorrect setting of the JD mode

The patch removes the incorrect setting of the JD mode. It will cause pop
sound in the booting time.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Modify the jack detection function to prevent the pop sound while the...
Oder Chiou [Mon, 24 Aug 2015 12:32:57 +0000 (20:32 +0800)]
ASoC: rt5645: Modify the jack detection function to prevent the pop sound while the jack plug in

The patch corrects the sequence of the jack detection. It will prevent the
pop sound while the jack plug in.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5645: Modify the headphone depop and calibration function to prevent the...
Oder Chiou [Mon, 24 Aug 2015 12:32:56 +0000 (20:32 +0800)]
ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting time

Remove the original calibration function and modify the depop and
calibration function to prevent the pop sound in the booting time.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5677: Allow arbitrary block read/write via SPI
Ben Zhang [Sat, 22 Aug 2015 04:17:00 +0000 (21:17 -0700)]
ASoC: rt5677: Allow arbitrary block read/write via SPI

Added rt5677_spi_read() and refactored rt5677_spi_write() so that
an arbitrary block in the DSP address space can be read/written
via SPI. For example, this allows us to load an ELF DSP firmware
with sparse sections, and stream audio samples from DSP ring buffer.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Acked-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: ppc: Add missing inclusion of linux/module.h
Takashi Iwai [Tue, 25 Aug 2015 12:04:44 +0000 (14:04 +0200)]
ALSA: ppc: Add missing inclusion of linux/module.h

Otherwise it triggers a compile warning like:
 sound/ppc/keywest.c:104:1: warning: data definition has no type or storage class
 sound/ppc/keywest.c:104:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]

Fixes: a2bc2af66a5b ('ALSA: ppc: keywest: Export I2C module alias information')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ppc: keywest: Export I2C module alias information
Javier Martinez Canillas [Tue, 25 Aug 2015 06:31:14 +0000 (08:31 +0200)]
ALSA: ppc: keywest: Export I2C module alias information

The I2C core always reports the MODALIAS uevent as "i2c:<client name"
regardless if the driver was matched using the I2C id_table or the
of_match_table. So the driver needs to export the I2C table and this
be built into the module or udev won't have the necessary information
to auto load the correct module when the device is added.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoASoC: tegra: Fix unused variable 'spdif' warning
Axel Lin [Sun, 23 Aug 2015 02:07:13 +0000 (10:07 +0800)]
ASoC: tegra: Fix unused variable 'spdif' warning

Fix below build warning:
  CC [M]  sound/soc/tegra/tegra20_spdif.o
sound/soc/tegra/tegra20_spdif.c: In function 'tegra20_spdif_platform_remove':
sound/soc/tegra/tegra20_spdif.c:361:24: warning: unused variable 'spdif' [-Wunused-variable]

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: SPEAr: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:52:30 +0000 (16:52 +0800)]
ASoC: SPEAr: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: omap-mcbsp: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:49:05 +0000 (16:49 +0800)]
ASoC: omap-mcbsp: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: davinci: Convert to use devm_ioremap_resource
Axel Lin [Mon, 24 Aug 2015 08:47:36 +0000 (16:47 +0800)]
ASoC: davinci: Convert to use devm_ioremap_resource

Use devm_ioremap_resource() instead of open code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs4349: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Sat, 22 Aug 2015 16:30:19 +0000 (00:30 +0800)]
ASoC: cs4349: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/cs4349.c:389: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

CC: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()
Takashi Iwai [Tue, 25 Aug 2015 06:52:55 +0000 (08:52 +0200)]
ALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()

In the commit [fa4f18b4f402: ALSA: hda - Refresh widgets sysfs at
probing Haswell+ HDMI codecs], snd_hdac_refresh_widget_sysfs() is
explicitly called in the codec driver.  But this results in refreshing
twice, as snd_hdac_refresh_widget_sysfs() itself calls
snd_hdac_refresh_widgets() function.

Instead, we can replace the call in snd_hda_codec_update_widgets()
with snd_hdac_refresh_widget_sysfs().  This also fixes the missing
sysfs update for ca0132, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 25 Aug 2015 06:01:41 +0000 (08:01 +0200)]
Merge branch 'for-linus' into for-next

9 years agoALSA: hda - Fix path power activation
Takashi Iwai [Mon, 24 Aug 2015 08:52:06 +0000 (10:52 +0200)]
ALSA: hda - Fix path power activation

The widget power-saving code tries to turn up/down the power of each
widget in the I/O paths that are modified at each jack plug/unplug.
The recent report revealed that the power activation leaves some
widgets unpowered after plugging.  This is because
snd_hda_activate_path() turns on path->active flag at the end of the
function while the path power management is done before that.  Then
it's regarded as if nothing is active, and the driver turns off the
power.

The fix is simply to set the flag at the beginning of the function,
before trying to power up.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Cc: <stable@vger.kernel.org> [v4.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Check all inputs for is_active_nid_for_any()
Takashi Iwai [Mon, 24 Aug 2015 08:45:27 +0000 (10:45 +0200)]
ALSA: hda - Check all inputs for is_active_nid_for_any()

The is_active_nid_for_any() function in the generic parser is supposed
to check all connections from/to the given widget, but the current
code checks only the first input connection (index = 0).

This patch corrects the code to check all inputs by passing -1 to
index argument.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Cc: <stable@vger.kernel.org> [v4.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda: fix possible NULL dereference
Markus Osterhoff [Mon, 24 Aug 2015 12:11:39 +0000 (14:11 +0200)]
ALSA: hda: fix possible NULL dereference

After a for-loop was replaced by list_for_each_entry, see
Commit bbbc7e8502c9 ("ALSA: hda - Allocate hda_pcm objects dynamically"),
Commit 751e2216899c ("ALSA: hda: fix possible null dereference"),
a possible NULL pointer dereference has been introduced; this patch adds
the NULL check on pcm->pcm, while leaving a potentially superfluous
check on pcm itself untouched.

Signed-off-by: Markus Osterhoff <linux-kernel@k-raum.org>
Cc: <stable@vger.kernel.org> #v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoLinux 4.2-rc8
Linus Torvalds [Mon, 24 Aug 2015 03:52:59 +0000 (20:52 -0700)]
Linux 4.2-rc8

9 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Mon, 24 Aug 2015 03:46:22 +0000 (20:46 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "A couple of major (hang and deadlock) fixes with fortunately fairly
  rare triggering conditions.  The PM oops is only really triggered by
  people using enclosure services (rare) and the fnic driver is mostly
  used in enterprise environments"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  SCSI: Fix NULL pointer dereference in runtime PM
  fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack

9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 23 Aug 2015 14:23:09 +0000 (07:23 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS bug fixes from Ralf Baechle:
 "Two more fixes for 4.2.

  One fixes a build issue with the LLVM assembler - LLVM assembler macro
  names are case sensitive, GNU as macro names are insensitive; the
  other corrects a license string (GPL v2, not GPLv2) such that the
  module loader will recognice the license correctly"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  FIRMWARE: bcm47xx_nvram: Fix module license.
  MIPS: Fix LLVM build issue.

9 years agoALSA: hdac: Add snd_hdac_get_hdac_stream()
Jeeja KP [Sun, 23 Aug 2015 06:22:51 +0000 (11:52 +0530)]
ALSA: hdac: Add snd_hdac_get_hdac_stream()

Add a helper to find the stream using stream tag and direction.
This is useful for drivers to query stream based on stream tag
and direction, fox example while downloading FW thru DSP loader
code

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>