GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
9 years agoALSA: dummy: constify dummy_timer_ops structures
Julia Lawall [Wed, 30 Dec 2015 11:28:49 +0000 (12:28 +0100)]
ALSA: dummy: constify dummy_timer_ops structures

The dummy_timer_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: cs5535audio: constify cs5535audio_dma_ops structures
Julia Lawall [Wed, 30 Dec 2015 10:44:53 +0000 (11:44 +0100)]
ALSA: cs5535audio: constify cs5535audio_dma_ops structures

The cs5535audio_dma_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: atiixp: constify atiixp_dma_ops structures
Julia Lawall [Wed, 30 Dec 2015 10:21:57 +0000 (11:21 +0100)]
ALSA: atiixp: constify atiixp_dma_ops structures

The atiixp_dma_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Wed, 23 Dec 2015 07:33:52 +0000 (08:33 +0100)]
Merge tag 'asoc-v4.5' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v4.5

This is quite a busy release on the driver front with a lot of new
drivers being added but comparatively quiet on the core side with only
one big change going in and that a fairly straightforward refactoring.

 - Conversion of the array of DAI links to a list by Mengdong Lin,
   supporting dynamically adding and removing DAI links.
 - Some more fixes for the topology code, though it is still not final
   and ready for enabling in production.  We really need to get to the
   point where that can be done.
 - A pile of changes for Intel SkyLake drivers which hopefully deliver
   some useful initial functionality for systems with this chipset,
   though there is more work still to come.
 - New drivers for a number of Imagination Technologies IPs.
 - Lots of new features and cleanups for the Renesas drivers.
 - ANC support for WM5110.
 - New driver for Atmel class D speaker drivers.
 - New drivers for Cirrus CS47L24 and WM1831.
 - New driver for Dialog DA7128.
 - New drivers for Realtek RT5659 and RT56156.
 - New driver for Rockchip RK3036.
 - New driver for TI PC3168A

9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Wed, 23 Dec 2015 07:33:34 +0000 (08:33 +0100)]
Merge branch 'for-linus' into for-next

Conflicts:
drivers/gpu/drm/i915/intel_pm.c

9 years agoMerge tag 'asoc-fix-v4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Takashi Iwai [Wed, 23 Dec 2015 07:30:28 +0000 (08:30 +0100)]
Merge tag 'asoc-fix-v4.4-rc6' of git://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.4

A collection of small driver specific fixes here, nothing that'll affect
users who don't have the devices concerned.  At least the wm8974 bug
indicates that there's not too many users of some of these devices.

9 years agoMerge remote-tracking branch 'asoc/topic/rt5677' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:38:14 +0000 (00:38 +0000)]
Merge remote-tracking branch 'asoc/topic/rt5677' into asoc-next

9 years agoMerge tag 'asoc-v4.5' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:38:12 +0000 (00:38 +0000)]
Merge tag 'asoc-v4.5' into asoc-next

ASoC: Updates for v4.5

 - Some more fixes for the topology code, though it is still not final
   and ready for enabling in production.  We really need to get to the
   point where that can be done.
 - A pile of changes for Intel SkyLake drivers which hopefully deliver
   some useful initial functionality for systems with this chipset,
   though there is more work still to come.
 - New drivers for a number of Imagination Technologies IPs.
 - Lots of new features and cleanups for the Renesas drivers.
 - ANC support for WM5110.
 - New driver for Atmel class D speaker drivers.
 - New drivers for Cirrus CS47L24 and WM1831.
 - New driver for Dialog DA7128.
 - New drivers for Realtek RT5659 and RT56156.
 - New driver for Rockchip RK3036.

# gpg: Signature made Wed 23 Dec 2015 00:36:01 GMT using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: key 00000000 occurs more than once in the trustdb
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# 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 tag 'asoc-fix-v4.4-rc6' into asoc-linus
Mark Brown [Wed, 23 Dec 2015 00:38:11 +0000 (00:38 +0000)]
Merge tag 'asoc-fix-v4.4-rc6' into asoc-linus

ASoC: Fixes for v4.4

A collection of small driver specific fixes here, nothing that'll affect
users who don't have the devices concerned.  At least the wm8974 bug
indicates that there's not too many users of some of these devices.

# gpg: Signature made Wed 23 Dec 2015 00:25:40 GMT using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: key 00000000 occurs more than once in the trustdb
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# 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: rt5677: set PLL_CTRL2 non-volatile
Bard Liao [Fri, 18 Dec 2015 02:16:23 +0000 (10:16 +0800)]
ASoC: rt5677: set PLL_CTRL2 non-volatile

