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>
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>
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>
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>
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>
YueHaibing [Thu, 8 Aug 2019 03:25:52 +0000 (11:25 +0800)]
ASoC: tscs454: remove unused variable 'PLL_48K_RATE'
The global variable 'PLL_48K_RATE' is never used
so just remove it.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190808032552.45360-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 8 Aug 2019 02:51:31 +0000 (21:51 -0500)]
ASoC: soc-core: fix module_put() warning in soc_cleanup_component
The recent changes introduce warnings in the SOF load/unload module
tests. The code does not seem balanced with a confusion between
_close() and _remove() macros. Using _remove() fixes the issue and
removes the warning.
Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Fixes:
4a81e8f30d0b4 ('ASoC: soc-component: add snd_soc_component_get/put()')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20190808025131.32482-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:36 +0000 (10:31 +0900)]
ASoC: soc-core: dai_link check under soc_dpcm_debugfs_add()
soc_dpcm_debugfs_add(rtd) is checking rtd->dai_link pointer,
but, rtd->dai_link->dynamic have been already checked before calling it.
static int soc_probe_link_dais(...) {
dai_link = rtd->dai_link;
...
=> if (dai_link->dynamic)
=> soc_dpcm_debugfs_add(rtd);
...
}
void soc_dpcm_debugfs_add(rtd)
{
=> if (!rtd->dai_link)
return;
...
}
These pointer checks are strange/pointless.
This patch checks dai_link->dynamic under soc_dpcm_debugfs_add().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874l2tahnq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:31 +0000 (10:31 +0900)]
ASoC: soc-core: define soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FS
soc_dpcm_debugfs_add() is implemented at soc-pcm.c under CONFIG_DEBUG_FS.
Thus, soc-core.c which is only user of it need to use CONFIG_DEBUG_FS, too.
This patch defines soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FS case.
Then, we can remove #ifdef CONFIG_DEBUG_FS from soc-core.c
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zn9ahnv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:24 +0000 (10:31 +0900)]
ASoC: soc-core: tidyup for card->deferred_resume_work
card->deferred_resume_work is used if CONFIG_PM_SLEEP was defined.
but
1) It is defined even though CONFIG_PM_SLEEP was not defined
2) random ifdef code is difficult to read.
This patch tidyup these issues.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877e7paho1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:19 +0000 (10:31 +0900)]
ASoC: soc-core: remove unneeded list_empty() check for snd_soc_try_rebind_card()
list_for_each_entry_safe() will do nothing if it was empty list.
This patch removes unneeded list_empty() check for
list_for_each_entry_safe().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878ss5aho6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:14 +0000 (10:31 +0900)]
ASoC: soc-core: call snd_soc_dapm_debugfs_init() at soc_init_card_debugfs()
We have 2 soc_init_card_debugfs() implementations for with/without DEBUG_FS.
But, snd_soc_instantiate_card() calls snd_soc_dapm_debugfs_init() under
ifdef DEBUG_FS after soc_init_card_debugfs(). This is very strange.
We can call snd_soc_dapm_debugfs_init() under soc_init_card_debugfs().
#ifdef CONFIG_DEBUG_FS
=> static void soc_init_card_debugfs(...)
{
...
}
...
#else
=> static inline void soc_init_card_debugfs(...)
{
...
}
#endif
static int snd_soc_instantiate_card(struct snd_soc_card *card)
{
...
=> soc_init_card_debugfs(card);
* #ifdef CONFIG_DEBUG_FS
* snd_soc_dapm_debugfs_init(&card->dapm, card->debugfs_card_root);
* #endif
}
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a7clahob.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:08 +0000 (10:31 +0900)]
ASoC: soc-core: tidyup for snd_soc_add_card_controls()
snd_soc_add_card_controls() registers controls by using
for(... i < num; ...). If controls was NULL, num should be zero.
Thus, we don't need to check about controls pointer.
This patch also cares missing return value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blx1ahoi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:31:03 +0000 (10:31 +0900)]
ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()
snd_soc_dapm_add_routes() registers routes by using
for(... i < num; ...). If routes was NULL, num should be zero.
Thus, we don't need to check about route pointer.
This patch also cares missing return value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d0hhahon.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:58 +0000 (10:30 +0900)]
ASoC: soc-core: tidyup for snd_soc_add_component_controls()
snd_soc_add_component_controls() registers controls by using
for(... i < num; ...). If controls was NULL, num should be zero.
Thus, we don't need to check about controls pointer.
This patch also cares missing return value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ef1xahor.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Wed, 7 Aug 2019 18:50:50 +0000 (20:50 +0200)]
ASoC: SOF: Intel: Initialize hdaudio bus properly
The SOF HD-audio bus has its house-made initialization code. It's
supposedly for making the code independent from HD-audio bus drivers.
However, this is error-prone, and above all, the SOF driver has
already dependency on HD-audio bus driver when CONFIG_SND_SOF_HDA is
set. That is, if this Kconfig is set, there is no reason to avoid the
call to the proper bus init function.
Also, the ext_ops that is set at bus initialization can be better
handled inside sof_hda_bus_init(). We don't need to refer this
outside the bus initialization.
So this patch addresses these issues:
- sof_hda_bus_init() calls nothing but snd_hdac_ext_bus_init()
when CONFIG_SND_SOF_HDA is set. Otherwise some fields are
initialized locally like before for avoiding the dependency.
- ext_ops is referred inside sof_hda_bus_init(). The ext_ops argument
of snd_hda_bus_init() is dropped.
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 7 Aug 2019 18:32:08 +0000 (20:32 +0200)]
ALSA: hda: Direct MMIO accesses
HD-audio drivers access to the mmio registers indirectly via the
corresponding bus->io_ops callbacks. This is because some platform
(notably Tegra SoC) requires the word-aligned access. But it's rather
a rare case, and other platforms suffer from the penalties by indirect
calls unnecessarily.
This patch is an attempt to optimize and cleanup for this situation.
Now the special aligned access is used only when a new kconfig
CONFIG_SND_HDA_ALIGNED_MMIO is set. And the HD-audio core itself
provides the aligned MMIO access helpers instead of the driver side.
If Kconfig isn't set (as default), the standard helpers like readl()
or writel() are used directly.
A couple of places in ASoC Intel drivers have the access via io_ops
reg_writel(), and they are replaced with the direct writel() calls.
And now with this patch, the whole bus->io_ops becomes empty, so it's
dropped completely. The bus initialization functions are changed
accordingly as well to drop the whole bus->io_ops.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 7 Aug 2019 18:02:31 +0000 (20:02 +0200)]
ALSA: hda: Remove page allocation redirection
The HD-audio core allocates and releases pages via driver's specific
dma_alloc_pages and dma_free_pages ops defined in bus->io_ops. This
was because some platforms require the uncached pages and the handling
of page flags had to be done locally in the driver code.
Since the recent change in ALSA core memory allocator, we can simply
pass SNDRV_DMA_TYPE_DEV_UC for the uncached pages, and the only
difference became about this type to be passed to the core allocator.
That is, it's good time for cleaning up the mess.
This patch changes the allocation code in HD-audio core to call the
core allocator directly so that we get rid of dma_alloc_pages and
dma_free_pages io_ops. If a driver needs the uncached pages, it has
to set bus->dma_type right after the bus initialization.
This is merely a code refactoring and shouldn't bring any behavior
changes.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel Baluta [Tue, 6 Aug 2019 15:12:13 +0000 (18:12 +0300)]
ASoC: fsl_sai: Add support for imx7ulp/imx8mq
SAI module on imx7ulp/imx8m features 2 new registers (VERID and PARAM)
at the beginning of register address space.
On imx7ulp FIFOs can held up to 16 x 32 bit samples.
On imx8mq FIFOs can held up to 128 x 32 bit samples.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20190806151214.6783-5-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Tue, 6 Aug 2019 15:12:12 +0000 (18:12 +0300)]
ASoC: fsl_sai: Add support for SAI new version
New IP version introduces Version ID and Parameter registers
and optionally added Timestamp feature.
VERID and PARAM registers are placed at the top of registers
address space and some registers are shifted according to
the following table:
Tx/Rx data registers and Tx/Rx FIFO registers keep their
addresses, all other registers are shifted by 8.
SAI Memory map is described in chapter 13.10.4.1.1 I2S Memory map
of the Reference Manual [1].
In order to make as less changes as possible we attach an offset
to each register offset to each changed register definition. The
offset is read from each board private data.
[1]https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX8MDQLQRM.pdf?__gda__=1563728701_38bea7f0f726472cc675cb141b91bec7&fileExt=.pdf
Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
[initial coding in the NXP internal tree]
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
[bugfixing and cleanups]
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
[adapted to linux-next]
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20190806151214.6783-4-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Tue, 6 Aug 2019 15:12:11 +0000 (18:12 +0300)]
ASoC: fsl_sai: Update Tx/Rx channel enable mask
Tx channel enable (TCE) / Rx channel enable (RCE) bits
enable corresponding data channel for Tx/Rx operation.
Because SAI supports up the 8 channels TCE/RCE occupy
up the 8 bits inside TCR3/RCR3 registers we need to extend
the mask to reflect this.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20190806151214.6783-3-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Tue, 6 Aug 2019 15:12:10 +0000 (18:12 +0300)]
ASoC: fsl_sai: Add registers definition for multiple datalines
SAI IP supports up to 8 data lines. The configuration of
supported number of data lines is decided at SoC integration
time.
This patch adds definitions for all related data TX/RX registers:
* TDR0..7, Transmit data register
* TFR0..7, Transmit FIFO register
* RDR0..7, Receive data register
* RFR0..7, Receive FIFO register
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20190806151214.6783-2-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cezary Rojewski [Tue, 23 Jul 2019 14:43:40 +0000 (16:43 +0200)]
ASoC: Intel: Update request-reply IPC model
struct ipc_message contains fields: header, tx_data and tx_size which
represent TX i.e. request while RX is represented by rx_data and rx_size
with reply's header equivalent missing.
Reply header may contain some vital information including, but not
limited to, received payload size. Some IPCs have entire payload found
within RX header instead. Content and value of said header is context
dependent and may vary between firmware versions and target platform.
Current model does not allow such IPCs to function at all.
Rather than appending yet another parameter to an already long list of
such for sst_ipc_tx_message_XXXs, declare message container in form of
struct sst_ipc_message and add them to parent's ipc_message declaration.
Align haswell, baytrail and skylake with updated request-reply model and
modify their reply processing functions to save RX header within message
container. Despite the range of changes, status quo is achieved.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190723144341.21339-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:53 +0000 (10:30 +0900)]
ASoC: soc-core: tidyup for snd_soc_dapm_new_controls()
snd_soc_dapm_new_controls() registers controls by using
for(... i < num; ...). It means if widget was NULL, num should be zero.
Thus, we don't need to check about widget pointer.
This patch also cares missing return value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ftmdahow.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:47 +0000 (10:30 +0900)]
ASoC: soc-core: reuse rtdcom at snd_soc_rtdcom_add()
snd_soc_rtdcom_add() is using both "rtdcom" and "new_rtdcom" as
variable name, but these are not used at same time.
Let's reuse rtdcom.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h86tahp2.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:41 +0000 (10:30 +0900)]
ASoC: soc-core: don't use for_each_card_links_safe() at snd_soc_find_dai_link()
It doesn't removes list during loop at snd_soc_find_dai_link().
We don't need to use _safe loop.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87imr9ahp9.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:36 +0000 (10:30 +0900)]
ASoC: soc-core: check return value of snd_soc_add_dai_link()
snd_soc_add_dai_link() might return error, we need to check it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k1bpahpd.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:31 +0000 (10:30 +0900)]
ASoC: soc-core: add comment for for_each_xxx
soc-core has many for_each_xxx, but it is a little bit
difficult to know which list is relead to which for_each_xxx.
This patch adds missing comment for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfw5ahpj.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Wed, 7 Aug 2019 01:30:13 +0000 (10:30 +0900)]
ASoC: soc-core: set component->debugfs_root NULL
To be more safety code, let's set NULL to component->debugfs_root
when it was cleanuped.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87muglahq0.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Baluta [Tue, 6 Aug 2019 15:12:14 +0000 (18:12 +0300)]
ASoC: dt-bindings: Introduce compatible strings for 7ULP and 8MQ
For i.MX7ULP and i.MX8MQ register map is changed. Add two new compatbile
strings to differentiate this.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20190806151214.6783-6-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 6 Aug 2019 17:06:03 +0000 (12:06 -0500)]
ASoC: SOF: Intel: hda: fix MSI handling
The addition of a kernel module parameter to optionally disable MSI
had the side effect of permanently disabling it.
The return value of pci_alloc_irq_vectors() is the number of allocated
vectors or a negative number on error, so testing with the ! operator
is not quite right. It was one optimization too far.
Restore previous behavior to use MSI by default, unless the user
selects not to do so or the allocation of irq_vectors fails.
Fixes:
672ff5e3596ee ('ASoC: SOF: Intel: hda: add a parameter to disable MSI')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806170603.10815-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shuming Fan [Tue, 6 Aug 2019 09:14:59 +0000 (17:14 +0800)]
ASoC: rt1011: Add a flag for the R0 calibration test
The factory test needs to know whether the calibration completed.
This flag helps to confirm the calibration completed or not.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20190806091459.14382-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shuming Fan [Tue, 6 Aug 2019 09:14:35 +0000 (17:14 +0800)]
ASoC: rt1011: Add R0 temperature and TDM1 ADC2DAT Swap control
- The user level application could set the R0 temperature after booting system.
The degree Celsius of R0 temperature store in the non-volatile space
when doing R0 calibration.
- TDM1 ADC2DAT Swap controls use to control TDM slot2/3 data
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20190806091435.14329-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 26 Jul 2019 04:52:12 +0000 (13:52 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_pcm_free()
Current ALSA SoC is directly using component->driver->xxx,
thus, the code nested deeply, and it makes code difficult to read,
and is not good for encapsulation.
We want to implement component related function at soc-component.c,
but, some of them need to care whole snd_soc_pcm_runtime (= rtd)
connected component.
Let's call component related function which need to care with
for_each_rtdcom() loop as snd_soc_pcm_component_xxx().
This patch adds new snd_soc_pcm_component_pcm_free() and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k1c54czu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 26 Jul 2019 04:52:08 +0000 (13:52 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_pcm_new()
Current ALSA SoC is directly using component->driver->xxx,
thus, the code nested deeply, and it makes code difficult to read,
and is not good for encapsulation.
We want to implement component related function at soc-component.c,
but, some of them need to care whole snd_soc_pcm_runtime (= rtd)
connected component.
Let's call component related function which need to care with
for_each_rtdcom() loop as snd_soc_pcm_component_xxx().
This patch adds new snd_soc_pcm_component_pcm() and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lfwl4czy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 26 Jul 2019 04:52:04 +0000 (13:52 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_mmap()
Current ALSA SoC is directly using component->driver->ops->xxx,
thus, the code nested deeply, and it makes code difficult to read,
and is not good for encapsulation.
We want to implement component related function at soc-component.c,
but, some of them need to care whole snd_soc_pcm_runtime (= rtd)
connected component.
Let's call component related function which need to care with
for_each_rtdcom() loop as snd_soc_pcm_component_xxx().
This patch adds new snd_soc_pcm_component_mmap() and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87muh14d02.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Fri, 26 Jul 2019 04:52:00 +0000 (13:52 +0900)]
ASoC: soc-component: add snd_soc_pcm_component_page()
Current ALSA SoC is directly using component->driver->ops->xxx,
thus, the code nested deeply, and it makes code difficult to read,
and is not good for encapsulation.
We want to implement component related function at soc-component.c,
but, some of them need to care whole snd_soc_pcm_runtime (= rtd)
connected component.
Let's call component related function which need to care with
for_each_rtdcom() loop as snd_soc_pcm_component_xxx().
This patch adds new snd_soc_pcm_component_page() and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o91h4d06.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>