summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2020-12-16Merge tag 'acpi-5.11-rc1' of ↵Linus Torvalds2-12/+1
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20201113, fix and clean up some resources manipulation code, extend the enumeration and gpio-line-names property documentation, clean up the handling of _DEP during device enumeration, add a new backlight DMI quirk, clean up transaction handling in the EC driver and make some assorted janitorial changes. Specifics: - Update ACPICA code in the kernel to upstream revision 20201113 with changes as follows: * Add 5 new UUIDs to the known UUID table (Bob Moore) * Remove extreaneous "the" in comments (Colin Ian King) * Add function trace macros to improve debugging (Erik Kaneda) * Fix interpreter memory leak (Erik Kaneda) * Handle "orphan" _REG for GPIO OpRegions (Hans de Goede) - Introduce resource_union() and resource_intersection() helpers and clean up some resource-manipulation code with the help of them (Andy Shevchenko) - Revert problematic commit related to the handling of resources in the ACPI core (Daniel Scally) - Extend the ACPI device enumeration documentation and the gpio-line-names _DSD property documentation, clean up the latter (Flavio Suligoi) - Clean up _DEP handling during device enumeration, modify the list of _DEP exceptions and the handling of it and fix up terminology related to _DEP (Hans de Goede, Rafael Wysocki) - Eliminate in_interrupt() usage from the ACPI EC driver (Sebastian Andrzej Siewior) - Clean up the advance_transaction() routine and related code in the ACPI EC driver (Rafael Wysocki) - Add new backlight quirk for GIGABYTE GB-BXBT-2807 (Jasper St Pierre) - Make assorted janitorial changes in several ACPI-related pieces of code (Hanjun Guo, Jason Yan, Punit Agrawal)" * tag 'acpi-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (40 commits) ACPI: scan: Fix up _DEP-related terminology with supplier/consumer ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[] ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807 Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" ACPI: scan: Add PNP0D80 to the _DEP exceptions list ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object() ACPI: scan: Add acpi_info_matches_hids() helper ACPICA: Update version to 20201113 ACPICA: Interpreter: fix memory leak by using existing buffer ACPICA: Add function trace macros to improve debugging ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions ACPICA: Remove extreaneous "the" in comments ACPICA: Add 5 new UUIDs to the known UUID table resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: processor: Drop duplicate setting of shared_cpu_map ACPI: EC: Clean up status flags checks in advance_transaction() ACPI: EC: Untangle error handling in advance_transaction() ACPI: EC: Simplify error handling in advance_transaction() ACPI: EC: Rename acpi_ec_is_gpe_raised() ...
2020-12-16Merge tag 'regmap-v5.11' of ↵Linus Torvalds6-1517/+0
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is quite a busy release for regmap with two substantial features being added: - Support for register maps Soundwire 1.2 multi-byte operations, allowing atomic support for registers larger than a single byte. - Support for relaxed I/O without barriers in MMIO regmaps, allowing them to be used efficiently on systems where default MMIO operations include barriers. There was also an addition and revert of use of the new Soundwire support for RT715 due to build issues with the driver built in, my tests only covered building it as a module, the patch wasn't just dropped as it had already been merged elsewhere" * tag 'regmap-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: ASoC: rt715: Fix build regmap: sdw: add required header files regmap: Remove duplicate `type` field from regmap `regcache_sync` trace event regmap: Fix order of regmap write log regmap: mmio: add config option to allow relaxed MMIO accesses
2020-12-16Merge tag 'staging-5.11-rc1' of ↵Linus Torvalds1-1/+11
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the big staging and IIO driver pull request for 5.11-rc1 Lots of different things in here: - loads of driver updates - so many coding style cleanups - new IIO drivers - Android ION code is finally removed from the tree - wimax drivers are moved to staging on their way out of the kernel Nothing really exciting, just the constant grind of kernel development :) All have been in linux-next for a while with no reported issues" * tag 'staging-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (341 commits) staging: olpc_dcon: Do not call platform_device_unregister() in dcon_probe() staging: most: Fix spelling mistake "tranceiver" -> "transceiver" staging: qlge: remove duplicate word in comment staging: comedi: mf6x4: Fix AI end-of-conversion detection staging: greybus: Add TODO item about modernizing the pwm code pinctrl: ralink: add a pinctrl driver for the rt2880 family dt-bindings: pinctrl: rt2880: add binding document staging: rtl8723bs: remove ELEMENT_ID enum staging: rtl8723bs: remove unused macros staging: rtl8723bs: replace EID_EXTCapability staging: rtl8723bs: replace EID_BSSIntolerantChlReport staging: rtl8723bs: replace EID_BSSCoexistence staging: rtl8723bs: replace _MME_IE_ staging: rtl8723bs: replace _WAPI_IE_ staging: rtl8723bs: replace _EXT_SUPPORTEDRATES_IE_ staging: rtl8723bs: replace _ERPINFO_IE_ staging: rtl8723bs: replace _CHLGETXT_IE_ staging: rtl8723bs: replace _COUNTRY_IE_ staging: rtl8723bs: replace _IBSS_PARA_IE_ staging: rtl8723bs: replace _TIM_IE_ ...
2020-12-16Merge tag 'sound-5.11-rc1' of ↵Linus Torvalds269-3684/+27666
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Lots of changes (slightly more code increase than usual) at this time, while most of code changes are ASoC driver-specific. Here are some highlights: Core: - The new auxiliary bus implementation for Intel DSP, which will be used by other drivers as well - Lots of ASoC core cleanups and refactoring - UBSAN and KCSAN fixes in rawmidi, sequencer and a few others - Compress-offload API enhancement for the pause during draining HD- and USB-audio: - Enhancements of the USB-audio implicit feedback support, including better full-duplex operations - Continued CA0132 improvements and fixes - A few new quirk entries, HDMI audio fixes ASoC: - Support for boot time selection of Intel DSP firmware, which should help distros/users testing new stuff more easily; the kconfig was moved to boot time option, too - Some basic DPCM support in audio graph card - Removal of old pre-DT Freescale drivers - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715, Qualcomm SM8250 and simple GPIO based muxes" * tag 'sound-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (445 commits) ALSA: pcm: oss: Fix potential out-of-bounds shift ALSA: usb-audio: Fix potential out-of-bounds shift ALSA: hda/ca0132 - Add ZxR surround DAC setup. ALSA: hda/ca0132 - Add 8051 PLL write helper functions. ALSA: hda/hdmi: packet buffer index must be set before reading value ASoC: SOF: imx: update kernel-doc description ASoC: mediatek: mt8183: delete some unreachable code ASoC: mediatek: mt8183: add PM ops to machine drivers ASoC: topology: Fix wrong size check ASoC: topology: Add missing size check ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err ASoC: SOF: modify the SOF_DBG flags ASoC: SOF: Intel: hda: remove duplicated status dump ASoC: rt1015p: delay 300ms after SDB pulling high for calibration ASoC: rt1015p: move SDB control from trigger to DAPM ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control() ALSA: usb-audio: Fix control 'access overflow' errors from chmap ALSA: hda/hdmi: always print pin NIDs as hexadecimal ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button ALSA: hda/ca0132 - Remove now unnecessary DSP setup functions. ...
2020-12-15Merge branches 'acpi-resources' and 'acpi-docs'Rafael J. Wysocki2-12/+1
* acpi-resources: Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: watchdog: Replace open coded variant of resource_union() PCI/ACPI: Replace open coded variant of resource_union() resource: Add test cases for new resource API resource: Introduce resource_intersection() for overlapping resources resource: Introduce resource_union() for overlapping resources resource: Group resource_overlaps() with other inline helpers resource: Simplify region_intersects() by reducing conditionals * acpi-docs: Documentation: ACPI: enumeration: add PCI hierarchy representation Documentation: ACPI: _DSD: enable hyperlink in final references Documentation: ACPI: explain how to use gpio-line-names
2020-12-14Merge branch 'linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add speed testing on 1420-byte blocks for networking Algorithms: - Improve performance of chacha on ARM for network packets - Improve performance of aegis128 on ARM for network packets Drivers: - Add support for Keem Bay OCS AES/SM4 - Add support for QAT 4xxx devices - Enable crypto-engine retry mechanism in caam - Enable support for crypto engine on sdm845 in qce - Add HiSilicon PRNG driver support" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (161 commits) crypto: qat - add capability detection logic in qat_4xxx crypto: qat - add AES-XTS support for QAT GEN4 devices crypto: qat - add AES-CTR support for QAT GEN4 devices crypto: atmel-i2c - select CONFIG_BITREVERSE crypto: hisilicon/trng - replace atomic_add_return() crypto: keembay - Add support for Keem Bay OCS AES/SM4 dt-bindings: Add Keem Bay OCS AES bindings crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd crypto: seed - remove trailing semicolon in macro definition crypto: x86/poly1305 - Use TEST %reg,%reg instead of CMP $0,%reg crypto: x86/sha512 - Use TEST %reg,%reg instead of CMP $0,%reg crypto: aesni - Use TEST %reg,%reg instead of CMP $0,%reg crypto: cpt - Fix sparse warnings in cptpf hwrng: ks-sa - Add dependency on IOMEM and OF crypto: lib/blake2s - Move selftest prototype into header file crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata crypto: ecdh - avoid unaligned accesses in ecdh_set_secret() crypto: ccree - rework cache parameters handling crypto: cavium - Use dma_set_mask_and_coherent to simplify code crypto: marvell/octeontx - Use dma_set_mask_and_coherent to simplify code ...
2020-12-14Merge tag 'asoc-v5.11' of ↵Takashi Iwai266-3680/+27666
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.11 There's a lot of changes here but mostly cleanups and driver specific things, the most user visible change is the support for boot time selection of Intel DSP firmware which will make it easier for people to move over to the preferred modern implementations in distros and other large scale deployments. This also includes a merge of the new auxillary bus which was done in anticipation of use by the Intel DSP drivers which didn't quite make it. - Lots more cleanups and simplifications from Morimoto-san. - Support for some basic DPCM systems in the audio graph card from Sameer Pujar. - Remove some old pre-DT Freescale drivers for platforms that are now DT only. - Move selection of which Intel DSP implementation to use to boot time rather than requiring it to be selected at build time. - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715, Qualcomm SM8250 and simple GPIO based muxes.
2020-12-14Merge branch 'for-linus' into for-nextTakashi Iwai7-36/+73
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11Merge remote-tracking branch 'asoc/for-5.11' into asoc-nextMark Brown261-3671/+27611
2020-12-11Merge series "ASoC: SOF: Intel: fix to dsp state dump trace levels" from Kai ↵Mark Brown7-22/+30
Vehmanen <kai.vehmanen@linux.intel.com>: Small series that addresses a problem where DSP status dump for a failure case, ends up being printed as as debug print. This is important information for any bug report. While at it, the series contains a few cleanups to related code. Ranjani Sridharan (3): ASoC: SOF: Intel: hda: remove duplicated status dump ASoC: SOF: modify the SOF_DBG flags ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err sound/soc/sof/debug.c | 2 +- sound/soc/sof/intel/byt.c | 2 +- sound/soc/sof/intel/hda-loader.c | 19 +++++++++++++------ sound/soc/sof/intel/hda.c | 10 ++++------ sound/soc/sof/loader.c | 4 ++-- sound/soc/sof/ops.c | 2 +- sound/soc/sof/sof-priv.h | 13 ++++++++----- 7 files changed, 30 insertions(+), 22 deletions(-) -- 2.29.2
2020-12-11Merge series "ASoC: rt1015p: delay 300ms for waiting calibration" from ↵Mark Brown1-37/+32
Tzung-Bi Shih <tzungbi@google.com>: The 1st patch moves SDB control from DAI ops trigger to DAPM event (per review comments in v1). The 2nd patch adds the 300ms delay for waiting calibration. Changes from v2: - Use gpiod_set_value_cansleep() instead of gpiod_set_value(). (https://patchwork.kernel.org/project/alsa-devel/patch/20201210033617.79300-2-tzungbi@google.com/) - Assuming the calibration state gets lost after system suspend. (https://patchwork.kernel.org/project/alsa-devel/patch/20201210033617.79300-3-tzungbi@google.com/) Changes from v1: (https://patchwork.kernel.org/project/alsa-devel/patch/20201209033742.3825973-1-tzungbi@google.com/) - Move the delay from trigger to DAPM event. Tzung-Bi Shih (2): ASoC: rt1015p: move SDB control from trigger to DAPM ASoC: rt1015p: delay 300ms after SDB pulling high for calibration sound/soc/codecs/rt1015p.c | 69 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 37 deletions(-) -- 2.29.2.684.gfbc64c5ab5-goog
2020-12-11ASoC: SOF: imx: update kernel-doc descriptionPierre-Louis Bossart1-0/+2
Add missing parameters to avoid W=1 error Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201211102255.3189589-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: mediatek: mt8183: delete some unreachable codeDan Carpenter1-1/+0
This has a goto followed by an unreachable return statement. The goto is correct because it cleans up so the current runtime behavior is fine. Let's delete the unreachable return statement. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9NFg3KVm16Gx6Io@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: mediatek: mt8183: add PM ops to machine driversTzung-Bi Shih2-0/+2
Adds PM ops to machine drivers so that they notify components in the sound card when system suspend. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201211051334.2313899-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: topology: Fix wrong size checkAmadeusz Sławiński1-2/+8
Dan reported that smatch reports wrong size check and after analysis it is confirmed that we are comparing wrong value: pointer size instead of array size. However the check itself is problematic as in UAPI header there are two fields: struct snd_soc_tplg_enum_control { (...) char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; the texts field is for names and the values one for values assigned to those named fields, after analysis it becomes clear that there is quite a lot overhead values than we may possibly name. So instead of changing check to ARRAY_SIZE(ec->values), as it was first suggested, use hardcoded value of SND_SOC_TPLG_NUM_TEXTS. Link: https://lore.kernel.org/alsa-devel/X9B0eDcKy+9B6kZl@mwanda/ Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: topology: Add missing size checkAmadeusz Sławiński1-0/+3
When we parse "values" we perform check if there is correct number of them. However similar check is missing in case of "texts", add it. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201210152541.191728-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_errRanjani Sridharan4-9/+17
The condition boot_iteration == HDA_FW_BOOT_ATTEMPTS to determine the log level for the DSP status dump would only work in the case of DSP init failure after maximum number of attempts to initialize the DSP. If DSP init succeeds in less than HDA_FW_BOOT_ATTEMPTS attempts and FW loading fails, the ROM status dump would end up getting logged as debug instead of an error. So, add a new flag, SOF_DBG_DUMP_LOG_ERROR, to explicitly specify the log level for DSP status dump. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201211100743.3188821-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: SOF: modify the SOF_DBG flagsRanjani Sridharan6-12/+13
The SOF_DBG_* macros are used for dual purposes right now, for the sof_core_debug module parameter and for the dbg_dump() ops. So, separate these two types of flags into different types to avoid confusion. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201211100743.3188821-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: SOF: Intel: hda: remove duplicated status dumpRanjani Sridharan1-5/+4
Remove the duplicate status dump in case DSP init fails. The core will be powered down in this case and the status dump will be invalid anyway. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201211100743.3188821-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: rt1015p: delay 300ms after SDB pulling high for calibrationTzung-Bi Shih1-0/+20
RT1015p needs 300ms delay after SDB pulling high for internal calibration during the power on sequence. Delays 300ms right before data sends out to avoid data truncated. Assuming the calibration state gets lost after system suspend. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201211051224.2307349-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: rt1015p: move SDB control from trigger to DAPMTzung-Bi Shih1-38/+13
Moves SDB control from DAI ops trigger to DAPM. As long as BCLK and LRCLK are ready, SDB can be toggled earlier. Changes from using gpiod_set_value() to gpiod_set_value_cansleep() because it executes in non-atomic context. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201211051224.2307349-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control()Dan Carpenter1-2/+3
The error handling frees "ctl" but it's still on the "dsp->ctl_list" list so that could result in a use after free. Remove it from the list before returning. Fixes: 2323736dca72 ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/X9B0keV/02wrx9Xs@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: add simple-muxAlexandre Belloni3-0/+134
Add a driver for simple mux driven by gpios. It currently only supports one gpio, muxing one of two inputs to a single output. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201205001508.346439-2-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: SOF: Intel: add SoundWire support for ADL-SKai Vehmanen2-1/+3
Expand SOF support for Alder Lake by adding ACPI machine tables for ADL-S systems with SoundWire codecs. Modify kernel config to choose SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE for these platforms. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20201209153102.3028310-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: Intel: common: add ACPI matching tables for Alder LakeKai Vehmanen2-1/+53
Initial support for ADL w/ RT711 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20201209153102.3028310-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: AMD Renoir - add DMI table to avoid the ACP mic probe (broken BIOS)Jaroslav Kysela1-5/+23
Users reported that some Lenovo AMD platforms do not have ACP microphone, but the BIOS advertises it via ACPI. This patch create a simple DMI table, where those machines with the broken BIOS can be added. The DMI description for Lenovo IdeaPad 5 and IdeaPad Flex 5 devices are added there. Also describe the dmic_acpi_check kernel module parameter in a more understandable way. Cc: <stable@kernel.org> Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20201208171200.2737620-1-perex@perex.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09Merge series "ASoC: soc-pcm: trigger cleanup" from Kuninori Morimoto ↵Mark Brown4-47/+144
<kuninori.morimoto.gx@renesas.com>: Hi Mark These are focusing to trigger function, which can be cleanup, tidyup. Kuninori Morimoto (2): ASoC: soc-pcm: remove dpcm_do_trigger() ASoC: soc-pcm: care trigger rollback include/sound/soc-component.h | 3 +- include/sound/soc-dai.h | 4 +- include/sound/soc-link.h | 3 +- include/sound/soc.h | 1 + sound/soc/soc-component.c | 45 ++++++++++++++++++---- sound/soc/soc-dai.c | 44 +++++++++++++++++---- sound/soc/soc-link.c | 30 ++++++++++++++- sound/soc/soc-pcm.c | 72 ++++++++++++++++++++--------------- 8 files changed, 152 insertions(+), 50 deletions(-) -- 2.25.1
2020-12-09ASoC: rt1015: check the return value of regmap_read during i2c probeDerek Fang1-2/+7
In some projects, the device ID register is not read correctly. This patch helps to verify the issue is caused from i2c host or client. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20201209091308.2823-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: codecs/jz4770: Add DAPM widget to set HP out to cap-less modePaul Cercueil1-2/+6
Cap-less mode is useful e.g. if the headphones are used as an antenna for a FM radio, so that the signal is not altered. For everything else, we want the cap-couple mode. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20201207125338.119397-5-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: codecs/jz4770: Don't change cap-couple setting in HP PMU/PMDPaul Cercueil1-4/+4
There is simply no reason to do that. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20201207125338.119397-4-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: codecs/jz4770: Adjust timeouts for cap-coupled outputsChristophe Branchereau1-4/+4
When using cap-coupled outputs, the RUP/RDO can take much longer than the 100ms timeout we used to have. Increase that timeout to one second. Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20201207125338.119397-3-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: codecs/jz4770: Reset interrupt flags in bias PREPAREChristophe Branchereau1-3/+3
In case a poll for RUP times out, we might be left with some IRQ flags that should be cleared before the next power on. Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20201207125338.119397-2-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: codecs/jz47xx: Use regmap_{set,clear}_bitsPaul Cercueil3-76/+55
Use regmap_{set,clear}_bits instead of regmap_update_bits, when applicable. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20201207125338.119397-1-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: soc-pcm: care trigger rollbackKuninori Morimoto4-26/+135
soc_pcm_trigger() calls DAI/Component/Link trigger, but some of them might be failed. static int soc_pcm_trigger(...) { ... switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ret = snd_soc_link_trigger(substream, cmd); if (ret < 0) break; (*) ret = snd_soc_pcm_component_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_pcm_dai_trigger(substream, cmd); break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ret = snd_soc_pcm_dai_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_pcm_component_trigger(substream, cmd); if (ret < 0) break; ret = snd_soc_link_trigger(substream, cmd); break; } ... } For example, if soc_pcm_trigger() failed at (*) point, we need to rollback previous succeeded trigger. This patch adds trigger mark for DAI/Component/Link, and do STOP if START/RESUME/PAUSE_RELEASE were failed. Because it need to use new rollback parameter, we need to modify DAI/Component/Link trigger functions in the same time. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a6uycssd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: soc-pcm: remove dpcm_do_trigger()Kuninori Morimoto1-21/+9
dpcm_be_dai_trigger() is calling dpcm_do_trigger() at each SNDRV_PCM_TRIGGER_xxx (1). int dpcm_be_dai_trigger(...) { for_each_dpcm_be(fe, stream, dpcm) { (B) ... switch (cmd) { case SNDRV_PCM_TRIGGER_START: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_RESUME: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_STOP: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_SUSPEND: ... (1) ret = dpcm_do_trigger(...); ... case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ... (1) ret = dpcm_do_trigger(...); ... } } } But it is just very verbose and duplicated function. Because We can indicate dev_dbg() (A) at dpcm_be_dai_trigger() (B). And dev_err() (C) is not needed because soc_pcm_trigger() itself indicates error message when error. static int dpcm_do_trigger(...) { int ret; (A) dev_dbg(...); ret = soc_pcm_trigger(substream, cmd); if (ret < 0) (C) dev_err(...); return ret; } This patch replace dpcm_do_trigger() to soc_pcm_trigger(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87blfecssk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: AMD Raven/Renoir - fix the PCI probe (PCI revision)Jaroslav Kysela2-0/+8
The Raven and Renoir ACP can be distinguished by the PCI revision. Let's do the check very early, otherwise the wrong probe code can be run. Link: https://lore.kernel.org/alsa-devel/2e4587f8-f602-cf23-4845-fd27a32b1cfc@amd.com/ Cc: <stable@kernel.org> Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20201208181233.2745726-1-perex@perex.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: max98390: Fix error codes in max98390_dsm_init()Dan Carpenter1-0/+2
These error paths return success but they should return -EINVAL. Fixes: 97ed3e509ee6 ("ASoC: max98390: Fix potential crash during param fw loading") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9B0uz4svyNTqeMb@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140Chris Chiu1-0/+12
Tha ARCHOS Cesium 140 tablet has problem with the jack-sensing, thus the heaset functions are not working. Add quirk for this model to select the correct input map, jack-detect options and channel map to enable jack sensing and headset microphone. This device uses IN1 for its internal MIC and JD2 for jack-detect. Signed-off-by: Chris Chiu <chiu@endlessos.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201208060414.27646-1-chiu@endlessos.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08Merge series "ASoC: Intel: cht_bsw_nau8824: 2 fixes for usage with ↵Mark Brown1-9/+1
sof-audio-acpi" from Hans de Goede <hdegoede@redhat.com>: Hi All, Here are 2 simple fixes which are necessary to make the cht_bsw_nau8824 machine driver work together with the sof-audio-acpi driver. Note that atm the sof topology files are missing a .tplg file for this setup. Simply copying over the standard sof-byte-codec.tplg file does the trick, but then some mixer setting changes are necessary to fix the right speaker/headphones channel not working; and those mixer settings break the right channel when used with the sst-acpi driver. I've been trying to fix this at the tplg level so that we do not need to change the mixer settings, but no luck sofar. I'll post a RFC with the topology changes which I have and we can discuss this further there. These 2 simple fixes are necessary to make the sof-audio-acpi driver work regardless of the topology issue. Regards, Hans
2020-12-08ASoC: amd: change clk_get() to devm_clk_get() and add missed checksChuhong Yuan1-2/+7
cz_da7219_init() does not check the return values of clk_get(), while da7219_clk_enable() calls clk_set_rate() to dereference the pointers. Add checks to fix the problems. Also, change clk_get() to devm_clk_get() to avoid data leak after failures. Fixes: bb24a31ed584 ("ASoC: AMD: Configure wclk and bclk of master codec") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Link: https://lore.kernel.org/r/20201204063610.513556-1-hslester96@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: cx2072x: Fix doubly definitions of Playback and Capture streamsTakashi Iwai1-2/+2
The cx2072x codec driver defines multiple DAIs with the same stream name "Playback" and "Capture". Although the current code works more or less as is as the secondary streams are never used, it still leads the error message like: debugfs: File 'Playback' in directory 'dapm' already present! debugfs: File 'Capture' in directory 'dapm' already present! Fix it by renaming the secondary streams to unique names. Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20201208135154.9188-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: fsl: Add imx-hdmi machine driverShengjiu Wang3-0/+250
The driver is initially designed for sound card using HDMI interface on i.MX platform. There is internal HDMI IP or external HDMI modules connect with SAI or AUD2HTX interface. It supports both transmitter and receiver devices. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/1607251319-5821-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: Intel: cht_bsw_nau8824: Change SSP2-Codec DAI id to 0Hans de Goede1-1/+1
The snd-soc-sst-acpi driver does not care about the id specified for the SSP2-Codec DAI, but it does matter for the snd-sof-acpi driver; and when it is not 0 then the snd-sof-acpi driver does not work. Set the SSP2-Codec DAI id to 0, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201206122436.13553-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: Intel: cht_bsw_nau8824: Drop compress-cpu-dai bitsHans de Goede1-8/+0
When using the snd-soc-sst-acpi driver then the compress-cpu-dai bits are not used, the cht_bsw_nau8824 machine-driver is the only BYT/CHT driver defining them. When using the snd-sof-acpi driver then the presence of the compress-cpu-dai bits breaks things because the sof topology file for by/cht devices does not contain routing info for them. Drop the compress-cpu-dai bits, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201206122436.13553-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-07ASoC: SOF: trace: Add runtime trace filtering mechanismKarol Trzcinski1-0/+224
The "filter" debugfs file defines the log levels used by the firmware and reported by sof-logger. The file contains the formatted entry list, where each entry follows the following syntax in plain text: log_level uuid_id pipe_id comp_id; This file may be updated by userspace applications such sof-logger, or directly by the user during debugging process. An unused (wildcard) pipe_id or comp_id value should be set to -1, uuid_id is hexadecimal value, so when unused then should be set to 0. When the file is modified, an IPC command is sent to FW with new trace levels for selected components in filter elements list. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20201204165014.2697903-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-07ASoC: pcm: send DAPM_STREAM_STOP event in dpcm_fe_dai_shutdownRanjani Sridharan1-0/+3
A recent change removed the call to send the DAPM_STREAM_STOP event in dpcm_fe_dai_shutdown. But this causes a regression when a PCM prepare is not paired with a hw_free. So, add the DAPM_STREAM_STOP event back to dpcm_fe_dai_shutdown() to fix this. The new sequence would be: soc_pcm_prepare() -> SND_SOC_DAPM_STREAM_START soc_pcm_hw_free() -> soc_pcm_hw_free() -> SND_SOC_DAPM_STREAM_STOP dpcm_fe_dai_shutdown() -> SND_SOC_DAPM_STREAM_STOP Note that the DAPM_STREAM_STOP will be called twice but it seems harmless. Fixes: a27b421f1d04 ('ASoC: pcm: call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean') Reported-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201202193343.912942-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-05ASoC: qcom: fix QDSP6 dependencies, attempt #3Arnd Bergmann1-0/+1
The previous fix left another warning in randconfig builds: WARNING: unmet direct dependencies detected for SND_SOC_QDSP6 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] && COMMON_CLK [=n] Selected by [y]: - SND_SOC_MSM8996 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] Add one more dependency for this one. Fixes: 2bc8831b135c ("ASoC: qcom: fix SDM845 & QDSP6 dependencies more") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20201203231443.1483763-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-05ASoC: fsl_aud2htx: mark PM functions as __maybe_unusedArnd Bergmann1-2/+2
When CONFIG_PM is disabled, we get a warning for unused functions: sound/soc/fsl/fsl_aud2htx.c:261:12: error: unused function 'fsl_aud2htx_runtime_suspend' [-Werror,-Wunused-function] static int fsl_aud2htx_runtime_suspend(struct device *dev) sound/soc/fsl/fsl_aud2htx.c:271:12: error: unused function 'fsl_aud2htx_runtime_resume' [-Werror,-Wunused-function] static int fsl_aud2htx_runtime_resume(struct device *dev) Mark these as __maybe_unused to avoid the warning without adding an #ifdef. Fixes: 8a24c834c053 ("ASoC: fsl_aud2htx: Add aud2htx module driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/20201203222900.1042578-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-05ASoC: intel: sof_rt5682: Add support for tgl_rt1011_rt5682Brent Lu6-7/+201
This patch adds the driver data for two rt1011 speaker amplifiers on SSP1 and rt5682 on SSP0 for TGL platform. DAI format for rt1011 is leveraged from cml_rt1011_rt5682 which is 4-slot tdm with 100fs bclk. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201203154010.29464-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-05ASoC: atmel: mchp-spdifrx needs COMMON_CLKArnd Bergmann1-0/+1
Compile-testing this driver on an older platform without CONFIG_COMMON_CLK fails with ERROR: modpost: "clk_set_min_rate" [sound/soc/atmel/snd-soc-mchp-spdifrx.ko] undefined! Make this is a strict dependency. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20201203223815.1353451-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>