There is a status bit on RT5677_PLL1_CTRL2 and RT5677_PLL2_CTRL2.
That's why those registers are set volatile. However, the status
bit is currently not used by codec driver. So, it should be no
problem if we set them non-volatile.
The purpose of setting them non-volatile is to restore the setting
after a syspend/resume cycle.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge remote-tracking branches 'asoc/topic/wm8962', 'asoc/topic/wm8974' and 'asoc...
Mark Brown [Wed, 23 Dec 2015 00:23:54 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/wm8962', 'asoc/topic/wm8974' and 'asoc/topic/wm9713' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/topology', 'asoc/topic...
Mark Brown [Wed, 23 Dec 2015 00:23:52 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/tegra', 'asoc/topic/topology', 'asoc/topic/wm8903' and 'asoc/topic/wm8904' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic...
Mark Brown [Wed, 23 Dec 2015 00:23:51 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/ssm2518' and 'asoc/topic/sti' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/rt286', 'asoc/topic/rt5616' and 'asoc...
Mark Brown [Wed, 23 Dec 2015 00:23:49 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/rt286', 'asoc/topic/rt5616' and 'asoc/topic/rt5677' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom', 'asoc/topic/rcar...
Mark Brown [Wed, 23 Dec 2015 00:23:46 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom', 'asoc/topic/rcar', 'asoc/topic/rk3036' and 'asoc/topic/rockchip' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/kcontrol', 'asoc/topic/max98357a' and...
Mark Brown [Wed, 23 Dec 2015 00:23:44 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/kcontrol', 'asoc/topic/max98357a' and 'asoc/topic/mtk' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/img' and 'asoc...
Mark Brown [Wed, 23 Dec 2015 00:23:43 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/img' and 'asoc/topic/intel' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/dpcm', 'asoc/topic/dwc', 'asoc/topic/fsl...
Mark Brown [Wed, 23 Dec 2015 00:23:40 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/dpcm', 'asoc/topic/dwc', 'asoc/topic/fsl', 'asoc/topic/fsl-asrc' and 'asoc/topic/fsl-esai' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/da7219', 'asoc/topic/dai-link' and 'asoc...
Mark Brown [Wed, 23 Dec 2015 00:23:39 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/da7219', 'asoc/topic/dai-link' and 'asoc/topic/doc' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/atmel-classd', 'asoc/topic/const' and...
Mark Brown [Wed, 23 Dec 2015 00:23:37 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/atmel-classd', 'asoc/topic/const' and 'asoc/topic/da7218' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/adsp', 'asoc/topic...
Mark Brown [Wed, 23 Dec 2015 00:23:35 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/adsp', 'asoc/topic/ak4613' and 'asoc/topic/atmel' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/sunxi' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:34 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/sunxi' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:33 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:33 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/pcm-list' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:32 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm-list' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/dapm' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:32 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next

9 years agoMerge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Mark Brown [Wed, 23 Dec 2015 00:23:31 +0000 (00:23 +0000)]
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next

9 years agoMerge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', 'asoc/fix/fsl...
Mark Brown [Wed, 23 Dec 2015 00:23:27 +0000 (00:23 +0000)]
Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/es8328', 'asoc/fix/fsl-sai', 'asoc/fix/rockchip', 'asoc/fix/sgtl5000' and 'asoc/fix/wm8974' into asoc-linus

9 years agoASoC: ac97: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:51:39 +0000 (15:51 +0100)]
ASoC: ac97: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8903: Be sure to clamp return value
Linus Walleij [Tue, 22 Dec 2015 14:50:49 +0000 (15:50 +0100)]
ASoC: wm8903: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Attach buffers and streams together
Charles Keepax [Tue, 15 Dec 2015 11:29:47 +0000 (11:29 +0000)]
ASoC: wm_adsp: Attach buffers and streams together

The stream is created whilst the compressed stream is opened and a
buffer is created when the DSP powers up. It is necessary at a point
once both the DSP has powered up and the the stream has been opened to
connect a stream to a buffer on the DSP. This is done in the trigger
callback as this is after the DSP has been powered and obviously the
stream must be open. Note that whilst the connect is currently trivial
it is expected that this will get more complex when support for multiple
buffers/streams per DSP is added.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Add code to locate and initialise compressed buffer
Charles Keepax [Tue, 15 Dec 2015 11:29:46 +0000 (11:29 +0000)]
ASoC: wm_adsp: Add code to locate and initialise compressed buffer

Add code that locates and initialises the buffer of compressed data on
the DSP if the firmware supported compressed data capture. The buffer
struct (wm_adsp_compr_buf) is kept separate from the stream struct
(wm_adsp_compr) this will allow much easier support of multiple
streams of data from the one DSP in the future, although support for
this will not be added in this patch chain.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Add support for opening a compressed stream
Charles Keepax [Tue, 15 Dec 2015 11:29:45 +0000 (11:29 +0000)]
ASoC: wm_adsp: Add support for opening a compressed stream

Allow user-space to open a compressed stream, although no data will be
passed yet, as part of this adding the ability to define supported
capabilities per firmware and check these match the stream being opened.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: compress: Add SND_AUDIOCODEC_BESPOKE
Charles Keepax [Tue, 15 Dec 2015 11:29:44 +0000 (11:29 +0000)]
ALSA: compress: Add SND_AUDIOCODEC_BESPOKE

When working with the compressed framework occasionally vendors will
use esoteric internal audio formats. For such formats it doesn't really
make sense to add an new define to the kernel as their use is not
sufficiently general.

This patch adds a new define SND_AUDIOCODEC_BESPOKE that vendors can use
in such situations.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Factor out finding the location of an algorithm region
Charles Keepax [Tue, 15 Dec 2015 11:29:43 +0000 (11:29 +0000)]
ASoC: wm_adsp: Factor out finding the location of an algorithm region

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm5110: Provide basic hookup for voice control
Charles Keepax [Tue, 15 Dec 2015 11:29:42 +0000 (11:29 +0000)]
ASoC: wm5110: Provide basic hookup for voice control

Register a platform driver for the CODEC and add DAIs that will be used
to connect a compressed record path for the voice control functionality.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge branch 'topic/cs47l24' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Wed, 23 Dec 2015 00:20:47 +0000 (00:20 +0000)]
Merge branch 'topic/cs47l24' of git://git./linux/kernel/git/broonie/sound into asoc-adsp

9 years agoMerge branch 'topic/arizona' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Wed, 23 Dec 2015 00:20:30 +0000 (00:20 +0000)]
Merge branch 'topic/arizona' of git://git./linux/kernel/git/broonie/sound into asoc-adsp

9 years agoASoC: da7219: Remove support for 32KHz PLL mode
Adam Thomson [Tue, 22 Dec 2015 18:27:56 +0000 (18:27 +0000)]
ASoC: da7219: Remove support for 32KHz PLL mode

PLL mode based on 32KHz master clock not supported in
AB silicon so remove support from the driver.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7219: Add support for 1.6V micbias level
Adam Thomson [Tue, 22 Dec 2015 18:27:55 +0000 (18:27 +0000)]
ASoC: da7219: Add support for 1.6V micbias level

HW can provide 1.6V micbias level as well the existing levels
already provided in the driver. This patch adds support for 1.6V
to the DT binding.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7219: Remove internal LDO features of codec
Adam Thomson [Tue, 22 Dec 2015 18:27:54 +0000 (18:27 +0000)]
ASoC: da7219: Remove internal LDO features of codec

In AB silicon, the internal LDO is not supported so remove
DT and driver references to this (digital voltage direct from
'VDD' supply)

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7219: Update REFERENCES reg default, in-line with HW
Adam Thomson [Tue, 22 Dec 2015 18:27:53 +0000 (18:27 +0000)]
ASoC: da7219: Update REFERENCES reg default, in-line with HW

In current AB silicon, BIAS_EN field is enabled by default in the
REFERENCES register, so the regmap default value should reflect
this.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7219: Disable regulators on probe() failure
Adam Thomson [Tue, 22 Dec 2015 18:27:51 +0000 (18:27 +0000)]
ASoC: da7219: Disable regulators on probe() failure

If codec probe() function fails after supplies have been enabled
it should really tidy up and disable them again. This patch updates
the probe function to do just that.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7219: Fix Sidetone to work regardless of DAI capture
Adam Thomson [Tue, 22 Dec 2015 18:27:52 +0000 (18:27 +0000)]
ASoC: da7219: Fix Sidetone to work regardless of DAI capture

Previously Sidetone would operate only when capture to DAI was in
progress, due to DAPM path configuration. There is no reason why
this should not operate without DAI capture, so this patch updates
the DAPM path accordingly.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: fsl-asoc-card: use different route map for AC'97 mode
Maciej S. Szmigiero [Sun, 20 Dec 2015 20:34:29 +0000 (21:34 +0100)]
ASoC: fsl-asoc-card: use different route map for AC'97 mode

fsl_ssi uses different stream names ("AC97 Playback" / "AC97 Capture")
in AC'97 mode so in this case fsl-asoc-card route map should
also be using them.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: fsl_asrc: add support for 8-30kHz output sample rate
Zidan Wang [Fri, 18 Dec 2015 09:00:09 +0000 (17:00 +0800)]
ASoC: fsl_asrc: add support for 8-30kHz output sample rate

Add 8kHz, 11.025kHz, 16kHz, 22.05kHz output sample rate support.

According referance menual, "Limited support for the case when
output sampling rates is between 8kHz and 30kHz. The limitation
is the supported ratio (Fsin/Fsout) range as between 1/24 to 8."

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: atmel_wm8904: add snd_soc_pm_ops
Songjun Wu [Tue, 22 Dec 2015 06:06:42 +0000 (14:06 +0800)]
ASoC: atmel_wm8904: add snd_soc_pm_ops

Sometimes the audio play can not be resumed after it is
suspended. Add snd_soc_pm_ops to execute power management
operations, then this issue is fixed.

Signed-off-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5616: rename some alsa control names
Bard Liao [Mon, 21 Dec 2015 02:09:53 +0000 (10:09 +0800)]
ASoC: rt5616: rename some alsa control names

Rename some alsa control name as what they should be.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: add NULL test
Julia Lawall [Sun, 20 Dec 2015 11:15:53 +0000 (12:15 +0100)]
ASoC: Intel: add NULL test

Add NULL test on call to devm_kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
identifier fld;
@@

* x = devm_kzalloc(...);
  ... when != x == NULL
  x->fld
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: omap-hdmi-audio: add NULL test
Julia Lawall [Sun, 20 Dec 2015 11:15:51 +0000 (12:15 +0100)]
ASoC: omap-hdmi-audio: add NULL test

Add NULL test on call to devm_kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
identifier fld;
@@

* x = devm_kzalloc(...);
  ... when != x == NULL
  x->fld
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: imx-pcm-dma: add NULL test
Julia Lawall [Sun, 20 Dec 2015 11:15:50 +0000 (12:15 +0100)]
ASoC: imx-pcm-dma: add NULL test

Add NULL test on call to devm_kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
@@

* x = devm_kzalloc(...);
  ... when != x == NULL
  *x
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()
Markus Elfring [Sun, 20 Dec 2015 09:34:25 +0000 (10:34 +0100)]
ASoC: ssm2518: Use a signed return type for ssm2518_lookup_mcs()

The return type "unsigned int" was used by the ssm2518_lookup_mcs()
function even though it will eventually return a negative error code.
Improve this implementation detail by deletion of the type modifier then.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rsnd: add Multi channel support
Kuninori Morimoto [Thu, 17 Dec 2015 03:00:10 +0000 (03:00 +0000)]
ASoC: rsnd: add Multi channel support

This patch adds Multi channel support on Renesas R-Car sound.
This patch is tested on Salvator-X board, but it can't use
Multi channel, because supported format is different between
codec chip and R-Car.
Thus, it was tested on board which doesn't mount codec chip,
with oscilloscope.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7218: Enable mic level detection reporting to user-space
Adam Thomson [Thu, 3 Dec 2015 17:10:07 +0000 (17:10 +0000)]
ASoC: da7218: Enable mic level detection reporting to user-space

This patch adds support to the codec driver to handle mic level
detect related IRQs, and report these to user-space using a uevent
variable.

The uevent variable string "EVENT=MIC_LEVEL_DETECT" is sent to
user-space, if the mic level detect feature is enabled, and the
audio captured at the chosen mic(s) is above a certain threshold.
User-space can then handle the event accordingly (e.g. process
audio capture stream).

This method was chosen over ALSA control notification for a couple
of reasons:

 1) There's no requirement here for a control to read state from.
    The event is the only thing that's required and of interest.
 2) tinyalsa support for control notifications does not exist so on
    platforms using this over alsa-lib there is a need to add code
    to support this event handling.

Another possible option would be to use the standard Jack reporting
framework but this really does not fit for this kind of event.

Finally, use of the input device framework is not being encouraged,
due to difficulties in enabling apps to access input devices, so
this has also been avoided.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sun4i-codec: Use proper output for external amp routes
Hans de Goede [Tue, 22 Dec 2015 22:00:17 +0000 (23:00 +0100)]
ASoC: sun4i-codec: Use proper output for external amp routes

An external amp (if any) is connected to the external outputs of the SoC
of course, rather then directly to the internal amp.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5616: add devicetree document for rt5616
Caesar Wang [Tue, 22 Dec 2015 05:45:03 +0000 (13:45 +0800)]
ASoC: rt5616: add devicetree document for rt5616

Add the description for rt5616 codec.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5616: add an of_match table
Caesar Wang [Tue, 22 Dec 2015 05:45:02 +0000 (13:45 +0800)]
ASoC: rt5616: add an of_match table

Add a device tree match table. This serves to make the driver's support
of device tree more explicit.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: mediatek: Turn AFE on/off in runtime resume/suspend
Koro Chen [Tue, 22 Dec 2015 03:11:34 +0000 (11:11 +0800)]
ASoC: mediatek: Turn AFE on/off in runtime resume/suspend

AFE is actually allowed to be turn on before configuration of DAIs
since each DAI has its own enabling control. Turn on/off AFE in
runtime resume/suspend to avoid AFE being shut down when closing a DAI
while other DAIs are still active.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5616: Return error if device ID mismatch
Axel Lin [Tue, 22 Dec 2015 02:16:35 +0000 (10:16 +0800)]
ASoC: rt5616: Return error if device ID mismatch

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoALSA: oxfw: add stream format quirk for SCS.1 models
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:46 +0000 (09:15 +0900)]
ALSA: oxfw: add stream format quirk for SCS.1 models

As long as I investigate SCS.1m, this model reports to transfer/receive
PCM data channels/MIDI conformant data channels in tx/rx AMDTP packet.
There's a contradiction that this model actually has no analog/digital
capture port for PCM frames and no physical MIDI ports.

I guess that SCS.1d also has the contradiction. This model has no
analog/digital ports for PCM frames and no physical MIDI ports, thus it
requires no streaming functionality.

This commit adds some modification codes to handle the contradiction,
as much as possible. Unfortunately, this module adds one PCM playback
substream for SCS.1d so as SCS.1m.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: obsolete scs1x module
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:45 +0000 (09:15 +0900)]
ALSA: oxfw: obsolete scs1x module

Now ALSA oxfw driver gains functionalities which scs1x module has.

This commit obsoletes the scs1x module, and adds a line of MODULE_ALIAS
to load oxfw module instead of scs1x module.

In scs1x module, the name of 'shortname' field is fixed as 'SCS1x'. This
field is used to name MIDI ports for both of SCS.1m and SCS.1d. This is
not good because typically some SCS.1m and SCS.1d are used in the same
system. It's better to distinguish them according to name of the ports.
This commit applies model name in config ROM to the 'shortname'.

For the name of 'driver' and 'longname', this commit uses the same way
applied to the other models. This change may not bring disadvantages to
users because userspace applications use ALSA rawmidi or seq interface
and these interfaces are not influenced by them directly.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: add MIDI playback port for SCS.1 models
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:44 +0000 (09:15 +0900)]
ALSA: oxfw: add MIDI playback port for SCS.1 models

This commit adds MIDI playback ports so that scs1x driver has.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: copy handlers of asynchronous transaction for MIDI playback
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:43 +0000 (09:15 +0900)]
ALSA: oxfw: copy handlers of asynchronous transaction for MIDI playback

This commit copies some functions of asynchronous transactions for MIDI
playback, to merge scs1x module. The features of payload in asynchronous
transaction are the same as captured MIDI messages.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: add MIDI capture port for SCS.1 models
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:42 +0000 (09:15 +0900)]
ALSA: oxfw: add MIDI capture port for SCS.1 models

This commit adds MIDI capture so that scs1x driver has.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: copy handlers of asynchronous transaction for MIDI capture
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:41 +0000 (09:15 +0900)]
ALSA: oxfw: copy handlers of asynchronous transaction for MIDI capture

