Commit graph

21231 commits

Author SHA1 Message Date
Lu, Han
9449d39b99 ASoC: Intel: add function to load firmware image
Add a general method to load firmware image, and apply to base firmware
image loading. With the method, the driver will support loading multiple
different modules in order to support different features.

Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-11 12:53:44 +00:00
Mark Brown
357635ae01 Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2015-03-11 12:53:41 +00:00
Mark Brown
11dd60447e Linux 4.0-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU/NacAAoJEHm+PkMAQRiGdUcIAJU5dHclwd9HRc7LX5iOwYN6
 mN0aCsYjMD8Pjx2VcPCgJvkIoESQO5pkwYpFFWCwILup1bVEidqXfr8EPOdThzdh
 kcaT0FwUvd19K+0jcKVNCX1RjKBtlUfUKONk6sS2x4RrYZpv0Ur8Gh+yXV8iMWtf
 fAusNEYlxQJvEz5+NSKw86EZTr4VVcykKLNvj+/t/JrXEuue7IG8EyoAO/nLmNd2
 V/TUKKttqpE6aUVBiBDmcMQl2SUVAfp5e+KJAHmizdDpSE80nU59UC1uyV8VCYdM
 qwHXgttLhhKr8jBPOkvUxl4aSXW7S0QWO8TrMpNdEOeB3ZB8AKsiIuhe1JrK0ro=
 =Xkue
 -----END PGP SIGNATURE-----

Merge tag 'v4.0-rc3' into asoc-intel

Linux 4.0-rc3
2015-03-11 12:53:25 +00:00
Jin Yao
8d0c38a3f2 ASoC: Intel: move sysclk source setting to platform_clock_control for balance.
A playback noise happens after suspend/resume on Braswell. The issue is due to
the codec PLL and codec ASRC are not enabled correctly due to the incorrect
sysclk setting after resume. This patch resets the sysclk source setting in
platform clock control widget handler.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-10 20:40:51 +00:00
Lu, Han
3fe0607a04 ASoC: Intel: remove conflicts when load/unload multiple firmware images
Details:
  1. Unload all modules on fw_list of dsp when suspend, and reload all
modules on fw_list when resume.
  2. A DSP expects only one scratch, but hsw_parse_fw_image() allocates
scratch blocks for each firmware image it parses. Move the allocate function
sst_block_alloc_scratch() out of hsw_parse_fw_image() to make sure a scratch
be allocated only after all firmware images be parsed.

Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-06 21:08:12 +00:00
Jie Yang
1a5ab21c2e ASoC: Intel: Add suspend_pre and resume_post for Broadwell snd_soc_card
For broadwell machine, we need do some machine related setting before
suspend and after resume, e.g. disable/enable jack detection, here
adding snd_soc_card suspend_pre and resume_post for this task.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-06 20:17:40 +00:00
Takashi Iwai
4fda87df09 ASoC: Fixes for v4.0
A few driver specific fixes here, none of them earth shattering in
 themselves, that have accumliated since the opening of the merge window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU96stAAoJECTWi3JdVIfQLfUH/jBYQqxrPp8qm7Lt9LOuwC4U
 SOi0ERIVhLSKZMo7G4wHmbEapx2FBgH+wxqh9kNLaISvOIH4odFS4Fr1XYE70cY9
 97M46uzLqdaKCDgvkXdx1NLA0zubEGWLOtdVYlrMAzin0FXNH+KYhxkRQbJ6f0LE
 yKmNemnHHtJ4gDl/kMED7bc+mkYSOpwUE/8HLOEA8bcE3luDnj7rvQwOhPIYq0Tz
 Ij4GM8HSfWPp/k3YmZVcF8GA6icN3LG5Jg7DOu6S19fMYimTDaHQDCw0AoLfiIOQ
 DykyHg7ay/I3B6zUz4JikLIW5KjFxZfeQ818YE0GQ4PgePfb0GSIFt0LnNmq4Oo=
 =GIb7
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.0

A few driver specific fixes here, none of them earth shattering in
themselves, that have accumliated since the opening of the merge window.
2015-03-06 14:24:21 +01:00
Hui Wang
70658b9949 ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk
Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1428947
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 13:04:58 +01:00
Dan Carpenter
d124380674 ALSA: opl3: small array underflow
There is a missing lower bound check on "pitchbend" so it means we can
read up to 6 elements before the start of the opl3_note_table[] array.

