Age | Commit message (Collapse) | Author |
|
The rawmidi core allows user to resize the runtime buffer via ioctl,
and this may lead to UAF when performed during concurrent reads or
writes: the read/write functions unlock the runtime lock temporarily
during copying form/to user-space, and that's the race window.
This patch fixes the hole by introducing a reference counter for the
runtime buffer read/write access and returns -EBUSY error when the
resize is performed concurrently against read/write.
Note that the ref count field is a simple integer instead of
refcount_t here, since the all contexts accessing the buffer is
basically protected with a spinlock, hence we need no expensive atomic
ops. Also, note that this busy check is needed only against read /
write functions, and not in receive/transmit callbacks; the race can
happen only at the spinlock hole mentioned in the above, while the
whole function is protected for receive / transmit callbacks.
Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAFcO6XMWpUVK_yzzCpp8_XP7+=oUpQvuBeCbMffEDkpe8jWrfg@mail.gmail.com
Link: https://lore.kernel.org/r/s5heerw3r5z.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.7
Quite a lot of fixes here, a lot of driver specific ones but the biggest
one is the revert of changes to the startup and shutdown sequence for
DAIs that went in during the merge window - they broke some older x86
platforms and attempts to fix them didn't succeed so it's safer to just
roll them back and try to make sure those platforms are handled properly
in any future attempt.
The rockchip S/PDIF DT stuff was IIRC for validation issues.
|
|
On Baytrail/Cherrytrail, the Atom/SST driver fails miserably:
[ 9.741953] intel_sst_acpi 80860F28:00: FW Version 01.0c.00.01
[ 9.832992] intel_sst_acpi 80860F28:00: FW sent error response 0x40034
[ 9.833019] intel_sst_acpi 80860F28:00: FW alloc failed ret -4
[ 9.833028] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5
[ 9.833033] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5
[ 9.833037] Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed
[ 9.853942] intel_sst_acpi 80860F28:00: FW sent error response 0x40034
[ 9.853974] intel_sst_acpi 80860F28:00: FW alloc failed ret -4
[ 9.853984] intel_sst_acpi 80860F28:00: sst_get_stream returned err -5
[ 9.853990] sst-mfld-platform sst-mfld-platform: ASoC: DAI prepare error: -5
[ 9.853994] Baytrail Audio Port: ASoC: prepare FE Baytrail Audio Port failed
Commit b56be800f1292 ("ASoC: soc-pcm: call
snd_soc_dai_startup()/shutdown() once") was the initial problematic
commit.
Commit 1ba616bd1a6d5e ("ASoC: soc-dai: fix DAI startup/shutdown sequence")
was an attempt to fix things but it does not work on Baytrail,
reverting all changes seems necessary for now.
Fixes: 1ba616bd1a6d5e ("ASoC: soc-dai: fix DAI startup/shutdown sequence")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200415030437.23803-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Refactoring was done to factor out the linking of DAI widgets into
a helper function, dapm_add_valid_dai_widget. However when this was
done, a regression was introduced for CODEC to CODEC links. It was
over looked that the playback and capture variables persisted across
all CODEC DAIs being processed, which ensured that the special DAI
widget that is added for CODEC to CODEC links was only created once.
This bug causes kernel panics during DAPM shutdown.
To stick with the spirit of the original refactoring whilst fixing the
issue, variables to hold the DAI widgets are added to snd_soc_dai_link.
Furthermore the dapm_add_valid_dai_widget function is renamed to
dapm_connect_dai_pair, the function only adds DAI widgets in the CODEC
to CODEC case and its primary job is to add routes connecting two DAI
widgets, making the original name quite misleading.
Fixes: 6c4b13b51aa3 ("ASoC: Add dapm_add_valid_dai_widget helper")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200409181209.30130-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The HD-audio controller does system-suspend and resume operations by
directly calling its helpers __azx_runtime_suspend() and
__azx_runtime_resume(). However, in general, we don't have to resume
always the device fully at the system resume; typically, if a device
has been runtime-suspended, we can leave it to runtime resume.
Usually for achieving this, the driver would call
pm_runtime_force_suspend() and pm_runtime_force_resume() pairs in the
system suspend and resume ops. Unfortunately, this doesn't work for
the resume path in our case. For handling the jack detection at the
system resume, a child codec device may need the (literally) forcibly
resume even if it's been runtime-suspended, and for that, the
controller device must be also resumed even if it's been suspended.
This patch is an attempt to improve the situation. It replaces the
direct __azx_runtime_suspend()/_resume() calls with with
pm_runtime_force_suspend() and pm_runtime_force_resume() with a slight
trick as we've done for the codec side. More exactly:
- azx_has_pm_runtime() check is dropped from azx_runtime_suspend() and
azx_runtime_resume(), so that it can be properly executed from the
system-suspend/resume path
- The WAKEEN handling depends on the card's power state now; it's set
and cleared only for the runtime-suspend
- azx_resume() checks whether any codec may need the forcible resume
beforehand. If the forcible resume is required, it does temporary
PM refcount up/down for actually triggering the runtime resume.
- A new helper function, hda_codec_need_resume(), is introduced for
checking whether the codec needs a forcible runtime-resume, and the
existing code is rewritten with that.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
Link: https://lore.kernel.org/r/20200413082034.25166-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.7
A collection of fixes that have been accumilated since the merge window,
mainly relating to x86 platform support.
|
|
The addition of a single flag to track the DAI status prevents the DAI
startup sequence from being called on capture if the DAI is already
used for playback.
Fix by extending the existing code with one flag per direction.
Fixes: b56be800f1292 ("ASoC: soc-pcm: call snd_soc_dai_startup()/shutdown() once")
Reported-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20200330160602.10180-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v5.7
This is a very big update for the core since Morimoto-san has been
rather busy continuing his refactorings to clean up a lot of the cruft
that we have accumilated over the years. We've also gained several new
drivers, including initial (but still not complete) parts of the Intel
SoundWire support.
- Lots of refactorings to modernize the code from Morimoto-san.
- Conversion of SND_SOC_ALL_CODECS to use imply from Geert Uytterhoeven.
- Continued refactoring and fixing of the Intel support.
- Soundwire and more advanced clocking support for Realtek RT5682.
- Support for amlogic GX, Meson 8, Meson 8B and T9015 DAC, Broadcom
DSL/PON, Ingenic JZ4760 and JZ4770, Realtek RL6231, and TI TAS2563 and
TLV320ADCX140.
|
|
<kuninori.morimoto.gx@renesas.com>:
Hi Mark
Now, CPU/Codec DAI(s) were replaced by rtd->dais.
Thus, We don't need rtd->cpu/codec_dai{s} anymore.
This pathset replaces it by new macro.
Kuninori Morimoto (36):
ASoC: soc-core: add asoc_rtd_to_cpu/codec() macro
ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: au1x: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: bcm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: cirrus: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: generic: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: img: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: kirkwood: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: pxa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: rockchip: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: sof: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: sunxi: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: tegra: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: ti: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: txx9: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: uniphier: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: ux500: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: xtensa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: codecs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
ASoC: soc-core: set rtd->num_cpu/codec at soc_new_pcm_runtime()
ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups
ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais
include/sound/soc.h | 30 +++++++------
sound/arm/pxa2xx-pcm-lib.c | 8 ++--
sound/soc/amd/acp-da7219-max98357a.c | 2 +-
sound/soc/amd/acp-rt5645.c | 4 +-
sound/soc/amd/acp3x-rt5682-max9836.c | 6 +--
sound/soc/atmel/atmel-pcm-dma.c | 4 +-
sound/soc/atmel/atmel-pcm-pdc.c | 2 +-
sound/soc/atmel/atmel_wm8904.c | 2 +-
sound/soc/atmel/mikroe-proto.c | 2 +-
sound/soc/atmel/sam9g20_wm8731.c | 2 +-
sound/soc/atmel/sam9x5_wm8731.c | 2 +-
sound/soc/au1x/db1200.c | 2 +-
sound/soc/au1x/dbdma2.c | 2 +-
sound/soc/au1x/dma.c | 2 +-
sound/soc/au1x/psc-ac97.c | 2 +-
sound/soc/bcm/bcm63xx-pcm-whistler.c | 16 +++----
sound/soc/bcm/cygnus-pcm.c | 22 +++++-----
sound/soc/cirrus/edb93xx.c | 4 +-
sound/soc/cirrus/snappercl15.c | 4 +-
sound/soc/codecs/cs47l15.c | 4 +-
sound/soc/codecs/cs47l24.c | 6 +--
sound/soc/codecs/cs47l35.c | 6 +--
sound/soc/codecs/cs47l85.c | 6 +--
sound/soc/codecs/cs47l90.c | 6 +--
sound/soc/codecs/cs47l92.c | 4 +-
sound/soc/codecs/wm5110.c | 6 +--
sound/soc/codecs/wm_adsp.c | 10 ++---
sound/soc/dwc/dwc-pcm.c | 2 +-
sound/soc/fsl/eukrea-tlv320.c | 4 +-
sound/soc/fsl/fsl-asoc-card.c | 10 ++---
sound/soc/fsl/fsl_asrc_dma.c | 6 +--
sound/soc/fsl/fsl_spdif.c | 10 ++---
sound/soc/fsl/fsl_ssi.c | 8 ++--
sound/soc/fsl/imx-audmix.c | 8 ++--
sound/soc/fsl/imx-mc13783.c | 4 +-
sound/soc/fsl/imx-sgtl5000.c | 2 +-
sound/soc/fsl/mpc5200_dma.c | 10 ++---
sound/soc/fsl/mpc5200_psc_i2s.c | 2 +-
sound/soc/fsl/mpc8610_hpcd.c | 4 +-
sound/soc/fsl/mx27vis-aic32x4.c | 4 +-
sound/soc/fsl/p1022_ds.c | 4 +-
sound/soc/fsl/p1022_rdk.c | 4 +-
sound/soc/fsl/wm1133-ev1.c | 6 +--
sound/soc/generic/simple-card-utils.c | 12 +++---
sound/soc/img/img-i2s-in.c | 2 +-
sound/soc/img/img-i2s-out.c | 2 +-
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +--
sound/soc/intel/boards/bdw-rt5650.c | 6 +--
sound/soc/intel/boards/bdw-rt5677.c | 6 +--
sound/soc/intel/boards/broadwell.c | 4 +-
sound/soc/intel/boards/bxt_da7219_max98357a.c | 8 ++--
sound/soc/intel/boards/bxt_rt298.c | 8 ++--
sound/soc/intel/boards/byt-max98090.c | 2 +-
sound/soc/intel/boards/byt-rt5640.c | 4 +-
sound/soc/intel/boards/bytcht_cx2072x.c | 10 ++---
sound/soc/intel/boards/bytcht_da7213.c | 8 ++--
sound/soc/intel/boards/bytcht_es8316.c | 8 ++--
sound/soc/intel/boards/bytcht_nocodec.c | 4 +-
sound/soc/intel/boards/bytcr_rt5640.c | 8 ++--
sound/soc/intel/boards/bytcr_rt5651.c | 8 ++--
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +--
sound/soc/intel/boards/cht_bsw_nau8824.c | 4 +-
sound/soc/intel/boards/cht_bsw_rt5645.c | 14 +++----
sound/soc/intel/boards/cht_bsw_rt5672.c | 8 ++--
sound/soc/intel/boards/cml_rt1011_rt5682.c | 6 +--
sound/soc/intel/boards/glk_rt5682_max98357a.c | 10 ++---
sound/soc/intel/boards/haswell.c | 2 +-
sound/soc/intel/boards/kbl_da7219_max98357a.c | 8 ++--
sound/soc/intel/boards/kbl_da7219_max98927.c | 6 +--
sound/soc/intel/boards/kbl_rt5660.c | 6 +--
sound/soc/intel/boards/kbl_rt5663_max98927.c | 8 ++--
.../intel/boards/kbl_rt5663_rt5514_max98927.c | 8 ++--
.../soc/intel/boards/skl_nau88l25_max98357a.c | 12 +++---
sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 16 +++----
sound/soc/intel/boards/skl_rt286.c | 8 ++--
sound/soc/intel/boards/sof_da7219_max98373.c | 8 ++--
sound/soc/intel/boards/sof_pcm512x.c | 8 ++--
sound/soc/intel/boards/sof_rt5682.c | 6 +--
sound/soc/intel/haswell/sst-haswell-pcm.c | 26 ++++++------
sound/soc/intel/skylake/skl-pcm.c | 10 ++---
sound/soc/kirkwood/armada-370-db.c | 2 +-
sound/soc/kirkwood/kirkwood-dma.c | 2 +-
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 10 ++---
.../mediatek/common/mtk-afe-platform-driver.c | 2 +-
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +-
sound/soc/mediatek/mt2701/mt2701-cs42448.c | 4 +-
sound/soc/mediatek/mt2701/mt2701-wm8960.c | 4 +-
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 2 +-
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +-
sound/soc/mediatek/mt8173/mt8173-max98090.c | 4 +-
.../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +-
.../mediatek/mt8173/mt8173-rt5650-rt5676.c | 4 +-
sound/soc/mediatek/mt8173/mt8173-rt5650.c | 6 +--
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 2 +-
.../mediatek/mt8183/mt8183-da7219-max98357.c | 4 +-
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 2 +-
sound/soc/meson/aiu-fifo.c | 2 +-
sound/soc/meson/axg-card.c | 8 ++--
sound/soc/meson/axg-fifo.c | 2 +-
sound/soc/meson/meson-card-utils.c | 2 +-
sound/soc/mxs/mxs-sgtl5000.c | 4 +-
sound/soc/pxa/brownstone.c | 4 +-
sound/soc/pxa/corgi.c | 4 +-
sound/soc/pxa/hx4700.c | 4 +-
sound/soc/pxa/imote2.c | 4 +-
sound/soc/pxa/magician.c | 8 ++--
sound/soc/pxa/mioa701_wm9713.c | 4 +-
sound/soc/pxa/mmp-pcm.c | 2 +-
sound/soc/pxa/mmp-sspa.c | 2 +-
sound/soc/pxa/poodle.c | 4 +-
sound/soc/pxa/pxa2xx-i2s.c | 2 +-
sound/soc/pxa/spitz.c | 4 +-
sound/soc/pxa/ttc-dkb.c | 2 +-
sound/soc/pxa/z2.c | 4 +-
sound/soc/pxa/zylonite.c | 6 +--
sound/soc/qcom/apq8016_sbc.c | 2 +-
sound/soc/qcom/apq8096.c | 6 +--
sound/soc/qcom/lpass-platform.c | 2 +-
sound/soc/qcom/qdsp6/q6asm-dai.c | 4 +-
sound/soc/qcom/qdsp6/q6routing.c | 2 +-
sound/soc/qcom/sdm845.c | 22 +++++-----
sound/soc/qcom/storm.c | 2 +-
sound/soc/rockchip/rk3288_hdmi_analog.c | 4 +-
sound/soc/rockchip/rk3399_gru_sound.c | 16 +++----
sound/soc/rockchip/rockchip_max98090.c | 6 +--
sound/soc/rockchip/rockchip_rt5645.c | 6 +--
sound/soc/samsung/arndale.c | 6 +--
sound/soc/samsung/bells.c | 16 +++----
sound/soc/samsung/h1940_uda1380.c | 2 +-
sound/soc/samsung/i2s.c | 2 +-
sound/soc/samsung/jive_wm8750.c | 4 +-
sound/soc/samsung/littlemill.c | 14 +++----
sound/soc/samsung/lowland.c | 4 +-
sound/soc/samsung/neo1973_wm8753.c | 10 ++---
sound/soc/samsung/odroid.c | 2 +-
sound/soc/samsung/pcm.c | 4 +-
sound/soc/samsung/rx1950_uda1380.c | 2 +-
sound/soc/samsung/s3c-i2s-v2.c | 2 +-
sound/soc/samsung/s3c24xx_simtec.c | 4 +-
sound/soc/samsung/s3c24xx_uda134x.c | 6 +--
sound/soc/samsung/smartq_wm8987.c | 4 +-
sound/soc/samsung/smdk_spdif.c | 2 +-
sound/soc/samsung/smdk_wm8580.c | 2 +-
sound/soc/samsung/smdk_wm8994.c | 2 +-
sound/soc/samsung/smdk_wm8994pcm.c | 4 +-
sound/soc/samsung/snow.c | 4 +-
sound/soc/samsung/spdif.c | 8 ++--
sound/soc/samsung/speyside.c | 8 ++--
sound/soc/samsung/tm2_wm5110.c | 16 +++----
sound/soc/samsung/tobermory.c | 8 ++--
sound/soc/sh/dma-sh7760.c | 16 +++----
sound/soc/sh/fsi.c | 2 +-
sound/soc/sh/migor.c | 6 +--
sound/soc/sh/rcar/core.c | 2 +-
sound/soc/soc-compress.c | 36 ++++++++--------
sound/soc/soc-core.c | 42 +++++++------------
sound/soc/soc-dapm.c | 4 +-
sound/soc/soc-generic-dmaengine-pcm.c | 6 +--
sound/soc/soc-pcm.c | 30 ++++++-------
sound/soc/sof/intel/hda-dai.c | 6 +--
sound/soc/sof/intel/hda-dsp.c | 2 +-
sound/soc/sprd/sprd-pcm-compress.c | 4 +-
sound/soc/sprd/sprd-pcm-dma.c | 2 +-
sound/soc/stm/stm32_adfsdm.c | 12 +++---
sound/soc/stm/stm32_sai_sub.c | 2 +-
sound/soc/sunxi/sun4i-spdif.c | 2 +-
sound/soc/tegra/tegra_alc5632.c | 2 +-
sound/soc/tegra/tegra_max98090.c | 2 +-
sound/soc/tegra/tegra_rt5640.c | 2 +-
sound/soc/tegra/tegra_rt5677.c | 2 +-
sound/soc/tegra/tegra_sgtl5000.c | 2 +-
sound/soc/tegra/tegra_wm8753.c | 2 +-
sound/soc/tegra/tegra_wm8903.c | 6 +--
sound/soc/tegra/trimslice.c | 2 +-
sound/soc/ti/ams-delta.c | 4 +-
sound/soc/ti/davinci-evm.c | 4 +-
sound/soc/ti/davinci-vcif.c | 4 +-
sound/soc/ti/n810.c | 2 +-
sound/soc/ti/omap-abe-twl6040.c | 6 +--
sound/soc/ti/omap-mcbsp-st.c | 2 +-
sound/soc/ti/omap-mcbsp.c | 4 +-
sound/soc/ti/omap-mcpdm.c | 2 +-
sound/soc/ti/omap3pandora.c | 4 +-
sound/soc/ti/osk5912.c | 2 +-
sound/soc/ti/rx51.c | 2 +-
sound/soc/txx9/txx9aclc.c | 2 +-
sound/soc/uniphier/aio-compress.c | 22 +++++-----
sound/soc/uniphier/aio-dma.c | 6 +--
sound/soc/ux500/mop500_ab8500.c | 6 +--
sound/soc/ux500/ux500_pcm.c | 8 ++--
sound/soc/xtensa/xtfpga-i2s.c | 2 +-
191 files changed, 573 insertions(+), 577 deletions(-)
--
2.17.1
|
|
ALH was inserted in the wrong place during integration, add after DMIC
to mirror the file used by SOF firmware.
No functional change, just text move in the same file to better track
changes, if any.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200325215027.28716-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
For SoundWire, we need to know if endpoints needs to be 'aggregated'
(MIPI parlance, meaning logically grouped), e.g. when two speaker
amplifiers need to be handled as a single logical output.
We don't necessarily have the information at the firmware (BIOS)
level, so add a notion of endpoints and specify if a device/endpoint
is part of a group, with a position.
This may be expanded in future solutions, for now only provide a group
and position information.
Since we modify the header file, change all existing upstream tables
as well to avoid breaking compilation/bisect.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200325215027.28716-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Now, snd_soc_pcm_runtime supports multi cpu_dai/codec_dai.
It still has cpu_dai/codec_dai for single DAI,
and has cpu_dais/codec_dais for multi DAIs.
dais = [][][][][][][][][][][][][][][][][][]
^cpu_dais ^codec_dais
|--- num_cpus ---|--- num_codecs --|
/* for multi DAIs */
rtd->cpu_dais = &rtd->dais[0];
rtd->codec_dais = &rtd->dais[dai_link->num_cpus];
/* for single DAI */
rtd->cpu_dai = rtd->cpu_dais[0];
rtd->codec_dai = rtd->codec_dais[0];
But, these can be replaced by dais.
This patch adds asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/875zevk5va.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The patch adds a property for DMIC delay (ms) to avoid pop noise and
changes the default delay setting.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20200323082547.7898-2-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The patch adds a property for DMIC clock rate (hz) and changes the
default to the common optimize DMIC clock rate.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20200323082547.7898-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
A new small helper to get the current state of the device registration
for the given object. It'll be used for USB-audio driver to check the
delayed device registrations.
Link: https://lore.kernel.org/r/20200323170643.19181-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
ALSA SoC is currently categorizing CPU/Codec DAIs,
and it works well.
But modern devices require more complex connections,
for example Codec to Codec, etc, and future devices will
enable to more complex connections.
Because of these background, CPU/Codec DAIs categorizing is
no longer good much to modern device.
Currently, rtd has both CPU/Codec DAIs pointer.
rtd->cpu_dais = [][][][][][][][][]
rtd->codec_dais = [][][][][][][][][]
This patch merges these into DAIs pointer.
rtd->dais = [][][][][][][][][][][][][][][][][][]
^cpu_dais ^codec_dais
|--- num_cpus ---|--- num_codecs --|
Then, we can merge for_each_rtd_cpu/codec_dais() from this patch.
- for_each_rtd_cpu_dais() {
- ...
- }
- for_each_rtd_codec_dais() {
- ...
- }
+ for_each_rtd_dais() {
+ ...
+ }
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87wo7kolfa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
snd_soc_dai_get_sdw_stream() returns null if dai does not support
this callback, this is no very useful for the caller to
differentiate if this is an error or unsupported call for the dai.
return -ENOTSUPP in cases where this callback is not supported.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200316151110.2580-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
|
|
This enum code, and what's more important, related structures is
unused in whole source code, so it shouldn't be kept.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200312200622.24477-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
It's a part of ABI interface, so enum value shouldn't change
for example after removing some old enum code.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200312200622.24477-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
This makes DPCM runtime update functions available for external
calling. As an example, virtualised ASoC component drivers may need
to call these when managing shared DAPM routes that are used by more
than one driver (i.e. when host driver and guest drivers have a DAPM
path from guest PCM to host DAI where some parts are owned by host
driver and others by guest driver).
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200312095214.15126-3-guennadi.liakhovetski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Linux 5.6-rc5
|
|
To be more readable code, this patch adds
new for_each_card_widgets() macro, and replace existing code to it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87r1y2goga.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
To be more readable code, this patch adds
new for_each_card_dapms() macro, and replace existing code to it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87sgiigogf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87tv2ygogl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
We are using plural form for for_each_xxx() macro.
But, for_each_rtd_codec/cpu_dai() are out of this rule.
This patch adds plural form macro.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/8736aii326.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
v5.4 changes in soc-core tightened the checks on soc_dapm_add_routes,
which results in the ASoC card probe failing.
Introduce a flag to be set in machine drivers to prevent the probe
from stopping in case of incomplete topologies or missing routes. This
flag is for backwards compatibility only and shall not be used for
newer machine drivers.
Example with an HDaudio card with a bad topology:
[ 236.177898] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to
add route iDisp1_out -> direct -> iDisp1 Tx
[ 236.177902] skl_hda_dsp_generic skl_hda_dsp_generic:
snd_soc_bind_card: snd_soc_dapm_add_routes failed: -19
with the disable_route_checks set:
[ 64.031657] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Failed to
add route iDisp1_out -> direct -> iDisp1 Tx
[ 64.031661] skl_hda_dsp_generic skl_hda_dsp_generic:
snd_soc_bind_card: disable_route_checks set, ignoring errors on
add_routes
Fixes: daa480bde6b3a9 ("ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()")
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/20200309192744.18380-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Back-merge of 5.6 devel branch for further changes in 5.7 cycle
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.6
More fixes that have arrived since the merge window, spread out all
over. There's a few things like the operation callback addition for
rt1015 and the meson reset addition which add small new bits of
functionality to fix non-working systems, they're all very small and for
parts of newly added functionality.
|
|
The logic to calculate the subset of stream parameters supported by all
DAIs associated with a PCM stream is nontrivial. Export a helper
function so it can be used to set up simple codec2codec DAI links.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200305051143.60691-3-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
It can be useful to derive min/max rates of a snd_pcm_hardware without
having a snd_pcm_runtime, such as before constructing an ASoC DAI link.
Create a new helper that takes a pointer to a snd_pcm_hardware directly,
and refactor the original function as a wrapper around it, to avoid
needing to update any call sites.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200305051143.60691-2-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Adds core id to sof_ipc_comp. The intention of this change
is to inform FW on which core that particular component
should run. Right now core id is only passed when pipeline
is created, which is not flexible enough and doesn't allow
for FW to handle this the right way.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Link: https://lore.kernel.org/r/20200228231850.9226-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:
As discussed in [1], ASoC core supports multi codec DAIs
on a DAI link. However it does not do so for CPU DAIs.
So, add support for multi CPU DAIs on a DAI Link by adding
multi CPU DAI in Card instantiation, suspend and resume
functions, PCM ops, stream handling functions and DAPM.
[1]: https://www.spinics.net/lists/alsa-devel/msg71369.html
changes in v5:
- rebase to latest kernel base
Bard Liao (2):
ASoC: Return error if the function does not support multi-cpu
ASoC: pcm: check if cpu-dai supports a given stream
Shreyas NC (4):
ASoC: Add initial support for multiple CPU DAIs
ASoC: Add multiple CPU DAI support for PCM ops
ASoC: Add dapm_add_valid_dai_widget helper
ASoC: Add multiple CPU DAI support in DAPM
include/sound/soc.h | 15 +
sound/soc/soc-compress.c | 5 +-
sound/soc/soc-core.c | 168 +++++-----
sound/soc/soc-dapm.c | 133 ++++----
sound/soc/soc-generic-dmaengine-pcm.c | 18 +
sound/soc/soc-pcm.c | 463 ++++++++++++++++++--------
6 files changed, 531 insertions(+), 271 deletions(-)
--
2.17.1
|
|
We only have a set() operation, provide the dual get() operation to
retrieve the stream information.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200225170041.23644-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
ASoC core supports multiple codec DAIs but supports only a CPU DAI.
To support multiple cpu DAIs, add cpu_dai and num_cpu_dai in
snd_soc_dai_link and snd_soc_pcm_runtime structures similar to
support for codec_dai. This is intended as a preparatory patch to
eventually support the unification of the Codec and CPU DAI.
Inline with multiple codec DAI approach, add support to allocate,
init, bind and probe multiple cpu_dai on init if driver specifies
that. Also add support to loop over multiple cpu_dai during
suspend and resume.
This is intended as a preparatory patch to eventually unify the CPU
and Codec DAI into DAI components.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Link: https://lore.kernel.org/r/20200225133917.21314-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
|
|
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark
These are soc-pcm cleanup step4.
[01/13] - [06/13] are posted but not yet accepted patches.
To avoid conflict, I merged these into step4.
These patches are already received Reviewed-by from Pierre-Louis.
Subject: [PATCH 0/6] ASoC: use for_each_rtd_codec_dai() macro
Date: Thu, 13 Feb 2020 13:08:07 +0900
Kuninori Morimoto (13):
1) ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macro
2) ASoC: qcom: sdm845: use for_each_rtd_codec_dai() macro
3) ASoC: qcom: apq8016_sbc: use for_each_rtd_codec_dai() macro
4) ASoC: intel: cml_rt1011_rt5682: use for_each_rtd_codec_dai() macro
5) ASoC: intel: kbl_da7219_max98927: use for_each_rtd_codec_dai() macro
6) ASoC: mediatek: mt8183-da7219-max98357: use for_each_rtd_codec_dai() macro
7) ASoC: soc-pcm: add snd_soc_dai_get_pcm_stream()
8) ASoC: soc-pcm: cleanup soc_pcm_apply_msb()
9) ASoC: soc-pcm: add snd_soc_dai_get_widget()
10) ASoC: soc-pcm: merge dpcm_run_new/old_update() into dpcm_fe_runtime_update()
11) ASoC: soc-pcm: move dpcm_path_put() to soc-pcm.c
12) ASoC: soc-pcm: move CONFIG_DEBUG_FS functions to top side
13) ASoC: soc-pcm: add dpcm_create/remove_debugfs_state()
drivers/soundwire/qcom.c | 7 +-
include/sound/soc-dai.h | 15 +
include/sound/soc-dapm.h | 1 +
include/sound/soc-dpcm.h | 7 +-
sound/soc/intel/boards/cml_rt1011_rt5682.c | 3 +-
sound/soc/intel/boards/kbl_da7219_max98927.c | 8 +-
sound/soc/intel/skylake/skl-pcm.c | 10 +-
.../mediatek/mt8183/mt8183-da7219-max98357.c | 8 +-
sound/soc/qcom/apq8016_sbc.c | 7 +-
sound/soc/qcom/sdm845.c | 20 +-
sound/soc/soc-dai.c | 7 +-
sound/soc/soc-dapm.c | 20 +-
sound/soc/soc-pcm.c | 462 ++++++++----------
13 files changed, 266 insertions(+), 309 deletions(-)
--
2.17.1
Thank you for your help !!
Best regards
---
Kuninori Morimoto
|
|
ASoC component open/close and snd_soc_component_module_get/put are called
independently for each component-substream pair, so the logic added in
commit dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close()
once") was not sufficient and led to PCM playback and module unload errors.
Implement handling of failures directly in soc_pcm_components_open(),
so that any successfully opened components are closed upon error with
other components. This allows to clean up error handling in
soc_pcm_open() without adding more state tracking.
Fixes: dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close() once")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200220094955.16968-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
dpcm_path_put() (A) is calling kfree(*list).
The freed list is created by dapm_widget_list_create() (B) which is called
from snd_soc_dapm_dai_get_connected_widgets() (C) which is called from
dpcm_path_get() (D).
(B) dapm_widget_list_create(**list, ...)
{
...
=> *list = kzalloc();
...
}
(C) snd_soc_dapm_dai_get_connected_widgets(..., **list, ...)
{
...
dapm_widget_list_create(list, ...);
...
}
(D) dpcm_path_get(..., **list)
{
...
snd_soc_dapm_dai_get_connected_widgets(..., list, ...);
...
}
(A) dpcm_path_put(**list)
{
=> kfree(*list);
}
This kind of unbalance code is very difficult to read/understand.
To avoid this issue, this patch adds each missing paired function
dapm_widget_list_free() for dapm_widget_list_create() (B), and
snd_soc_dapm_dai_free_widgets() for snd_soc_dapm_dai_get_connected_widgets() (C).
This patch uses these, and moves dpcm_path_put() next to dpcm_path_get().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a75fjc9q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
soc-pcm.c has dai_get_widget(), but it can be more generic.
This patch renames it to snd_soc_dai_get_widget(), and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d0abjca1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
DAI driver has playback/capture stream.
OTOH, we have SNDRV_PCM_STREAM_PLAYBACK/CAPTURE.
Because of this kind of implementation,
ALSA SoC needs to have many verbose code.
To solve this issue, this patch adds snd_soc_dai_get_pcm_stream() macro
to get playback/capture stream pointer from stream.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ftf7jcab.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The use of parentheses to protect the argument is fine for (i)++ but
not for (--i).
Fixes: 83f94a2e293d61 ("ASoC: soc-core: add snd_soc_close_delayed_work()")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20200219222130.29933-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
ALSA code has SNDRV_PCM_STREAM_PLAYBACK/CAPTURE everywhere.
Having for_each_xxxx macro is useful.
This patch adds for_each_pcm_streams() for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/874kvpbotq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
DAI has playback_active and capture_active to care usage count.
OTOH, we have SNDRV_PCM_STREAM_PLAYBACK/CAPTURE.
But because of this kind of implementation mismatch,
ALSA SoC has many verbose code.
To solve this issue, this patch merge playback_active/capture_active
into stream_active[2];
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/875zg5botu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
No one is using snd_soc_dpcm_be_get/set_state().
If it exists only by assumption that "it may be necessary someday",
let's remove it now. Otherwise code maintenance will be difficult.
We can revive it when we really needed it.
Let's remove it, so far.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87a75hbou7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
No one is using soc_dpcm_be_digital_mute().
If it exists only by assumption that "it may be necessary someday",
let's remove it now. Otherwise code maintenance will be difficult.
We can revive it when we really needed it.
Let's remove it, so far.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87blpxbouc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
There is a need to use RT5682 as DAI clock master for other codecs
within a platform, which means that the DAI clocks are required to
remain, regardless of whether the RT5682 is actually running
playback/capture.
The RT5682 CCF basic functions are implemented almost by the existing
internal functions and asoc apis. It needs a clk provider (rt5682 mclk)
to generate the bclk and wclk outputs.
The RT5682 CCF supports and restricts as below:
1. Fmt of DAI-AIF1 must be configured to master before using CCF.
2. Only accept a 48MHz clk as the clk provider.
3. Only provide a 48kHz wclk and a set of multiples of wclk as bclk.
There are some temporary limitations in this patch until a better
implementation.
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/1582033912-6841-1-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Add all required types and methods to support each and every request
that driver could sent to firmware. Probe is one of SOF firmware
features which allows for data extraction and injection directly from
or to DMA stream.
Exposes eight IPCs:
- addition and removal of injection DMAs
- addition and removal of probe points
- info retrieval of injection DMAs and probe points
- probe initialization and cleanup
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200218143924.10565-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Update stream irq handler definition to correctly set hdac_stream
current position when servicing stream interrupts for compress streams.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200218143924.10565-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Add simple malloc and free methods for memory management for compress
streams. Based on snd_pcm_lib_malloc_pages and snd_pcm_lib_free_pages
implementation.
Signed-off-by: Divya Prakash <divya1.prakash@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200218143924.10565-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
|