This commit copies some functions of asynchronous transactions for MIDI
capture, to merge scs1x module. The features of payload in asynchronous
transaction are:

 * System exclusive messages for SCS.1 are encoded without ID data. In
   this encoding scheme, 4 bits in LSB are available. The bits are squashed
   in payload byte. Thus, one payload byte transfers two MIDI messages.
 * The first byte of payload byte means:
  * 0x00: depending on second payload byte
   * 0xf9: including escaped system exclusive messages for SCS.1, up to
     3 byte (= 6 MIDI messages)
   * the others: including MIDI 1.0 messages
  * the others: including escaped system exclusive messages for SCS.1, up
    to 64 bytes

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: allocate own address region for SCS.1 series
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:40 +0000 (09:15 +0900)]
ALSA: oxfw: allocate own address region for SCS.1 series

When physical controls on SCS.1 models are operated, the models transfer
MIDI messages in asynchronous transactions on IEEE 1394 bus. The models
have a register to have an address for the transactions, and drivers
can register own address for this purpose.

This commit keeps a region of address, registers it and adds a handler for
the transactions.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: add scs1x layer
Takashi Sakamoto [Tue, 22 Dec 2015 00:15:39 +0000 (09:15 +0900)]
ALSA: oxfw: add scs1x layer

Stanton Controllers and Systems 1 (SCS.1) series is supported by ALSA
scs1x driver. This driver just supports MIDI functionality. On the other
hand, models in this series are based on OXFW971 and ALSA OXFW driver can
support them.

