aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-12ASoC: SOF: Abstractions for top-level IPC opsMark Brown6-880/+880
Merge series from Ranjani Sridharan <[email protected]>: This series is continuation of the IPC abstraction in the SOF driver in preparation for supporting the new IPC supported by the SOF firmware. It introduces abstraction for top-level IPC ops for sending/receiving regular and large IPC's. Peter Ujfalusi (15): ASoC: SOF: Add helper function to prepare and send an IPC message ASoC: SOF: Add high level IPC IO callback definitions to ipc_ops ASoC: SOF: ipc3: Implement the tx_msg IPC ops ASoC: SOF: ipc3: Use sof_ipc3_tx_msg() internally for message sending ASoC: SOF: ipc3: Implement the set_get_data IPC ops ASoC: SOF: ipc3: Implement the get_reply IPC ops ASoC: SOF: ipc3: Implement rx_msg IPC ops ASoC: SOF: ipc: Separate the ops checks by functions/topics ASoC: SOF: ipc: Add check for mandatory IPC message handling ops ASoC: SOF: ipc: Use the get_reply ops in snd_sof_ipc_get_reply() ASoC: SOF: ipc: Switch over to use the tx_msg and set_get_data ops ASoC: SOF: ipc: Switch over to use the rx_msg ops ASoC: SOF: Add widget_kcontrol_setup control ops for IPC3 ASoC: SOF: sof-audio: Use the widget_kcontrol_setup ops for kcontrol set up ASoC: SOF: ipc: Move the ipc_set_get_comp_data() local to ipc3-control sound/soc/sof/ipc.c | 858 ++--------------------------------- sound/soc/sof/ipc3-control.c | 131 +++++- sound/soc/sof/ipc3.c | 682 +++++++++++++++++++++++++++- sound/soc/sof/sof-audio.c | 54 +-- sound/soc/sof/sof-audio.h | 7 +- sound/soc/sof/sof-priv.h | 28 +- 6 files changed, 880 insertions(+), 880 deletions(-) -- 2.25.1
2022-04-12Allow detecting ACP6x DMIC via _DSDMark Brown1-4/+38
Merge series from Mario Limonciello <[email protected]>: It's not possible to probe for the presence of a DMIC, so the ACP6x machine driver currently has a hardcoded list of all the systems known to have a DMIC connected to the ACP. Although this design works it means that the acp6x driver needs to always grow with more systems and worse, if an OEM introduces a new system there will be a mismatch in time that even if the driver (otherwise) works fine it needs their system added to the list to work. So this series introduces a _DSD that OEMs can populate into the BIOS to indicate presence of a DMIC.
2022-04-11ASoC: cs35l45: Make exports namespacedRichard Fitzgerald4-7/+12
Use the new EXPORT_SYMBOL_NS_GPL() for exports from the set of drivers for cs35l45. Signed-off-by: Richard Fitzgerald <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: tegra186_asrc: mark runtime-pm functions as __maybe_unusedYueHaibing1-2/+2
sound/soc/tegra/tegra186_asrc.c:90:12: error: ‘tegra186_asrc_runtime_resume’ defined but not used [-Werror=unused-function] static int tegra186_asrc_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/tegra/tegra186_asrc.c:80:12: error: ‘tegra186_asrc_runtime_suspend’ defined but not used [-Werror=unused-function] static int tegra186_asrc_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused to avoid this kind of warning. Fixes: a2df8c2d5b36 ("ASoC: tegra: Add Tegra186 based ASRC driver") Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Sameer Pujar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: amd: yc: add new YC platform varaint supportVijendar Mukunda1-2/+7
Update PCI revision id check for the new YC platform varaint. Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: uda1380: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: ts3a227e: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: tlv320*: use simple i2c probe functionStephen Kitt3-9/+6
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: tda7419: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: tas*: use simple i2c probe functionStephen Kitt5-15/+10
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: sta*: use simple i2c probe functionStephen Kitt3-9/+6
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: pcm*: use simple i2c probe functionStephen Kitt5-15/+10
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: nau8*: use simple i2c probe functionStephen Kitt6-18/+12
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: ml26124: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: max9*: use simple i2c probe functionStephen Kitt12-35/+24
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: lm4857: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: es83*: use simple i2c probe functionStephen Kitt2-6/+4
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: cx2072x: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: ak4*: use simple i2c probe functionStephen Kitt4-12/+8
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: amd: Add support for enabling DMIC on acp6x via _DSDMario Limonciello1-0/+13
Currently the acp6x machine driver requires a hardcoded list of systems that physically have DMIC connected. To avoid having to continually add to an evergrowing list of systems add support for a _DSD that can advertise this. OEMs can add this _DSD to their BIOS under the ACP device to automatically add the device to this driver without requiring any driver modifications. Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: amd: Add driver data to acp6x machine driverMario Limonciello1-4/+25
Currently all of the quirked systems use the same card and so the DMI quirk list doesn't contain driver data. Add driver data to these quirks and then check the data was present or not. This will allow potentially setting quirks for systems with faulty firmware that claims to have a DMIC but doesn't really. Signed-off-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-11ASoC: SOF: ipc: Move the ipc_set_get_comp_data() local to ipc3-controlPeter Ujfalusi3-97/+88
The snd_sof_ipc_set_get_comp_data() only used for kcontrol data update and it is an IPC3 message parsing function. Move it out from the generic ipc.c to ipc3-control.c and rename it to better describe it's function. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: sof-audio: Use the widget_kcontrol_setup ops for kcontrol set upPeter Ujfalusi1-50/+4
Remove the local implementation and switch to the IPC neutral ops to set up the kcontrols associated with the swidget. The set up call uses snd_sof_ipc_set_get_comp_data() which is largely an IPC3 parsing function. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: Add widget_kcontrol_setup control ops for IPC3Peter Ujfalusi2-0/+40
Define and set the widget_kcontrol_setup control IPC ops for IPC3. The widget_kcontrol_setup callback can be used to set up all kcontrols associated with the swidget. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc: Switch over to use the rx_msg opsPeter Ujfalusi2-453/+4
Use the new ops for handling message reception. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc: Switch over to use the tx_msg and set_get_data opsPeter Ujfalusi1-278/+23
Use the new ops for sending messages and to handle large component data set get operation. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc: Use the get_reply ops in snd_sof_ipc_get_reply()Peter Ujfalusi1-48/+2
Use the get_reply ops to allow IPC dependent handling of the reply message. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc: Add check for mandatory IPC message handling opsPeter Ujfalusi1-0/+5
Make sure that the mandatory IPC message handling ops are provided by the IPC implementation. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc: Separate the ops checks by functions/topicsPeter Ujfalusi1-3/+9
Separate the mandatory ops checks by topics (pcm and topology for now) to be able to provide intuitive feedback on the possible missing ops and to make it easier to add new mandatory ops checks in the future. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc3: Implement rx_msg IPC opsPeter Ujfalusi1-0/+212
Add the implementation for the rx_msg callback to handle message reception for IPC3. The implementation is equivalent to the currently used code in ipc.c Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc3: Implement the get_reply IPC opsPeter Ujfalusi1-0/+55
Add the implementation for the get_reply callback to copy the reply message from mailbox to msg->reply_data buffer. The implementation is equivalent to the currently used code in ipc.c Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc3: Implement the set_get_data IPC opsPeter Ujfalusi1-0/+103
Add the implementation for the set_get_data callback for handling large data set and get. The set_get_data() in IPC3 can be used only for component messages. The function expects the caller to prepare the message behind the data pointer for sending/receiving data. The callback only implements the needed code to be able to split up a message if needed for transfer. The set_get_data ops is based on the existing snd_sof_ipc_set_get_comp_data() and sof_set_get_large_ctrl_data() but made it generic entry point. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc3: Use sof_ipc3_tx_msg() internally for message sendingPeter Ujfalusi1-2/+2
Instead of using sof_ipc_tx_message() for sending message, use the sof_ipc3_tx_msg() directly within ipc3.c Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: ipc3: Implement the tx_msg IPC opsPeter Ujfalusi1-0/+308
Add the implementation for the IPC3 tx_msg callback for sending a single IPC message. The implementation is equivalent to the currently used code in ipc.c Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: Add high level IPC IO callback definitions to ipc_opsPeter Ujfalusi1-0/+21
Add tx_msg(), rx_msg(), set_get_data() and get_reply() ops, which can be used as a generic API for sending, receiving single messages and to write and read large data. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-11ASoC: SOF: Add helper function to prepare and send an IPC messagePeter Ujfalusi2-0/+55
The new sof_ipc_send_msg() can be used by IPC dependent code to prepare the ipc->msg for a new message transmission and then call in to platform code to send the message. Higher level code should be handling the completion and reply. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Reviewed-by: Pierre-Louis Bossart <[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-04-08ASoC: update to support either TAS2764 or TAS2780Raphael-Xu1-8/+10
update tas27xx.yaml to support either TAS2764 or TAS2780 Signed-off-by: Raphael-Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-08ASoC: rename tas2764 to tas27xxRaphael-Xu1-0/+0
rename tas2764.yaml to tas27xx.yaml Signed-off-by: Raphael-Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-08ASoC: codecs: Fix an error handling path in (rx|tx|va)_macro_probe()Christophe JAILLET3-10/+26
After a successful lpass_macro_pds_init() call, lpass_macro_pds_exit() must be called. Add the missing call in the error handling path of the probe function and use it. Fixes: 9e3d83c52844 ("ASoC: codecs: Add power domains support in digital macro codecs") Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/5b5a015a9b1dc8011c6a4053fa49da1f2531e47c.1648969065.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <[email protected]>
2022-04-08ASoC: mediatek: mt8192: support rt1015p_rt5682sMark Brown3-79/+153
Merge series from Jiaxin Yu <[email protected]>: The series reuses mt8192-mt6359-rt1015-rt5682.c for supporting machine driver with rt1015p speaker amplifier and rt5682s headset codec.
2022-04-08ASoC: mediatek: mt8195: Make sure of_device_id table are NULL terminatedLv Ruyi1-0/+1
Fix the following coccicheck review: ./sound/soc/mediatek/mt8195/mt8195-mt6359.c:1657:1-2: mt8195_mt6359_dt_match is not NULL terminated at line 1657 Fixes: 86a6b9c9dfff ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682") Reported-by: Zeal Robot <[email protected]> Signed-off-by: Lv Ruyi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-04-08ASoC: Merge fixesMark Brown17-62/+207
Pull in wm8731 fix. Signed-off-by: Mark Brown <[email protected]>
2022-04-08ASoC: mediatek: mt8192: support rt1015p_rt5682sJiaxin Yu2-22/+40
Add support for using the rt5682s codec together with rt1015p on mt8192-mt6359 machines. All configurations are shared with the rt5682 codec variant, so simply select the SND_SOC_RT5682S config to ensure the codec is present and set the correct card name. The codec will be linked to by pointing to it in the headset-codec property in the devicetree. While at it, also create macros for the names of the different codec variants supported by this driver, as well as rename occurrences of rt1015p_rt5682 to rt1015p_rt5682x, since they are shared between rt5682 and rt5682s. Signed-off-by: Jiaxin Yu <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Nícolas F. R. A. Prado <[email protected]> Tested-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-04-08ASoC: mediatek: mt8192: refactor for I2S8/I2S9 DAI links of headsetJiaxin Yu1-8/+26
As part of the refactoring to allow the same machine driver to be used for the rt1015(p) and rt5682(s) codecs on the MT8192 platform, parse the rt5682(s) codec from the headset-codec property in the devicetree and wire it to the I2S8 and I2S9 backends. Signed-off-by: Jiaxin Yu <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Nícolas F. R. A. Prado <[email protected]> Tested-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-04-08ASoC: mediatek: mt8192: refactor for I2S3 DAI link of speakerJiaxin Yu1-51/+57
As part of the refactoring to allow the same machine driver to be used for the rt1015(p) and rt5682(s) codecs on the MT8192 platform, parse the rt1015(p) codecs from the speaker-codecs property in the devicetree and wire them to the I2S3 backend, instead of hardcoding the links and selecting through the compatible. Signed-off-by: Jiaxin Yu <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Reviewed-by: Nícolas F. R. A. Prado <[email protected]> Tested-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-04-08ASoC: dt-bindings: mt8192-mt6359: add new compatible and new propertiesJiaxin Yu1-0/+32
1. Adds new compatible string "mt8192_mt6359_rt1015p_rt5682s" for machines with rt1015p and rt5682s. 2. Adds new property "headset-codec" for getting headset codec. 3. Adds new property "speaker-codecs" for getting speaker codecs. Signed-off-by: Jiaxin Yu <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Nícolas F. R. A. Prado <[email protected]> Tested-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-04-08Make headphone work on Huawei Matebook D15Mark Brown1-28/+89
Merge series from Mauro Carvalho Chehab <[email protected]>: Huawei Matebook D15 uses two different GPIOs are used to control the output: - gpio0 controls the speaker output; - gpio1 controls the headphone output. Changing both at the same time cause spurious events that are mis-interpreted as input events, causing troubles on apps. So, a delay is needed before turning on such gpios. Also, the headset microphone is connected to MIC1, instead of MIC2 port. With this patch, plugging a headphone causes a jack event to trigger the speaker supply, powering down the speaker and powering up the headphone output. Removing the headphone also triggers the power supply, powering up the speaker and powering down the headphone. The headset microphone also works.
2022-04-07ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15Mauro Carvalho Chehab1-0/+9
Based on experimental tests, Huawei Matebook D15 actually uses both gpio0 and gpio1: the first one controls the speaker, while the other one controls the headphone. Also, the headset is mapped as MIC1, instead of MIC2. So, add a quirk for it. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/d678aef9fc9a07aced611aa7cb8c9b800c649e5a.1649357263.git.mchehab@kernel.org Signed-off-by: Mark Brown <[email protected]>
2022-04-07ASoC: Intel: sof_es8336: add a quirk for headset at mic1 portMauro Carvalho Chehab1-3/+16
The headset/internal mic can either be routed as mic1/mic2 or vice-versa. By default, the driver assumes that the headset is mapped as mic2, but not all devices map this way. So, add a quirk to support changing it to mic1, using mic2 for the internal analog mic (if any). Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/5d88fc29b79be7ab77dae391c8e5ee929fd36c27.1649357263.git.mchehab@kernel.org Signed-off-by: Mark Brown <[email protected]>
2022-04-07ASoC: Intel: sof_es8336: support a separate gpio to control headphoneMauro Carvalho Chehab1-10/+49
Some devices may use both gpio0 and gpio1 to independently switch the speaker and the headphone. Add support for that. Acked-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/535454c0c598a8454487fe29b164527370e2db81.1649357263.git.mchehab@kernel.org Signed-off-by: Mark Brown <[email protected]>