Thanks to Clemens Ladisch for his help with this patch.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-06 13:04:42 +01:00
Takashi Iwai
f44f07cf39 ALSA: line6: Clamp values correctly
The usages of clamp() macro in sound/usb/line6/playback.c are just
wrong, the low and high values are swapped.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-05 13:03:28 +01:00
Dan Carpenter
096a020a9e ALSA: msnd: add some missing curly braces
There were some curly braces intended here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-05 13:02:10 +01:00
Mark Brown
3b8f4a70b8 Merge remote-tracking branch 'asoc/fix/sta32x' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
2824ef9b81 Merge remote-tracking branch 'asoc/fix/simple' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
95d67c7fc2 Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown
c6eb1fa4a7 Merge remote-tracking branch 'asoc/fix/rt5677' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown
159c6fc0bb Merge remote-tracking branch 'asoc/fix/rt5670' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown
e0427428db Merge remote-tracking branch 'asoc/fix/rsnd' into asoc-linus 2015-03-04 20:42:41 +00:00
Mark Brown
a9ca2a3cf4 Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown
465de977ee Merge remote-tracking branch 'asoc/fix/max98357a' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown
09269e4eef Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2015-03-04 20:42:39 +00:00
Mark Brown
9d22fd3ca7 Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linus 2015-03-04 20:42:38 +00:00
Mark Brown
ed87e2974e Merge remote-tracking branch 'asoc/fix/cirrus' into asoc-linus 2015-03-04 20:42:37 +00:00
Mark Brown
64a071331a Merge remote-tracking branch 'asoc/fix/atmel-build' into asoc-linus 2015-03-04 20:42:37 +00:00
Peter Ujfalusi
d51199a83a ASoC: omap-pcm: Correct dma mask
DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be
set to 32.
The 64 was introduced by commit (in 2009):
a152ff24b9 ASoC: OMAP: Make DMA 64 aligned

But the dma_mask and coherent_dma_mask can not be used to specify alignment.

Fixes: a152ff24b9 (ASoC: OMAP: Make DMA 64 aligned)
Reported-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-03-04 17:23:31 +00:00
Vishal Thanki
31f3032c1a ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of
Make sure devm_kzalloc() succeeds.

Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-03 14:25:16 +00:00
Alexandre Belloni
d7a6fe015b ASoC: sam9g20_wm8731: drop machine_is_xxx
Atmel based boards can now only be used with device tree. Drop non DT
initialization.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:26 +00:00
Takashi Sakamoto
8cdebf7109 ALSA: dice: fix wrong offsets for Dice interface
For received packet stream, the offset of 'RX_SEQ_START' locates after
the offset of 'RX_NUMBER_MIDI', although current macro and proc output
includes wrong offsets.

Fortunately, this bug doesn't affect streaming functionality because
these macro is not used.

This commit fixes these wrong macro and outputs.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-01 10:49:06 +01:00
Takashi Sakamoto
f2b14c0bc5 ALSA: oxfw: fix a condition and return code in start_stream()
The amdtp_stream_wait_callback() doesn't return minus value and
the return code is not for error code.

This commit fixes with a propper condition and an error code.

Fixes: f3699e2c77 ('ALSA: oxfw: Change the way to start stream')
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-27 14:42:18 +01:00
Thomas Niederprüm
8af4baa708 ASoC: OMAP: mcbsp: Fix CLKX and CLKR pinmux when used as inputs
This patch fixes faulty behaviour in a setup where the input clock for the
SRG is fed through the CLKR/CLKX pin but the McBSP is configured to be
master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR/CLKX must
not be configured as output pin. Otherwise the input clock is messed up
horribly.

This patch makes it possible to use the CLKR/CLKX pin rather than CLKS to
inject a reference clock in setups where McBSP is master and not both
rx and tx are used. However for this to work it has to be ensured that
set_dai_sysclk() is called after set_dai_fmt().

This was tested on a beagleboard-xm using McBSP1 to drive a i2s DAC through
the tx lines (CLKX,FSX,DX). Using this patch the CLKR pin is used to inject
an external reference clock.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 11:48:49 +09:00
Oder Chiou
70068776c4 ASoC: rt5677: Correct the routing paths of that after IF1/2 DACx Mux
The patch corrects the routing paths of that after IF1/2 DACx Mux

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 11:06:51 +09:00
Vinod Koul
5bb400ce4a ASoC: Intel: wrap runtime_pm usage count under CONFIG_PM
The struct dev_pm_ops defines usage_count only when CONFIG_PM is defined. So
we should use this variable only in cases where this falg is true.
So we define a local variable and read the value under this flag. In non PM
cases, we set this to 1.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 10:59:37 +09:00
Takashi Iwai
de5d0ad506 ALSA: hda - Disable runtime PM for Panther Point again
This is essentially a partial revert of the commit [b1920c2110:
'ALSA: hda - Enable runtime PM on Panther Point'].  There was a bug
report showing the HD-audio bus hang during runtime PM on HP Spectre
XT.