SCS.1 series has MIDI functionality to control its surface state such as
LED lighting. When operating physical knobs and faders, the models
generate MIDI messages. These MIDI messages are transferred by asynchronous
transactions. These transactions are really model-specific and ALSA OXFW
driver requires the functionality so as scs1x module implements.

This commit adds scs1x layer as a preparation to merge scs1x driver to
oxfw driver.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: rename a structure so that it means backward compatibility to old drivers
Takashi Sakamoto [Wed, 16 Dec 2015 11:37:57 +0000 (20:37 +0900)]
ALSA: oxfw: rename a structure so that it means backward compatibility to old drivers

In former commits, some model-specific members are split from the
structure. The structure is just to keep names for compatibility to old
drivers.

This commit arranges name of the structure and localize it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: move model-specific parameters from common structure
Takashi Sakamoto [Wed, 16 Dec 2015 11:37:56 +0000 (20:37 +0900)]
ALSA: oxfw: move model-specific parameters from common structure

In previous commit, some members are moved from 'struct snd_oxfw' because
they're model-specific. There are also the other model-specific parameters
in 'struct device_info'.

This commit moves these members to model-specific structure.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: move model-specific members from common structure
Takashi Sakamoto [Wed, 16 Dec 2015 11:37:55 +0000 (20:37 +0900)]
ALSA: oxfw: move model-specific members from common structure

