aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-09-23ASoC: SOF: Intel: use power_down_dsp op in hda_dsp_removeFred Oh1-3/+3
Use power_down_dsp op to differentiate power down sequences in platforms. Signed-off-by: Fred Oh <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: SOF: Intel: mtl: define and set power_down_dsp opFred Oh1-0/+28
For MTL platform, dsp cores need to go power down first then dsp subsystem also need to set power down. Signed-off-by: Fred Oh <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: SOF: Intel: define and set power_down_dsp op for HDA platformsFred Oh7-0/+18
hda_power_down_dsp is set for power_down_dsp op for all HDA platforms. Signed-off-by: Fred Oh <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: SOF: Intel: introduce new op to handle dsp power downFred Oh1-0/+1
DSP core power down sequences are different between cavs platforms and MTL. Signed-off-by: Fred Oh <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8186-rt5682: Expose individual headset jack pinsNícolas F. R. A. Prado1-2/+15
The rt5682 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8186-rt5682 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8186-rt5682: Add headset widgets with switchesNícolas F. R. A. Prado1-0/+8
Add DAPM widgets for headphones and headset microphone, with matching switches, to allow toggling these paths based on the jack connection status. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8186-da7219: Expose individual headset jack pinsNícolas F. R. A. Prado1-2/+15
The da7219 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8186-da7219 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8186-da7219: Add headset widgets with switchesNícolas F. R. A. Prado1-0/+8
Add DAPM widgets for headphones and headset microphone, with matching switches, to allow toggling these paths based on the jack connection status. Note that differently from others (mt8192, mt8195 and mt8186-rt5682), the widget here is named "Headphones" (with an 's'), since "Headphone Switch" was already registered by da7219. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8195: Expose individual headset jack pinsNícolas F. R. A. Prado1-2/+15
The rt5682 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8195 ASoC driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-23ASoC: mediatek: mt8192-mt6359: Expose individual headset jack pinsNícolas F. R. A. Prado1-2/+15
The rt5682 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8192-mt6359 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Tested-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-22ASoC: SOF: pci-tgl: add missing PCI IDs for RPLPierre-Louis Bossart1-0/+4
Add IDs for RPL-M and RPL-PX Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-22ASoC: SOF: Intel: pci-tgl: reorder PCI IDsPierre-Louis Bossart1-2/+2
No functionality change, just sort ADL PCI IDs by increasing order. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: SOF: mediatek: add pcm_pointer callback for mt8186Chunxu Li1-0/+33
add pcm_pointer callback for mt8186 to support read host position from DSP Signed-off-by: Chunxu Li <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: ts3a227e control debounce timesMark Brown3-36/+149
Merge series from Astrid Rost <[email protected]>: Add debounce support to the ts3a227e driver.
2022-09-21ASoC: SOF: ipc4-topology: Free the ida when IPC fails in sof_ipc4_widget_setup()Peter Ujfalusi1-1/+8
The allocated ida needs to be freed up if the IPC message fails since next time when we try again to set up the widget we are going to try to allocate another ID and given enough tries, we are going to run out of unique IDs. Fixes: 711d0427c713 ("ASoC: SOF: ipc4-topology: move ida allocate/free to widget_setup/free") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: sunxi: fix declaration compile errorZeng Heng1-1/+1
Just fix compile error without any logic changes. sound/soc/sunxi/sun50i-dmic.c:62:1: error: ‘static’ is not at beginning of declaration [-Werror=old-style-declaration] 62 | const static struct dmic_rate dmic_rate_s[] = { | ^~~~~ Signed-off-by: Zeng Heng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: ti,ts3a227e: add control of debounceAstrid Rost1-0/+29
Add devicetree parameters to control the insertion, release and press debounce times. Signed-off-by: Astrid Rost <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: ti,ts3a227e: convert to yamlAstrid Rost2-30/+65
Convert from ts3a227e.txt to yaml. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: ts3a227e: add parameters to control debounce timesAstrid Rost1-6/+55
Add devicetree parameters to control the insert, release and press debounce times. Signed-off-by: Astrid Rost <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-21ASoC: SOF: Add SKL/KBL support for IPC4 CI testsMark Brown9-2/+841
Merge series from Pierre-Louis Bossart <[email protected]>: This patchset was submitted earlier in April 2022 as part of the "ASoC: SOF: add INTEL_IPC4 plumbing" series. As requested the SKL/KBL support is moved to a different series. This update adds minor style fixes and the ops that were missing at the time. SKL and KBL daily tests have been running for several months and helped identify missing sequences in the SOF driver for HDaudio links, or platform differences that the driver did not account for (number of pipelines, etc). Note that this capability is not recommended for any distribution, it is ONLY for SOF IPC4 CI tests on HDaudio devices, we will not extend this SKL/KBL support for I2S devices based on ES8336 or Chromebooks which are ONLY supported by the AVS driver.
2022-09-21ADD SOF support for rembrandt platformMark Brown18-151/+653
Merge series from V sujith kumar Reddy <[email protected]>: This series consists of 1.Make ACP core code generic for newer SOC transition 2.Add support for Rembrandt plaform 3.Adding amd HS functionality to the sof core 4.increase SRAM inbox and outbox size to 1024
2022-09-21Add some models into acp6x quirk listMark Brown1-0/+14
Merge series from Mario Limonciello <[email protected]>: Another model from ASUS and Lenovo have been identified that don't include anything in ACPI tables to indicate they require the ACP6x DMIC driver to be loaded. This series adds them both to the quirk list.
2022-09-20ASoC: rt5682s: simplify the return of rt5682s_probe()Yang Yingliang1-6/+1
After commit bfc5e8b860ad ("ASoC: rt5682s: Reduce coupling of Micbias and Vref2 settings"), the return of rt5682s_probe() can be simplified. No functional changed. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: ipc4-topology: minor cleanupMark Brown1-3/+2
Merge series from Pierre-Louis Bossart <[email protected]>: Two updates on warnings reported by cppcheck.
2022-09-20ASoC: SOF: sof-audio: fix prepare/unprepareMark Brown1-5/+7
Merge series from Pierre-Louis Bossart <[email protected]>: 2 patches from Rander required to enable mixing usages with multiple pipelines.
2022-09-20ASoC: soc.h: random cleanupMark Brown9-42/+39
Merge series from Kuninori Morimoto <[email protected]>: These are random cleanup for soc.h
2022-09-20ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks tableMario Limonciello1-0/+7
Lenovo Yoga Slim 7 Pro X has an ACP DMIC that isn't specified in the ASL or existing quirk list. Add it to the quirk table to let DMIC work on these systems. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216299 Tested-by: Sebastian S <[email protected]> Reported-and-tested-by: Travis Glenn Hansen <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: amd: yc: Add ASUS UM5302TA into DMI tableXiaoyan Li1-0/+7
ASUS Zenbook S 13 OLED (UM5302TA) needs this quirk to get the built-in microphone working properly. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216270 Signed-off-by: Xiaoyan Li <[email protected]> Suggested-by: Mario Limonciello <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: amd: increase SRAM inbox and outbox size to 1024V sujith kumar Reddy6-17/+48
Increase inbox and outbox mailbox size from 512 to 1024 to support thirdparty DTS integration ipc tx/rx messages communication. This is done through firmware window get info. Signed-off-by: V sujith kumar Reddy <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: Adding amd HS functionality to the sof coreV sujith kumar Reddy4-0/+45
Add I2S HS control instance to the sof core. This will help the amd topology to use the I2S HS Dai. Signed-off-by: V sujith kumar Reddy <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: amd: Add support for Rembrandt plaform.V sujith kumar Reddy7-1/+351
Add pci driver and platform driver to enable SOF support on ACP6x architecture based Rembrandt platform. Signed-off-by: Ajit Kumar Pandey <[email protected]> Signed-off-by: V sujith kumar Reddy <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: amd: Make ACP core code generic for newer SOC transitionAjit Kumar Pandey10-134/+210
Newer AMD SOC differs slightly in terms of few registers offset and configuration. Add offsets into chip_info struct to make core ACP code more generic and resusable on newer SOC. Signed-off-by: Ajit Kumar Pandey <[email protected]> Signed-off-by: V sujith kumar Reddy <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: Intel: soc-acpi-intel-rpl-match: add rpl_sdca_3_in_1 supportBard Liao1-0/+80
Add rpl_sdca_3_in_1 match information. Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: codecs: tfa989x: fix register access commentsAlexander Martinz1-2/+2
Fix comments regarding register access based on review feedback[1]. [1]: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Alexander Martinz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: ipc4-topology: remove useless assignmentPierre-Louis Bossart1-2/+1
cppcheck warning: sound/soc/sof/ipc4-topology.c:1533:12: style: Variable 'pipeline' is assigned a value that is never used. [unreadVariable] pipeline = pipe_widget->private; ^ Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Chao Song <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: ipc4-topology: clarify calculation precedencePierre-Louis Bossart1-1/+1
cppcheck warning: sound/soc/sof/ipc4-topology.c:334:64: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0; ^ Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Chao Song <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: don't unprepare widget used other pipelinesRander Wang1-2/+2
If multiple pipeline are mixed into one, we can't unprepare the widget used by other pipelines. This patch checks use_count to address this case. Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Rander Wang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: clear prepare state when widget is unpreparedRander Wang1-5/+7
Playback can't work after the first try sometimes. The reason is that some widgets don't have ipc_unprepare ops and driver will jump to sink_prepare so miss to set prepare state to false. Next time these widgets will not be prepared and it will result to error with different format of audio file since the last setting is not applicable. This patch makes sure that widget prepare state will be cleared to false when it is unprepared. Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Rander Wang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: Intel: add ops for SKL/KBLPierre-Louis Bossart2-9/+57
Add ops and ops_init for SKL and KBL. Tested on Dell XPS-13-9350 and KBL NUC. Note: currently only SOF_IPC4_MTRACE_INTEL_CAVS_2 type is supported by the ipc4-mtrace driver, which is used by CAVS 2.x platforms (ICL, TGL, ADL) and ACE (MTL). Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Péter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: Intel: add initial SKL/KBL hardware supportPierre-Louis Bossart8-5/+204
In preparation of the IPCv4 IPC support, this patch adds support for SkyLake and KabyLake boot and descriptors used when probing the PCI driver. The work was initially contributed in 2018 by Liam Girdwood and Zhu Yingjiang, and abandoned due to firmware signature issues. With the upcoming support of IPC v4, and hence the Intel closed-source firmware, it's time to re-add this capability. The SKL ops will be added in the next patch. Tested with the IPC4 and closed-source firmware on Dell XPS 9350 and KBL NUC with HDaudio codecs. The SSP and DMIC interfaces are not supported at this time. Co-developed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: Intel: add SKL/KBL hardware code loaderPierre-Louis Bossart2-0/+589
This patch adds support for the SkyLake and KabyLake code loader on top of the SOF IPC4. The work was initially contributed in 2018 by Liam Girdwood and Zhu Yingjiang, and abandoned due to firmware signature issues. With the existing support of IPC v4, it's time to re-add this capability. This patch uses the newly added FSR (Firmware State Register) definitions for DSP state handling and targeting, ass well as new state definition for SKL which indicates that the firmware has been started (similar to FW_ENTERED on other platforms). Co-developed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Co-developed-by: Peter Ujfalusi <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: Intel: hda-dsp: expose functions for SKL supportPierre-Louis Bossart2-2/+5
In preparation of the IPCv4 IPC support, this patch adds exposes two functions required by the SKL/KBL boot and code loader. Co-developed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20Support for CS42L83 on Apple machinesMark Brown9-126/+529
Merge series from Martin Povišer <[email protected]>: there's a CS42L83 headphone jack codec found in Apple computers (in the recent 'Apple Silicon' ones as well as in earlier models, one example [1]). The part isn't publicly documented, but it appears almost identical to CS42L42, for which we have a driver in kernel. This series adapts the CS42L42 driver to the new part, and makes one change in anticipation of a machine driver for the Apple computers. Patch 1 adds new compatible to the cs42l42 schema. Patches 2 to 7 are taken from Richard's recent series [2] adding soundwire support to cs42l42. They are useful refactorings to build on in the later patches, and also this way our work doesn't diverge. (I fixed missing free_irq path in cs42l42_init, did s/Soundwire/SoundWire/ in changelogs, rebased.) Patch 8 exports some regmap-related symbols from cs42l42.c so they can be used to create cs42l83 regmap in cs42l83-i2c.c later. Patch 9 is the cs42l83 support proper. Patch 10 implements 'set_bclk_ratio' on the cs42l42 core. This will be called by the upcoming ASoC machine driver for 'Apple Silicon' Macs. (We have touched on this change to be made in earlier discussion, see [3] and replies.) Patch 11 brings cs42l42-i2c.c in sync with cs42l83-i2c.c on dev_err_probe() usage.
2022-09-20ASoC: SOF: Intel: override mclk_id for ES8336 supportMark Brown8-5/+143
Merge series from Pierre-Louis Bossart <[email protected]>: This patchset solves a known issue with ES8336 platforms wrt MCLK selection. Most of the devices use the MCLK0 signal, but some devices do use the MCLK1 signal. The MCLK is defined in the topology, it would be a nightmare to generate more topology files just for one MCLK difference. With a minor extension to the intel-nhlt library, the MCLK information can be found by parsing the NHLT table, and we can override the mclk_id at boot time. The only known issues for this platform remain the detection of GPIO and microphone connections, currently only possible with manual quirks. Thanks to Eugene J. Markow for testing this patchset.
2022-09-20ASoC: SOF: Intel: hda: override mclk_id after parsing NHLT SSP blobPierre-Louis Bossart1-0/+28
The NHLT is already used to determine which SSP is connected to an audio codec, we can parse the SSP blob to get the mclk_id from NHLT. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ALSA: hda: intel-nhlt: add intel_nhlt_ssp_mclk_mask()Pierre-Louis Bossart2-0/+86
SOF topologies hard-code the MCLK used for SSP connections. That was a bad idea in hindsight, this information should really come from BIOS and/or machine driver. This patch introduces a helper to scan all SSP endpoints connected to a codec, and all formats to see what MCLK is used. When BIT(0) of the mdivc offset if set in the SSP blob, MCLK0 is used, and likewise when BIT(1) is set MCLK1 is used. The case where both MCLKs are used is possible but has never been seen in practice so should be treated as an error by the caller. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: soc.h: use array instead of playback/capture_widgetKuninori Morimoto2-11/+12
snd_soc_pcm_runtime has playback/capture_widget for Codec2Coddec. The naming is unclear. This patch names it as c2c_widget and uses array. struct snd_soc_pcm_runtime { ... => struct snd_soc_dapm_widget *playback_widget; => struct snd_soc_dapm_widget *capture_widget; ... } Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: soc.h: use defined number instead of direct numberKuninori Morimoto1-1/+1
snd_soc_pcm_runtime has dpcm for Playback/Capture, but it is defined directly "2". It should use defined number. struct snd_soc_pcm_runtime { ... => struct snd_soc_dpcm_runtime dpcm[2]; ... } This patch fixup it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: soc.h: remove num_cpus/codecsKuninori Morimoto9-30/+26
Current rtd has both dai_link pointer (A) and num_cpus/codecs (B). (A) rtd->dai_link = dai_link; (B) rtd->num_cpus = dai_link->num_cpus; (B) rtd->num_codecs = dai_link->num_codecs; But, we can get num_cpus/codecs (B) via dai_link (A). This means we don't need to keep num_cpus/codecs on rtd. This patch removes these. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-09-20ASoC: SOF: mediatek: add pcm_hw_params callback for mt8186Chunxu Li1-0/+11
add pcm_hw_params callback for mt8186 to support continue update dma host position Signed-off-by: Chunxu Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>