Reported-by: Dang Sananikone <dang.sananikone@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-25 07:53:31 +01:00
Jaroslav Kysela
37ed398839 ALSA: hda: controller code - do not export static functions
It is a bad idea to export static functions. GCC for some platforms
shows errors like:

  error: __ksymtab_azx_get_response causes a section type conflict

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-24 14:14:55 +01:00
Thomas Niederprüm
148388f375 ASoC: sta32x: fix register range in regmap.
The STA32X_AUTO3 is a writable register that currently does not appear
in the regmap ranges(neither read nor write). By adding this register
to the register ranges there is no gap anymore and the existing
register ranges can be joined. This fixes a regression introduced in
commit a1be4cead9 where the driver was
moved to direct regmap usage and the STA32X_AUTO3 register was missed.
That made it impossible to choose the preset EQ mode set through the
STA32X_AUTO3 register.

Fixes: a1be4cead9 (ASoC: sta32x: Convert to direct regmap API usage)
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:45:31 +09:00
Bard Liao
850529249d ASoC: rt5670: Set RT5670_IRQ_CTRL1 non volatile
RT5670_IRQ_CTRL1(0xbd) is a non volatile register. And we need to
restore its value after suspend/resume.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-24 17:22:39 +09:00
Subhransu S. Prusty
3f2dcbeaeb ASoC: Intel: Remove soc pm handling to allow platform driver handle it
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:00:36 +09:00
Subhransu S. Prusty
583e58a0f0 ASoC: Intel: Remove ignore suspend support
In our platform we want platform and codec driver routines to get invoked
and don't need the machine routines so remove here

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:00:35 +09:00
Vinod Koul
9308d1456e ASoC: Intel: Move the fw download to power_control
Thus removing the runtime_resume handler.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:00:35 +09:00
Vinod Koul
4a8448d428 ASoC: Intel: add pm support in sst ipc driver
This adds support for system pm support. We need to save the dsp memory
which gets lost on suspend and restore that on resume

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:00:34 +09:00
Takashi Iwai
70372a7566 ALSA: pcm: Don't leave PREPARED state after draining
When a PCM draining is performed to an empty stream that has been
already in PREPARED state, the current code just ignores and leaves as
it is, although the drain is supposed to set all such streams to SETUP
state.  This patch covers that overlooked case.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-23 16:48:18 +01:00
Subhransu S. Prusty
5c88b4e91d ASoC: Intel: Add memcpy32_fromio as well
Export 32-bit version of memcpy for use in suspend/resume.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
54e6beccc6 ASoC: Intel: add support for platform suspend
This adds support for platform suspend and resume. We ensure all pcms are
suspended by invoking snd_soc_suspend() and then stop the DSP

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
fc9406ab9b ASoC: Intel: add support for pcm stream suspend/resume
The driver didn't implement support for pcm stream suspend and resume, so
add it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
e0b87d476b ASoC: Intel: add support for pause and resume in sst
This adds missing pcm pause and resume ops in the driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
7b9ca9d7e5 ASoC: Intel: update MMX ID to 3
The updated firmware expects the MMX ID to be used as 3, so update the
driver as well

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
76ca1c2cd8 ASoC: Intel: mark cht machine driver with nonatomic trigger
The DSP messages are sent with nonatomic context, which include trigger
messages, so mark the driver as nonatomic

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul
48c7699fb2 ASoC: core: allow pcms to be registered as nonatomic
ALSA core with commit 257f8cce5d - "ALSA: pcm: Allow nonatomic trigger
operations" allows trigger ops to implemented as nonatomic. For ASoC, we can
specify this in dailinks and is updated while snd_pcm is created

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Fang, Yang A
369a9f5f39 ASoC: Intel: fix machine driver warnings
this patch will fix below sparse warnings

warning: incorrect type in argument 2 (different base types) expected
unsigned int [unsigned] val got restricted snd_pcm_format_t [usertype]
<noident>

sound/soc/intel/haswell.c:61:37
sound/soc/intel/broadwell.c:115:37:
sound/soc/intel/bytcr_dpcm_rt5640.c:118:37:
sound/soc/intel/cht_bsw_rt5672.c:183:37:
sound/soc/intel/cht_bsw_rt5645.c:208:37:

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:19 +09:00
Vinod Koul
de251d773b ASoC: Intel: reset the DSP while suspending
The manual recommends that we reset the DSP when we suspend so add that in
runtime suspend handler

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:39:00 +09:00
Vinod Koul
a825ac7678 ASoC: Intel: save and restore the CSR register
The IPC driver saved only IMR register, we need to save the CSR as well, so
add it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:38:38 +09:00