Currently, 'struct snd_oxfw' has some members for models supported by old
firewire-speakers driver, while these members are useless to the other
models.

This commit allocates new memory block and moves these members to
model-specific structure.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oxfw: enable to keep memory block for model-specific structure
Takashi Sakamoto [Wed, 16 Dec 2015 11:37:54 +0000 (20:37 +0900)]
ALSA: oxfw: enable to keep memory block for model-specific structure

ALSA oxfw driver should have backward compatibility to old
firewire-speakers driver. Additionally, in future commit, scs1x driver
will be merged. It's nice to add a pointer to have a memory block for
model-specific structures.

This commit adds a member to 'struct snd_oxfw' for this aim. Deallocation
is done at freeing ALSA card structure.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: use list_for_each_entry_continue_reverse
Geliang Tang [Mon, 21 Dec 2015 15:55:39 +0000 (23:55 +0800)]
ALSA: usb-audio: use list_for_each_entry_continue_reverse

For better readability, use list_for_each_entry_continue_reverse()
in have_dup_chmap().

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)
Mario Kleiner [Mon, 21 Dec 2015 23:45:43 +0000 (00:45 +0100)]
ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)

Without this patch, internal speaker and line-out work,
but front headphone output jack stays silent on the
Mac Pro 4,1.

This code path also gets executed on the MacPro 5,1 due
to identical codec SSID, but i don't know if it has any
positive or adverse effects there or not.

