Maxime Ripard [Mon, 19 Aug 2019 19:25:17 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: RX and TX counter registers are swapped
The RX and TX counters registers offset have been swapped, fix that.
Fixes: fa7c0d13cb26 ("ASoC: sunxi: Add Allwinner A10 Digital Audio driver")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/8b26477560ad5fd8f69e037b167c5e61de5c26a3.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:16 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Fix the MCLK and BCLK dividers on newer SoCs
From: Marcus Cooper <codekipper@gmail.com>
The clock division dividers have changed between the older (A10/A31) and
newer (H3, A64, etc) SoCs.
While this was addressed through an offset on some SoCs, it was missing
some dividers as well, so the support wasn't perfect. Let's introduce a
pointer in the quirk structure for the divider calculation functions to use
so we can have the proper range now.
Signed-off-by: Marcus Cooper <codekipper@gmail.com>
[Maxime: Fix the commit log, use a field in the quirk structure]
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/0e5b4abf06cd3202354315201c6af44caeb20236.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:15 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Use module clock as BCLK parent on newer SoCs
On the first generation of Allwinner SoCs (A10-A31), the i2s controller was
using the MCLK as BCLK parent. However, this changed since the introduction
of the A83t and BCLK now uses the module clock as its parent.
Let's introduce a hook to get the parent rate and use that in our divider
calculations.
Fixes: 7d2993811a1e ("ASoC: sun4i-i2s: Add support for H3")
Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/0b6665be216b3bd0e7bc43724818f05f3f8ee881.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:12 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Move the format configuration to a callback
The two main generations of our I2S controller require a slightly different
format configuration, mostly because of a quite different register layout
and some additional registers being needed on the newer generation.
This used to be controlled through a bunch of booleans, however this proved
to be quite impractical, especially since a bunch of SoCs forgot to set
those parameters and therefore were broken from that point of view.
Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/dc818644c3e40734e7a97247c994b1fca1c3c047.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:11 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Move the channel configuration to a callback
The two main generations of our I2S controller require a slightly different
channel configuration, mostly because of a quite different register layout
and some additional registers being needed on the newer generation.
This used to be controlled through a bunch of booleans, however this proved
to be quite impractical, especially since a bunch of SoCs forgot to set
those parameters and therefore were broken from that point of view.
Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/6414463de69584e8227fa495b13aa5f4798e1f0e.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 20 Aug 2019 17:28:43 +0000 (18:28 +0100)]
Merge branch 'asoc-5.3' into asoc-5.4
Daniel Stuart [Thu, 15 Aug 2019 17:12:55 +0000 (14:12 -0300)]
ASoC: intel: cht_bsw_max98090_ti: Add all Chromebooks that need pmc_plt_clk_0 quirk
Every single baytrail chromebook sets PMC to 0, as can be seeing
below by searching through coreboot source code:
$ grep -rl "PMC_PLT_CLK\[0\]" .
./rambi/variants/glimmer/devicetree.cb
./rambi/variants/clapper/devicetree.cb
./rambi/variants/swanky/devicetree.cb
./rambi/variants/enguarde/devicetree.cb
./rambi/variants/winky/devicetree.cb
./rambi/variants/kip/devicetree.cb
./rambi/variants/squawks/devicetree.cb
./rambi/variants/orco/devicetree.cb
./rambi/variants/ninja/devicetree.cb
./rambi/variants/heli/devicetree.cb
./rambi/variants/sumo/devicetree.cb
./rambi/variants/banjo/devicetree.cb
./rambi/variants/candy/devicetree.cb
./rambi/variants/gnawty/devicetree.cb
./rambi/variants/rambi/devicetree.cb
./rambi/variants/quawks/devicetree.cb
Plus, Cyan (only non-baytrail chromebook with max98090) also needs
this patch for audio to work.
Thus, this commit adds all the missing devices to bsw_max98090 quirk
table, implemented by commit
a182ecd3809c ("ASoC: intel:
cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0").
Signed-off-by: Daniel Stuart <daniel.stuart14@gmail.com>
Link: https://lore.kernel.org/r/20190815171300.30126-1-daniel.stuart14@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:13 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Rework MCLK divider calculation
The MCLK divider calculation is currently computing the ideal divider using
the oversample rate, the sample rate and the parent rate.
However, since we have access to the frequency is supposed to be running at
already, and as it turns out we're using it to compute the oversample rate,
we can just use the ratio between the parent rate and the MCLK rate to
simplify a bit the formula.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/dcc5deb2eb650758d268bddd20f60ba58856d024.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:10 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Replace call to params_channels by local variable
The sun4i_i2s_hw_params already has a variable holding the value returned
by params_channels, so let's just use that variable instead of calling
params_channels multiple times.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/c0faaac69ad40248f24eed3c3b2fa1ccc4a85b70.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:14 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Don't use the oversample to calculate BCLK
The BCLK divider should be calculated using the parameters that actually
make the BCLK rate: the number of channels, the sampling rate and the
sample width.
We've been using the oversample_rate previously because in the former SoCs,
the BCLK's parent is MCLK, which in turn is being used to generate the
oversample rate, so we end up with something like this:
oversample = mclk_rate / sampling_rate
bclk_div = oversample / word_size / channels
So, bclk_div = mclk_rate / sampling_rate / word_size / channels.
And this is actually better, since the oversampling ratio only plays a role
because the MCLK is its parent, not because of what BCLK is supposed to be.
Furthermore, that assumption of MCLK being the parent has been broken on
newer SoCs, so let's use the proper formula, and have the parent rate as an
argument.
Fixes: 7d2993811a1e ("ASoC: sun4i-i2s: Add support for H3")
Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T")
Fixes: 66ecce332538 ("ASoC: sun4i-i2s: Add compatibility with A64 codec I2S")
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/c3595e3a9788c2ef2dcc30aa3c8c4953bb5cc249.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:09 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Switch to devm for PCM register
Since the introduction of the driver, a new managed helper for the
dmaengine PCM registration has been created. Let's use it to simplify a bit
our probe and remove functions.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/606d271187091e858e8c15e20555af0b79798fe1.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxime Ripard [Mon, 19 Aug 2019 19:25:08 +0000 (21:25 +0200)]
ASoC: sun4i-i2s: Register regmap and PCM before our component
So far the regmap and the dmaengine PCM are registered after our component
has been, which means that our driver isn't properly initialised by then.
Let's fix that.
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://lore.kernel.org/r/67e303f37f141ef73ce9ed47d7f831b63c694424.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Michał Mirosław [Tue, 20 Aug 2019 11:02:37 +0000 (13:02 +0200)]
ASoC: wm8904: implement input mode select as a mux
Make '* Capture Mode' a mux. This makes DAPM know that in single-ended
mode only inverting mux paths need to be enabled.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/125cd3c9f298da9b08a4d6002d4c00d70a898950.1566298834.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Michał Mirosław [Tue, 20 Aug 2019 11:02:35 +0000 (13:02 +0200)]
ASoC: wm8904: fix typo in DAPM kcontrol name
Trivial fix for typo in "Capture Inverting Mux"es' name.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/f95ae1085f9f3c137a122c4d95728711613c15f7.1566298834.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Stuart [Thu, 15 Aug 2019 17:12:55 +0000 (14:12 -0300)]
ASoC: intel: cht_bsw_max98090_ti: Add all Chromebooks that need pmc_plt_clk_0 quirk
Every single baytrail chromebook sets PMC to 0, as can be seeing
below by searching through coreboot source code:
$ grep -rl "PMC_PLT_CLK\[0\]" .
./rambi/variants/glimmer/devicetree.cb
./rambi/variants/clapper/devicetree.cb
./rambi/variants/swanky/devicetree.cb
./rambi/variants/enguarde/devicetree.cb
./rambi/variants/winky/devicetree.cb
./rambi/variants/kip/devicetree.cb
./rambi/variants/squawks/devicetree.cb
./rambi/variants/orco/devicetree.cb
./rambi/variants/ninja/devicetree.cb
./rambi/variants/heli/devicetree.cb
./rambi/variants/sumo/devicetree.cb
./rambi/variants/banjo/devicetree.cb
./rambi/variants/candy/devicetree.cb
./rambi/variants/gnawty/devicetree.cb
./rambi/variants/rambi/devicetree.cb
./rambi/variants/quawks/devicetree.cb
Plus, Cyan (only non-baytrail chromebook with max98090) also needs
this patch for audio to work.
Thus, this commit adds all the missing devices to bsw_max98090 quirk
table, implemented by commit
a182ecd3809c ("ASoC: intel:
cht_bsw_max98090_ti: Add quirk for boards using pmc_plt_clk_0").
Signed-off-by: Daniel Stuart <daniel.stuart14@gmail.com>
Link: https://lore.kernel.org/r/20190815171300.30126-1-daniel.stuart14@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jerome Brunet [Tue, 20 Aug 2019 12:35:10 +0000 (14:35 +0200)]
ASoC: meson: g12a-tohdmitx: require regmap mmio
The tohdmitx glue uses regmap MMIO so it should require it.
Fixes: c8609f3870f7 ("ASoC: meson: add g12a tohdmitx control")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20190820123510.22491-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jerome Brunet [Tue, 20 Aug 2019 12:34:13 +0000 (14:34 +0200)]
ASoC: meson: axg-tdm-formatter: free reset on device removal
Use the devm variant to get the formatter reset so it is properly freed
on device removal
Fixes: 751bd5db5260 ("ASoC: meson: axg-tdm-formatter: add reset")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20190820123413.22249-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kunihiko Hayashi [Tue, 20 Aug 2019 06:16:04 +0000 (15:16 +0900)]
ASoC: uniphier: Fix double reset assersion when transitioning to suspend state
When transitioning to supend state, uniphier_aio_dai_suspend() is called
and asserts reset lines and disables clocks.
However, if there are two or more DAIs, uniphier_aio_dai_suspend() are
called multiple times, and double reset assersion will cause.
This patch defines the counter that has the number of DAIs at first, and
whenever uniphier_aio_dai_suspend() are called, it decrements the
counter. And only if the counter is zero, it asserts reset lines and
disables clocks.
In the same way, uniphier_aio_dai_resume() are called, it increments the
counter after deasserting reset lines and enabling clocks.
Fixes: 139a34200233 ("ASoC: uniphier: add support for UniPhier AIO CPU DAI driver")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1566281764-14059-1-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 15 Aug 2019 19:20:18 +0000 (14:20 -0500)]
ASoC: SOF: pcm: add ALH support
Even if ALH has no specific configuration, we still need to handle the
common parameters for all DAIs
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815192018.30570-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 15 Aug 2019 19:20:17 +0000 (14:20 -0500)]
ASoC: SOF: topology: initial support for Intel ALH DAI type
The Audio Link Hub DAI does not require any static configuration from
topology for now. We still need to pass the frame rate and format to
firmware.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815192018.30570-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Bard liao [Thu, 15 Aug 2019 19:20:16 +0000 (14:20 -0500)]
ASoC: SOF: rename SOUNDWIRE to ALH
Rename SOUNDWIRE to ALH.
Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815192018.30570-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Thu, 15 Aug 2019 19:20:15 +0000 (14:20 -0500)]
ASoC: SOF: topology: Add dummy support for i.MX8 DAIs
Add dummy support for SAI/ESAI digital audio interface
IPs found on i.MX8 boards.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815192018.30570-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Fri, 16 Aug 2019 05:03:14 +0000 (01:03 -0400)]
ASoC: imx-audmux: Add driver suspend and resume to support MEGA Fast
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power
source of modules during system suspend and resume procedure.
Thus, AUDMUX needs to save all the values of registers before the
system suspend and restore them after the system resume.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1565931794-7218-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pan Xiuli [Thu, 15 Aug 2019 15:57:49 +0000 (10:57 -0500)]
ASoC: SOF: Intel: initial support for Elkhart Lake
Add Kconfig, PCI ID and chip info for EHL platform.
Note that the core mask is different from previous platforms, only
Core0 can be controlled by the host. Additional patches will be
required for multi-core functionality.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155749.29304-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pan Xiuli [Thu, 15 Aug 2019 15:57:48 +0000 (10:57 -0500)]
ASoC: Intel: common: add ACPI matching tables for EHL
There are no upstream machine drivers just yet so just add dummy table
for compilation in nocodec-mode.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155749.29304-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pan Xiuli [Thu, 15 Aug 2019 15:57:47 +0000 (10:57 -0500)]
ASoC: SOF: Intel: initial support for Tiger Lake.
Add Kconfig, PCI ID and chip info for Tiger Lake platform.
Note that the core mask is different from previous platforms, only
Core0 can be controlled by the host. Additional patches will be
required for multi-core functionality.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155749.29304-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pan Xiuli [Thu, 15 Aug 2019 15:57:46 +0000 (10:57 -0500)]
ASoC: Intel: common: add ACPI matching tables for Tiger Lake
Initial support for TGL w/ RT1308
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155749.29304-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 15 Aug 2019 15:50:30 +0000 (10:50 -0500)]
ASoC: SOF: ipc: add ALH parameters
The only configuration parameter is the ALH stream ID. No range
checking is done by the driver, the firmware should check that the
stream is valid for a specific hardware.
Bump the ABI Minor number to keep the alignment with SOF firmware
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190815155032.29181-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mac Chiang [Thu, 15 Aug 2019 06:51:49 +0000 (14:51 +0800)]
ASoC: Intel: boards: Add Cometlake machine driver support
reuse and add Cometlake support with:
SSP0 for DA7219 headphone codec
SSP1 for MAX98357a speaker amp codec
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1565851909-13825-1-git-send-email-mac.chiang@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Tue, 13 Aug 2019 10:45:32 +0000 (13:45 +0300)]
ASoC: core: Move pcm_mutex up to card level from snd_soc_pcm_runtime
The pcm_mutex is used to prevent concurrent execution of snd_pcm_ops
callbacks. This works fine most of the cases but it can not handle setups
when the same DAI is used by different rtd, for example:
pcm3168a have two DAIs: one for Playback and one for Capture.
If the codec is connected to a single CPU DAI we need to have two dai_link
to support both playback and capture.
In this case the snd_pcm_ops callbacks can be executed in parallel causing
unexpected races in DAI drivers.
By moving the pcm_mutex up to card level this can be solved
while - hopefully - not breaking other setups.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190813104532.16669-1-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:25:47 +0000 (17:25 +0800)]
ASoC: 88pm860x: remove unused variables 'pcm_switch_controls' and 'aif1_mux'
sound/soc/codecs/88pm860x-codec.c:533:38: warning:
pcm_switch_controls defined but not used [-Wunused-const-variable=]
sound/soc/codecs/88pm860x-codec.c:560:38: warning:
aif1_mux defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815092547.29564-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:24:36 +0000 (17:24 +0800)]
ASoC: cs42l56: remove unused variable 'adc_swap_enum'
sound/soc/codecs/cs42l56.c:206:30: warning:
adc_swap_enum defined but not used [-Wunused-const-variable=]
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815092436.34632-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:23:00 +0000 (17:23 +0800)]
ASoC: es8328: Fix copy-paste error in es8328_right_line_controls
It seems 'es8328_rline_enum' should be used
in es8328_right_line_controls
Fixes: 567e4f98922c ("ASoC: add es8328 codec driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815092300.68712-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:20:56 +0000 (17:20 +0800)]
ASoC: es8328: remove unused variable 'pga_tlv'
sound/soc/codecs/es8328.c:102:35: warning:
pga_tlv defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815092056.28724-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:17:38 +0000 (17:17 +0800)]
ASoC: tlv320aic31xx: remove unused variable 'cm_m_enum'
sound/soc/codecs/tlv320aic31xx.c:261:29: warning:
cm_m_enum defined but not used [-Wunused-const-variable=]
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815091738.21680-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:15:34 +0000 (17:15 +0800)]
ASoC: tlv320aic23: remove unused variable 'tlv320aic23_rec_src'
sound/soc/codecs/tlv320aic23.c:70:29: warning:
tlv320aic23_rec_src defined but not used [-Wunused-const-variable=]
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815091534.57780-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:06:02 +0000 (17:06 +0800)]
ASoC: rt1011: remove unused variable 'dac_vol_tlv' and 'adc_vol_tlv'
sound/soc/codecs/rt1011.c:981:35: warning:
dac_vol_tlv defined but not used [-Wunused-const-variable=]
sound/soc/codecs/rt1011.c:982:35: warning:
adc_vol_tlv defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815090602.9000-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:04:04 +0000 (17:04 +0800)]
ASoC: max98371: remove unused variable 'max98371_noload_gain_tlv'
sound/soc/codecs/max98371.c:157:35: warning:
max98371_noload_gain_tlv defined but not used [-Wunused-const-variable=]
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815090404.72752-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:01:57 +0000 (17:01 +0800)]
ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'
sound/soc/codecs/cs4349.c:358:32: warning:
cs4349_runtime_pm defined but not used [-Wunused-const-variable=]
cs4349_runtime_pm ops already defined, it seems
we should enable it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e40da86 ("ASoC: cs4349: Add support for Cirrus Logic CS4349")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815090157.70036-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 08:54:54 +0000 (16:54 +0800)]
ASoC: cs42l73: remove unused variables 'vsp_output_mux' and 'xsp_output_mux'
sound/soc/codecs/cs42l73.c:276:38: warning:
vsp_output_mux defined but not used [-Wunused-const-variable=]
sound/soc/codecs/cs42l73.c:279:38: warning:
xsp_output_mux defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815085454.30384-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Andy Shevchenko [Fri, 21 Jun 2019 11:31:16 +0000 (14:31 +0300)]
ASoC: Intel: Skylake: Print constant literals from format specifier
Instead of using two additional "%s" specifiers, put the constant string
literals directly to the format specifier.
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190621113116.47525-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jiaxin Yu [Mon, 5 Aug 2019 04:56:37 +0000 (12:56 +0800)]
ASoC: mediatek: mt6358: add delay after dmic clock on
Most dmics produce a high level when they receive clock. The difference
between power-on and memory record time is about 10ms, but the dmic
needs 50ms to output normal data.
This commit add 100ms delay after SoC output clock so that we can cut
off the pop noise at the beginning.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/1564980997-11359-1-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Tue, 13 Aug 2019 14:41:22 +0000 (22:41 +0800)]
ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: remove unused variables
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c:50:1: warning:
mt8183_mt6358_ts3a227_max98357_dapm_widgets defined but not used [-Wunused-const-variable=]
sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c:55:1: warning:
mt8183_mt6358_ts3a227_max98357_dapm_routes defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190813144122.67676-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Tue, 13 Aug 2019 14:39:52 +0000 (22:39 +0800)]
ASoC: mediatek: mt8183-da7219-max98357: remove unused variable
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:120:1: warning:
mt8183_da7219_max98357_dapm_widgets defined but not used [-Wunused-const-variable=]
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:124:40: warning:
mt8183_da7219_max98357_dapm_routes defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190813143952.29232-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Tue, 13 Aug 2019 14:38:11 +0000 (22:38 +0800)]
ASoC: mt2701: remove unused variables
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:799:38: warning:
mt2701_afe_o23_mix defined but not used [-Wunused-const-variable=]
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:803:38: warning:
mt2701_afe_o24_mix defined but not used [-Wunused-const-variable=]
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:835:38: warning:
mt2701_afe_multi_ch_out_i2s4 defined but not used [-Wunused-const-variable=]
They are never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190813143811.31456-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Tue, 13 Aug 2019 14:25:01 +0000 (22:25 +0800)]
ASoC: soc-core: Fix -Wunused-const-variable warning
If CONFIG_DMI is not set, gcc warns:
sound/soc/soc-core.c:81:27: warning:
dmi_blacklist defined but not used [-Wunused-const-variable=]
Add #ifdef guard around it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190813142501.13080-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:19:20 +0000 (17:19 +0800)]
ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls
sound/soc/codecs/wm8737.c:112:29: warning:
high_3d defined but not used [-Wunused-const-variable=]
'high_3d' should be used for 3D High Cut-off.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 2a9ae13a2641 ("ASoC: Add initial WM8737 driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190815091920.64480-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:01:57 +0000 (17:01 +0800)]
ASoC: cs4349: Use PM ops 'cs4349_runtime_pm'
sound/soc/codecs/cs4349.c:358:32: warning:
cs4349_runtime_pm defined but not used [-Wunused-const-variable=]
cs4349_runtime_pm ops already defined, it seems
we should enable it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e40da86 ("ASoC: cs4349: Add support for Cirrus Logic CS4349")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815090157.70036-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 15 Aug 2019 09:23:00 +0000 (17:23 +0800)]
ASoC: es8328: Fix copy-paste error in es8328_right_line_controls
It seems 'es8328_rline_enum' should be used
in es8328_right_line_controls
Fixes: 567e4f98922c ("ASoC: add es8328 codec driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190815092300.68712-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 12 Aug 2019 19:05:02 +0000 (14:05 -0500)]
ASoC: SOF: fix HDA direct MMIO access
The recent change to remove the bus->io_ops callbacks used an older
version of the SOF code base, and when merged into Mark's for-next it
invalidated changes, resulting in broken compilation identified by
kbuild and reproduced during the weekly SOF rebase.
Restore SOF code overridden by git merge and apply Takashi's intended
change in the 'right' location.
Fixes: c2f16a94a8049 ("Merge branch 'topic/hda-bus-ops-cleanup'")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190812190502.30729-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 12 Aug 2019 14:03:05 +0000 (09:03 -0500)]
ASoC: Intel: hsw: remove i386 build warning w/ size_t argument
Recent changes in the common IPC code introduced a build warning with
size_t fields, use the correct %zu format.
include/linux/dynamic_debug.h:82:16: warning: format '%lu' expects
argument of type 'long unsigned int', but argument 4 has type 'size_t'
[-Wformat=]
Fixes: abf31feea26c0 ('ASoC: Intel: Update request-reply IPC model')
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-By: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190812140305.17570-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Masanari Iida [Tue, 13 Aug 2019 03:42:35 +0000 (12:42 +0900)]
ASoC: ti: Fix typos in ti/Kconfig
This patch fixes some spelling typo in Kconfig.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190813034235.30673-1-standby24x7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cheng-Yi Chiang [Tue, 13 Aug 2019 07:44:30 +0000 (15:44 +0800)]
ASoC: rockchip: rockchip_max98090: Set period size to 240
From stress testing of arecord, we found that period size
greater than ~900 will bring pl330 to DYING state and
can not recover within 100 iterations.
The result is that arecord will stuck and get I/O error,
and issue can not be recovered until reboot.
This issue does not happen when period size is small.
Set constraint of period size to 240 to prevent such issue.
With the constraint, there will be no issue after 2000 iterations.
We can revert this patch once the root cause is found
in rockchip's pl330 implementation.
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20190813074430.191791-1-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 12 Aug 2019 16:06:23 +0000 (11:06 -0500)]
ASoC: SOF: Intel: hda: fixup HDaudio topology name with DMIC number
The SOF project maintains 6 topologies for HDaudio (iDisp or
HDaudio+iDisp, no DMIC, 2 DMICs, 4 DMICs). The user is currently
required to manually rename the topology file used in
/lib/firmware/intel/sof-tplg. We can do better to avoid such
renames and use logic to select the relevant file.
The NHLT information can be used to figure out which topology file
should be used.
Alternatively, when NHLT is not present in ACPI tables or is possibly
incorrect, a module parameter can provide that information, e.g. on
Up^2 board with the test DMIC kit.
Tested on Up^2 board and Acer Swift-SF314-55
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190812160623.20821-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 12 Aug 2019 09:52:26 +0000 (12:52 +0300)]
ASoC: pcm3168a: Allow reconfiguration of tdm_slots and slot_width
When using right_j format and the codec is slave it can support 16bit
format, but only if slot_width == 16, in the same DAI mode the 24 bit
audio can work with 24 or 32 slot_width.
Because of this, the codec and CPU needs to be reconfigured when the sample
format changes.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190812095226.18870-3-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 12 Aug 2019 09:52:25 +0000 (12:52 +0300)]
ASoC: pcm3168a: Retain the independence of DAC and ADC side of the codec
The DAC and ADC path of the codec is independent, have dedicated LRCK (FS)
and BCK for DAC/ADC.
They can be configured to use different format, TDM slots and slot_width if
needed.
Move these parameters under dedicated io_params structure and manage them
independently based on the dai.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190812095226.18870-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Keyon Jie [Fri, 9 Aug 2019 23:22:36 +0000 (18:22 -0500)]
ASoC: Intel: skl-hda-dsp-generic: add dmic dapm widget and route
Adding DAPM MIC endpoint widget "SoC DMIC" and route, to enable
DMIC DAPM support with hda generic machine.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190809232236.21182-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Keyon Jie [Fri, 9 Aug 2019 23:22:35 +0000 (18:22 -0500)]
ASoC: Intel: skl-hda-dsp-generic: add dependency to dmic driver
The hda generic machine actually has dependency on the dmic driver,
select SND_SOC_DMIC at the machine selected to fix it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190809232236.21182-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Sathya Prakash M R [Fri, 9 Aug 2019 23:22:33 +0000 (18:22 -0500)]
ASoC: Intel: boards: Match Product Family instead of product
The generic machine driver of sof_rt5682
supports more platforms of same product family.
hence match the product family instead of product name.
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190809232236.21182-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Szymon Mielczarek [Fri, 9 Aug 2019 08:40:34 +0000 (10:40 +0200)]
ASoC: dapm: Invalidate only paths reachable for a given stream
By resetting the cached number of endpoints for all card's widgets we may
overwrite previously cached values for other streams. The situation may
happen especially when running streams simultaneously.
Signed-off-by: Szymon Mielczarek <szymonx.mielczarek@linux.intel.com>
Link: https://lore.kernel.org/r/20190809084034.26220-1-szymonx.mielczarek@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Jaska Uimonen [Fri, 9 Aug 2019 23:17:14 +0000 (18:17 -0500)]
ASoC: SOF: topology: use set_get_data in process load
Currently when loading sof process components there's a check if binary
control data is associated with it. If found the data is extracted to be
part of component loading and initialization. If binary data exceeds the
ipc max size, loading fails with error as large message support is only
implemented in set_get_data method. So make the process loading use
set_get_data to enable large parameters in component initialization.
Also refactor the process component loading function as it digs out 3
times almost identical information of related controls. This is
redundant, looks ugly and makes it difficult to understand the
mechanism. So make a function out of fetching the control data and use
it in process loading.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190809231714.20874-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Fri, 9 Aug 2019 10:27:47 +0000 (18:27 +0800)]
ASoC: fsl_esai: Add new compatible string for imx6ull
Add new compatible string "fsl,imx6ull-esai" in the binding document.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1565346467-5769-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Fri, 9 Aug 2019 10:27:46 +0000 (18:27 +0800)]
ASoC: fsl_esai: Add compatible string for imx6ull
Add compatible string for imx6ull, from imx6ull platform,
the issue of channel swap after xrun is fixed in hardware.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1565346467-5769-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Curtis Malainey [Fri, 9 Aug 2019 21:59:51 +0000 (14:59 -0700)]
ASoC: rt5677: Revert remove superfluous set
Commit
4dc057a786dc23 ("ASoC: rt5677: remove superfluous set") was an
attempted code cleanup but was incorrectly tested before sent and
actually breaks the interrupt since it never resets the value on each
loop now. The breakage is most testable when hotwording code is added
and also uses the interrupt.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20190809215952.155660-1-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Fri, 9 Aug 2019 20:27:36 +0000 (22:27 +0200)]
ASoC: remove w90x900/nuc900 platform drivers
The ARM w90x900 platform is getting removed, so this driver is obsolete.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20190809202749.742267-9-arnd@arndb.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Keyon Jie [Fri, 9 Aug 2019 23:22:34 +0000 (18:22 -0500)]
ASoC: Intel: sof-rt5682: add dmic dapm widget to support dmic PCM
We need add DAPM MIC endpoint widget "SoC DMIC" and route, to enable
DMIC PCM DAPM support.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190809232236.21182-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:44 +0000 (14:54 +0900)]
ASoC: soc-core: add for_each_xxx macro for aux_dev
To be more readable code, this patch adds
new for_each_xxx() macro for aux_dev.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ftmc6w8s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:53:52 +0000 (14:53 +0900)]
ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sgqc6wa8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 8 Aug 2019 14:35:07 +0000 (22:35 +0800)]
ASoC: max9850: remove unused variable 'max9850_reg'
sound/soc/codecs/max9850.c:31:33: warning:
max9850_reg defined but not used [-Wunused-const-variable=]
It is not used since commit
068416620c0d ("ASoC:
max9850: Convert to direct regmap API usage")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190808143507.66788-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Thu, 8 Aug 2019 14:32:15 +0000 (22:32 +0800)]
ASoC: max98926: remove two unused variables
sound/soc/codecs/max98926.c:28:26: warning:
max98926_dai_txt defined but not used [-Wunused-const-variable=]
sound/soc/codecs/max98926.c:23:27: warning:
max98926_boost_current_txt defined but not used [-Wunused-const-variable=]
They are never used, so can be removd.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190808143215.65904-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:39 +0000 (14:54 +0900)]
ASoC: soc-core: remove legacy style of aux_dev
Now all drivers are using snd_soc_dai_link_component for aux_dev.
Let's remove legacy style
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h86s6w8x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:30 +0000 (14:54 +0900)]
ASoC: ti: rx51: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/87imr86w96.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:25 +0000 (14:54 +0900)]
ASoC: sunxi: sun4i-codec: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k1bo6w9b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:20 +0000 (14:54 +0900)]
ASoC: samsung: tm2_wm5110: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87lfw46w9g.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:15 +0000 (14:54 +0900)]
ASoC: samsung: speyside: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87mugk6w9l.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:10 +0000 (14:54 +0900)]
ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87o9106w9p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:54:05 +0000 (14:54 +0900)]
ASoC: rockchip: rockchip_max98090: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pnlg6w9v.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:53:59 +0000 (14:53 +0900)]
ASoC: meson: axg-card: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r25w6wa1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:53:45 +0000 (14:53 +0900)]
ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tvas6waf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:53:33 +0000 (14:53 +0900)]
ASoC: intel: cht_bsw_max98090_ti: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9v86war.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:52:47 +0000 (14:52 +0900)]
ASoC: simple-card: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wofo6wc1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 8 Aug 2019 05:52:33 +0000 (14:52 +0900)]
ASoC: soc-core: support snd_soc_dai_link_component for aux_dev
To find aux_dev, ASoC is using .name, codec_name, codec_of_node.
Here, .name is used to fallback in case of no codec.
But, we already have this kind of component finding method by
snd_soc_dai_link_component and soc_find_component().
We shouldn't have duplicated implementation to do same things.
This patch adds snd_soc_dai_link_component support to finding aux_dev.
Now, no driver is using only .name.
All drivers are using codec_name and/or codec_of_node.
This means no driver is finding component from .name so far.
(Actually almost all drivers are using .name as just "device name",
not for finding component...)
This patch
1) add snd_soc_dai_link_component support for aux_dev. legacy style will
be removed if all drivers are switched to new style.
2) try to find component via snd_soc_dai_link_component.
Then, it doesn't try to find via .name, because no driver is using
it so far.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y3046wcf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Fri, 9 Aug 2019 15:15:31 +0000 (17:15 +0200)]
ASoC: hdac_hdmi: Offload dapm update at jack detection
hdac_hdmi_present_sense() calls the audio component to get ELD update,
then it reports the jack status change and updates DAPM graph
accordingly. This works when it's called from the normal code paths.
However, it may lead to a dead lock when it's called from the audio
component notifier. Namely, the DAPM update involves with the runtime
PM, and it eventually calls again the audio component get_power()
ops. Since i915 driver already takes a mutex around the audio
component ops calls, we'll eventually get the mutex doubly.
As a workaround, in this patch, only the jack state is updated in the
code path from hdac_hdmi_eld_notify_cb(), and the DAPM update is
deferred to a work so that it's processed in another context.
Reported-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20190809151531.24359-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:02:01 +0000 (10:02 -0500)]
ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation
There is a lot of duplicate code when processing IPC firmware ready
notification and creating memory windows.
First step in reducing the code duplication is to introduce generic
functions:
* sof_get_windows
* sof_fw_ready
that will replace, in the first step, the specific implementation related
to baytrail related platforms:
* byt_get_windows
* byt_fw_ready
So we are basically moving code from intel/byt.c to loader.c keeping
in mind that mbox_offset is a per platform constant so we need to
use newly introduced snd_sof_dsp_get_mailbox_offset /
snd_sof_dsp_get_window_offset in order to get the correct
mbox offset / window offset value.
Also, bar is a per platform constant so we use snd_sof_dsp_get_bar_index
instead of the hardcoded BYT_DSP_BAR.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:02:00 +0000 (10:02 -0500)]
ASoC: SOF: Introduce snd_sof_dsp_get_window_offset
This will allow us to export the offset for a memory window.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:01:59 +0000 (10:01 -0500)]
ASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset
This will allow us to export mailbox offset in order to
read the fw_ready message from.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:02:03 +0000 (10:02 -0500)]
ASoC: SOF: Intel: hda: Use generic function for fw ready / mem windows creation
We can use generic sof_fw_ready function and reduce code duplication.
Careful here that we need to provide the implementation for
get_mailbox_offset and get_window_offset.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:02:02 +0000 (10:02 -0500)]
ASoC: SOF: Intel: bdw: Use generic function for fw ready / mem windows creation
bdw_get_windows / bdw_fw_ready is identical with the generic
implementation introduced in a previous patch.
So remove bdw_get_windows / bdw_fw_ready and use the generic
sof_get_windows version.
Do not forget to implement get_mailbox_offset/get_window_offset
so that we export the correct mailbox/memory window offset to
the outside world.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Wed, 7 Aug 2019 15:01:58 +0000 (10:01 -0500)]
ASoC: SOF: Remove call to snd_sof_dsp_mailbox_init
This is reserved for some historical reason, we didn't enable memory
windows for byt/bdw at the beginning, to make it compatible, we get
those mailbox offsets from fw_ready struct firstly, and then update them
if they existed in the following memory windows, to make sure the
mailbox still can be used if no memory windows are created.
With this change all platforms have the same implementation for
xxx_fw_ready function so that we can refactor it in a common file.
Suggested-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Fri, 9 Aug 2019 08:24:40 +0000 (16:24 +0800)]
ASoC: ml26124: remove unused variable 'ngth'
In file included from ./include/sound/tlv.h:10:0,
from sound/soc/codecs/ml26124.c:19:
sound/soc/codecs/ml26124.c:59:35: warning: ngth defined but not used [-Wunused-const-variable=]
static const DECLARE_TLV_DB_SCALE(ngth, -7650, 150, 0);
^
./include/uapi/sound/tlv.h:64:15: note: in definition of macro SNDRV_CTL_TLVD_DECLARE_DB_SCALE
unsigned int name[] = { \
^~~~
sound/soc/codecs/ml26124.c:59:14: note: in expansion of macro DECLARE_TLV_DB_SCALE
static const DECLARE_TLV_DB_SCALE(ngth, -7650, 150, 0);
^~~~~~~~~~~~~~~~~~~~
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190809082440.67412-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Fri, 9 Aug 2019 08:02:34 +0000 (16:02 +0800)]
ASoC: mt6351: remove unused variable 'mt_lineout_control'
sound/soc/codecs/mt6351.c:1070:38: warning:
mt_lineout_control defined but not used [-Wunused-const-variable=]
It is never used, so can be removed.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190809080234.23332-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YueHaibing [Fri, 9 Aug 2019 11:01:00 +0000 (19:01 +0800)]
ASoC: SOF: Intel: Add missing include file hdac_hda.h
Building with SND_SOC_SOF_HDA_AUDIO_CODEC fails:
sound/soc/sof/intel/hda-bus.c: In function sof_hda_bus_init:
sound/soc/sof/intel/hda-bus.c:16:25: error: implicit declaration of function
snd_soc_hdac_hda_get_ops; did you mean snd_soc_jack_add_gpiods? [-Werror=implicit-function-declaration]
#define sof_hda_ext_ops snd_soc_hdac_hda_get_ops()
Reported-by: Hulk Robot <hulkci@huawei.com>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Fixes: d4ff1b3917a5 ('ASoC: SOF: Intel: Initialize hdaudio bus properly")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190809110100.71236-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 9 Aug 2019 11:37:12 +0000 (12:37 +0100)]
Merge branch 'topic/hda-bus-ops-cleanup' of https://git./linux/kernel/git/tiwai/sound into asoc-5.4
Stephen Rothwell [Fri, 9 Aug 2019 02:54:58 +0000 (12:54 +1000)]
ALSA: hda: readl/writel need linux/io.h
Fixes: 19abfefd4c76 ("ALSA: hda: Direct MMIO accesses")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Thu, 8 Aug 2019 22:20:45 +0000 (23:20 +0100)]
Merge branch 'topic/hda-bus-ops-cleanup' of https://git./linux/kernel/git/tiwai/sound into asoc-5.4
Mark Brown [Thu, 8 Aug 2019 22:15:54 +0000 (23:15 +0100)]
ASoC: sof: Fix warning when IPC flood test is not enabled
dentry is only used when the flood test is done so move the declaration
of the variable inside the ifdef for the flood test.
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 8 Aug 2019 22:10:35 +0000 (23:10 +0100)]
Merge branch 'topic/hda-dmic' of https://git./linux/kernel/git/tiwai/sound into asoc-5.4
Cezary Rojewski [Thu, 8 Aug 2019 18:15:49 +0000 (20:15 +0200)]
ASoC: Intel: Skylake: large_config_get overhaul
LARGE_CONFIG_GET is mainly used to retrieve requested module parameters
but it may also carry TX payload with them. Update its implementation to
account for both TX and RX data.
First reply.header carries total payload size within data_off_sizefield.
Make use of reply.header to realloc returned buffer with correct size.
Failure of IPC request is permissive - error-payload may be returned, an
informative data why GET for given param failed - and thus function
should not collapse before entire processing is finished. Caller is
responsible for checking returned payload and bytes parameters.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190808181549.12521-3-cezary.rojewski@intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Thu, 8 Aug 2019 18:15:48 +0000 (20:15 +0200)]
ASoC: Intel: Skylake: Limit large_config_get to single frame
Reply for the very first LARGE_CONFIG_GET request contains total size of
payload to be retrieved by host.
From then on, each subsequent reply carries buffer offset instead. As
looping is not covered by any real-life example, remove it and cleanup
the function for followup overhaul.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190808181549.12521-2-cezary.rojewski@intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Libin Yang [Thu, 8 Aug 2019 19:27:34 +0000 (14:27 -0500)]
ASoC: intel: skl_hda_dsp_common: create HDMI jack kctl
This patch call snd_jack_add_new_kctl() to create the HDMI jack kctls.
Userspace needs these kctls to detect the hdmi monitor hotplug.
In /usr/share/alsa/ucm, the config file needs to assign a jack kctl to
"JackControl" to let PA get the jack hotplug status.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190808192734.18286-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>