(v2) Implement feedback from Takashi Iwai: Reuse
     alc889_fixup_mbp_vref and just add a new nid
     0x19 for the MacPro 4,1.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: restore TEA575x state on resume
Andy Shevchenko [Mon, 21 Dec 2015 17:09:56 +0000 (19:09 +0200)]
ALSA: fm801: restore TEA575x state on resume

The suspend / resume cycle resets the settings of the FM tuner. Restore
frequency settings on resume.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: save context before suspend devices
Andy Shevchenko [Mon, 21 Dec 2015 17:09:55 +0000 (19:09 +0200)]
ALSA: fm801: save context before suspend devices

In symmetry we save context first before suspend and restore it last after
resume.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: no need to suspend absent codec
Andy Shevchenko [Mon, 21 Dec 2015 17:09:54 +0000 (19:09 +0200)]
ALSA: fm801: no need to suspend absent codec

In case of tuner only card there is no need to take care of the codec which is
anyway absent.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: detect FM-only card earlier
Andy Shevchenko [Mon, 21 Dec 2015 17:09:53 +0000 (19:09 +0200)]
ALSA: fm801: detect FM-only card earlier

If user does not supply tea575x_tuner parameter the driver tries to detect the
tuner type. The failed codec initialization is considered as FM-only card
present, however the driver still registers an IRQ handler for it.

Move codec detection earlier to set tea575x_tuner parameter before check.

Here the following functions are introduced
 reset_coded()                       resets AC97 codec
 snd_fm801_chip_multichannel_init()  initializes cards with multichannel support

Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: propagate TUNER_ONLY bit when autodetected
Andy Shevchenko [Mon, 21 Dec 2015 17:09:52 +0000 (19:09 +0200)]
ALSA: fm801: propagate TUNER_ONLY bit when autodetected

The commit d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection)
brings autodetection to the driver. However the autodetection algorithm misses
the TUNER_ONLY bit if it is supplied by the user.

Thus, user gets weird messages and no card registered.

 snd_fm801 0000:0d:01.0: detected TEA575x radio type SF64-PCR
 snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
 snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
...
 snd_fm801 0000:0d:01.0: AC'97 0 does not respond - RESET
 snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
 snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
 snd_fm801 0000:0d:01.0: AC'97 0 access is not valid [0x0], removing mixer.
 snd_fm801: probe of 0000:0d:01.0 failed with error -5

Do a copy of TUNER_ONLY bit to be applied after autodetection is done.

Fixes: d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'topic/hdmi-jack' into for-next
Takashi Iwai [Mon, 21 Dec 2015 10:46:30 +0000 (11:46 +0100)]
Merge branch 'topic/hdmi-jack' into for-next

9 years agoLinux 4.4-rc6
Linus Torvalds [Mon, 21 Dec 2015 00:06:09 +0000 (16:06 -0800)]
Linux 4.4-rc6

9 years agoALSA: fm801: store struct device instead of pci_dev
Andy Shevchenko [Fri, 18 Dec 2015 19:14:13 +0000 (21:14 +0200)]
ALSA: fm801: store struct device instead of pci_dev

There is no need to store struct pci_dev in struct fm801. Generic struct device
can be easily translated to struct pci_dev whenever it's needed, in particular
for one user for now.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: put curly braces around empty if-body
Andy Shevchenko [Fri, 18 Dec 2015 19:14:12 +0000 (21:14 +0200)]
ALSA: fm801: put curly braces around empty if-body

The compiler complains on unused condition as follows

sound/pci/fm801.c: In function ‘snd_fm801_interrupt’:
sound/pci/fm801.c:585:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Put the curly braces around empty body as suggested.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: convert rest outw() / inw() to use helpers
Andy Shevchenko [Fri, 18 Dec 2015 19:14:11 +0000 (21:14 +0200)]
ALSA: fm801: convert rest outw() / inw() to use helpers

The patch introduces two new helpers fm801_iowrite16() and fm801_ioread16() to
write and read the registers by offset. Previously similar was done to access
the hardware registers by their names.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: fm801: explicitly free IRQ line
Andy Shevchenko [Fri, 18 Dec 2015 19:14:10 +0000 (21:14 +0200)]
ALSA: fm801: explicitly free IRQ line

Otherwise we will have a warning on ->remove() since device is a PCI one.

WARNING: CPU: 4 PID: 1411 at /home/andy/prj/linux/fs/proc/generic.c:575 remove_proc_entry+0x137/0x160()
remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'snd_fm801'

Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: oss: consolidate kmalloc/memset 0 call to kzalloc
Nicholas Mc Guire [Sat, 19 Dec 2015 14:23:13 +0000 (15:23 +0100)]
ALSA: oss: consolidate kmalloc/memset 0 call to kzalloc

This is an API consolidation only. The use of kmalloc + memset to 0
is equivalent to kzalloc.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'rtc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Linus Torvalds [Sun, 20 Dec 2015 18:01:11 +0000 (10:01 -0800)]
Merge tag 'rtc-4.4-3' of git://git./linux/kernel/git/abelloni/linux

Pull RTC fixes from Alexandre Belloni:
 "Late fixes for the RTC subsystem for 4.4:

  A fix for a nasty hardware bug in rk808 and an initialization
  reordering in da9063 to fix a possible crash"

* tag 'rtc-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: da9063: fix access ordering error during RTC interrupt at system power on
  rtc: rk808: Compensate for Rockchip calendar deviation on November 31st

9 years agortc: da9063: fix access ordering error during RTC interrupt at system power on
Steve Twiss [Tue, 8 Dec 2015 16:28:39 +0000 (16:28 +0000)]
rtc: da9063: fix access ordering error during RTC interrupt at system power on

This fix alters the ordering of the IRQ and device registrations in the RTC
driver probe function. This change will apply to the RTC driver that supports
both DA9063 and DA9062 PMICs.

A problem could occur with the existing RTC driver if:

A system is started from a cold boot using the PMIC RTC IRQ to initiate a
power on operation. For instance, if an RTC alarm is used to start a
platform from power off.
The existing driver IRQ is requested before the device has been properly
registered.
i.e.
    ret = devm_request_threaded_irq()
comes before
    rtc->rtc_dev = devm_rtc_device_register();

In this case, the interrupt can be called before the device has been
registered and the handler can be called immediately. The IRQ handler
da9063_alarm_event() contains the function call

    rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);

which in turn tries to access the unavailable rtc->rtc_dev.

The fix is to reorder the functions inside the RTC probe. The IRQ is
requested after the RTC device resource has been registered so that
get_irq_byname is the last thing to happen.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
9 years agortc: rk808: Compensate for Rockchip calendar deviation on November 31st
Julius Werner [Tue, 15 Dec 2015 23:02:49 +0000 (15:02 -0800)]
rtc: rk808: Compensate for Rockchip calendar deviation on November 31st

In A.D. 1582 Pope Gregory XIII found that the existing Julian calendar
insufficiently represented reality, and changed the rules about
calculating leap years to account for this. Similarly, in A.D. 2013
Rockchip hardware engineers found that the new Gregorian calendar still
contained flaws, and that the month of November should be counted up to
31 days instead. Unfortunately it takes a long time for calendar changes
to gain widespread adoption, and just like more than 300 years went by
before the last Protestant nation implemented Greg's proposal, we will
have to wait a while until all religions and operating system kernels
acknowledge the inherent advantages of the Rockchip system. Until then
we need to translate dates read from (and written to) Rockchip hardware
back to the Gregorian format.

This patch works by defining Jan 1st, 2016 as the arbitrary anchor date
on which Rockchip and Gregorian calendars are in sync. From that we can
translate arbitrary later dates back and forth by counting the number
of November/December transitons since the anchor date to determine the
offset between the calendars. We choose this method (rather than trying
to regularly "correct" the date stored in hardware) since it's the only
way to ensure perfect time-keeping even if the system may be shut down
for an unknown number of years. The drawback is that other software
reading the same hardware (e.g. mainboard firmware) must use the same
translation convention (including the same anchor date) to be able to
read and write correct timestamps from/to the RTC.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
9 years agoMerge tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 20 Dec 2015 01:44:19 +0000 (17:44 -0800)]
Merge tag 'tty-4.4-rc6' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some tty/serial driver fixes for 4.4-rc6 that resolve some
  reported problems.  All of these have been in linux-next.  The details
  are in the shortlog"

* tag 'tty-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: Fix GPF in flush_to_ldisc()
  serial: earlycon: Add missing spinlock initialization
  serial: sh-sci: Fix length of scatterlist
  n_tty: Fix poll() after buffer-limited eof push read
  serial: 8250_uniphier: fix dl_read and dl_write functions

9 years agoMerge tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 20 Dec 2015 01:33:58 +0000 (17:33 -0800)]
Merge tag 'usb-4.4-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB and PHY fixes for 4.4-rc6.  All of them resolve some
  reported problems.  Full details in the shortlog"

* tag 'usb-4.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: fix invalid memory access in hub_activate()
  USB: ipaq.c: fix a timeout loop
  phy: core: Get a refcount to phy in devm_of_phy_get_by_index()
  phy: cygnus: pcie: add missing of_node_put
  phy: miphy365x: add missing of_node_put
  phy: miphy28lp: add missing of_node_put
  phy: rockchip-usb: add missing of_node_put
  phy: berlin-sata: add missing of_node_put
  phy: mt65xx-usb3: add missing of_node_put
  phy: brcmstb-sata: add missing of_node_put
  phy: sun9i-usb: add USB dependency

9 years agoMerge tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md
Linus Torvalds [Sun, 20 Dec 2015 00:46:46 +0000 (16:46 -0800)]
Merge tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Four fixes for md:

   - two recently introduced regressions fixed.
   - one older bug in RAID10 - tagged for -stable since 4.2
   - one minor sysfs api improvement"

* tag 'md/4.4-rc5-fixes' of git://neil.brown.name/md:
  Fix remove_and_add_spares removes drive added as spare in slot_store
  md: fix bug due to nested suspend
  MD: change journal disk role to disk 0
  md/raid10: fix data corruption and crash during resync

9 years agoMerge tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 20 Dec 2015 00:40:48 +0000 (16:40 -0800)]
Merge tag 'powerpc-4.4-5' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 - Partial revert of "powerpc: Individual System V IPC system calls"
 - pr_warn_once on unsupported OPAL_MSG type from Stewart
 - Fix deadlock in opal-irqchip introduced by "Fix double endian
   conversion" from Alistair

* tag 'powerpc-4.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion"
  powerpc/powernv: pr_warn_once on unsupported OPAL_MSG type
  Partial revert of "powerpc: Individual System V IPC system calls"

9 years agoMerge tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Sat, 19 Dec 2015 18:10:43 +0000 (10:10 -0800)]
Merge tag 'spi-fix-v4.4-rc5' of git://git./linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A couple of reference counting bugs here, one in spidev and one with
  holding an extra reference in the core that we never freed if we
  removed a device, plus a driver specific fix.  Both of the refcounting
  bugs are very old but they've only been found by observation so
  hopefully their impact has been low"

* tag 'spi-fix-v4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: fix parent-device reference leak
  spi: spidev: Hold spi_lock over all defererences of spi in release()
  spi-fsl-dspi: Fix CTAR Register access

9 years agoMerge tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
Linus Torvalds [Sat, 19 Dec 2015 18:05:00 +0000 (10:05 -0800)]
Merge tag 'gpio-v4.4-3' of git://git./linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Some GPIO fixes for the v4.4 series.  Most prominent: I revert the
  error propagation from the .get() function until we can fix up all the
  drivers properly for v4.5.

   - Revert the error number propagation from the .get() vtable entry
     temporarily, until we make the proper fixes to all drivers.
   - Fix the clamping behaviour in the generic GPIO driver.
   - Driver fix for the ath79 driver"

* tag 'gpio-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: revert get() to non-errorprogating behaviour
  gpio: generic: clamp values from bgpio_get_set()
  gpio: ath79: Fix the logic to clear offset bit of AR71XX_GPIO_REG_OE register

9 years agoMerge tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sat, 19 Dec 2015 18:01:03 +0000 (10:01 -0800)]
Merge tag 'pinctrl-v4.4-3' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 - Driver fixes for Freescale i.MX7D, Intel, Broadcom 2835
 - One MAINTAINERS entry

* tag 'pinctrl-v4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  MAINTAINERS: pinctrl: Add maintainers for pinctrl-single
  pinctrl: bcm2835: Fix initial value for direction_output
  pinctrl: intel: fix offset calculation issue of register PAD_OWN
  pinctrl: intel: fix bug of register offset calculation
  pinctrl: freescale: add ZERO_OFFSET_VALID flag for vf610 pinctrl

9 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 19 Dec 2015 17:52:44 +0000 (09:52 -0800)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "A set of 'usual' driver bugfixes for the I2C subsystem"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: rcar: disable runtime PM correctly in slave mode
  i2c: designware: Keep pm_runtime_enable/_disable calls in sync
  i2c: designware: fix IO timeout issue for AMD controller
  i2c: imx: init bus recovery info before adding i2c adapter
  i2c: do not use 0x in front of %pa
  i2c: davinci: Increase module clock frequency
  i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs
  i2c: rk3x: populate correct variable for sda_falling_time

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 19 Dec 2015 17:51:11 +0000 (09:51 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "Just a few assorted driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: elants_i2c - fix wake-on-touch
  Input: elan_i2c - set input device's vendor and product IDs
  Input: sun4i-lradc-keys - fix typo in binding documentation
  Input: atmel_mxt_ts - add maxtouch to I2C table for module autoload
  Input: arizona-haptic - fix disabling of haptics device
  Input: aiptek - fix crash on detecting device without endpoints
  Input: atmel_mxt_ts - add generic platform data for Chromebooks
  Input: parkbd - clear unused function pointers
  Input: walkera0701 - clear unused function pointers
  Input: turbografx - clear unused function pointers
  Input: gamecon - clear unused function pointers
  Input: db9 - clear unused function pointers

9 years agoASoC: rt5616: add rt5616 codec driver
Bard Liao [Tue, 15 Dec 2015 06:57:41 +0000 (14:57 +0800)]
ASoC: rt5616: add rt5616 codec driver

This is the initial codec driver for rt5616.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Atom: flip logic for gain Switch
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:48 +0000 (20:35 -0600)]
ASoC: Intel: Atom: flip logic for gain Switch

The upstreamed code modified the control names from Mute to
Switch without changing the logic. To get audio working the Switch
needs to be off which isn't aligned with normal ALSA conventions.

Inverting the logic now so that Switch Off means mute and Switch On
means active audio using the specific volume setting.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Intel: Atom: clean-up compressed DAI definition
Pierre-Louis Bossart [Fri, 18 Dec 2015 02:35:47 +0000 (20:35 -0600)]
ASoC: Intel: Atom: clean-up compressed DAI definition

the fields channels_min, channels_max, rate and formats are
irrelevant for compressed playback, they will depend on the
content. This was probably a copy-paste mistake to have
them in the first place

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>