aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/sof_rt5682.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-10-29ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682sBrent Lu1-30/+0
Use comp_ids field to enumerate rt5682/rt5682s headphone codec for JSL/TGL/ADL devices and remove redundant entries in tables. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-4-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: sof_rt5682: detect codec variant in probe functionBrent Lu1-0/+4
Detect whether the headphone codec is ALC5682I-VS or not in probe function so we don't need to duplicate all board configs for this new variant. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-01ASoC: Intel: sof_rt5682: Add support for max98360a speaker ampMalik_Hsu1-0/+11
Add a board config adl_mx98360a_rt5682 to support alc5682 headset codec and max98360a speaker amplifier. Follow Intel BT offload design by connecting alc5682 to SSP0 and max98360a to SSP1. Signed-off-by: Malik_Hsu <malik_hsu@wistron.corp-partner.google.com> 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/20211001150316.414141-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-28ASoC: intel: sof_rt5682: update platform device name for Maxim amplifierBrent Lu1-4/+4
To follow 20-character length limitation of platform device name, we have only 7 character space for amplifier. Therefore, the last character of mx98357a and mx98360a is removed to save space. Signed-off-by: Brent Lu <brent.lu@intel.com> Fixes: e224ef76fa8a ('ASoC: intel: sof_rt5682: support jsl_rt5682s_mx98360a board') Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210927143249.439129-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_mx98360a boardBrent Lu1-0/+10
This patch adds driver data for two MAX98360A speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_mx98360a since the capability of two ALC5682 variants is the same. 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/20210914101847.778688-5-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015 boardBrent Lu1-0/+10
This patch adds driver data for two ALC1015Q-CG speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_rt1015 since the capability of two ALC5682 variants is the same. 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/20210914101847.778688-4-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: intel: sof_rt5682: support jsl_rt5682s_rt1015p boardBrent Lu1-0/+10
This patch adds driver data for two ALC1015Q-VB speaker amplifiers on SSP1 and one ALC5682I-VS headphone codec on SSP0 for JSL platform. Topology is leveraged from jsl_rt5682_rt1015p since the capability of two ALC5682 variants is the same. 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/20210914101847.778688-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-15ASoC: Intel: sof_rt5682: support ALC5682I-VS codecBrent Lu1-18/+57
Add a new quirk SOF_RT5682S_HEADPHONE_CODEC_PRESENT to support ALC5682I-VS headphone codec which driver is a new one, rt5682s, with new macros and functions. 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/20210914101847.778688-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-03ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variantjairaj arava1-0/+14
DMI product name is used to support system variants based on adl_mx98373_rt5682 in current implementation. Replace this DMI search with DMI_OEM_STRING and coreboot(BIOS used in these systems) is setting the needed DMI_OEM_STRING field to uniquely identify these systems. Reviewed-by: Bard Liao <bard.liao@intel.com> Signed-off-by: jairaj arava <jairaj.arava@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210802152151.15832-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-07-14ASoC: Intel: sof_rt5682: code refactor for max98360aBrent Lu1-51/+1
Refactor the machine driver by using the common code in maxim-common module to support max98360a. Reviewed-by: Bard Liao <bard.liao@intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210712203240.46960-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-22ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tablesPierre-Louis Bossart1-10/+0
When we have a platform_device_id table, we can use MODULE_DEVICE_TABLE to automatically generate the modalias. As a result we can remove the manual insertion of MODULE_ALIAS. Reported-by: Hulk Robot <hulkci@huawei.com> Suggested-by: Zou Wei <zou_wei@huawei.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210621194057.21711-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-22ASoC: Intel: sof_rt5682: shrink platform_id names below 20 charactersPierre-Louis Bossart1-10/+10
Some Chromebooks machine driver aliases exceed 20 characters, which leads to sparse warnings: sound/soc/intel/boards/sof_rt5682.c:959:25: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/sof_rt5682.c:989:25: error: too long initializer-string for array of char(no space for nul char) sound/soc/intel/boards/sof_rt5682.c:1039:25: error: too long initializer-string for array of char(no space for nul char) Fix by using the 'mx' shortcut for Maxim platforms (already used in platform firmware) Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20210621194057.21711-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-14ASoC: intel/boards: add missing MODULE_DEVICE_TABLEZou Wei1-0/+1
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Link: https://lore.kernel.org/r/1620791647-16024-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: sof_rt5682: code refactor for max98357aBrent Lu1-12/+24
Refactor the machine driver by using the common code in maxim-common module to support max98357a. Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: sof_rt5682: Enable Bluetooth offload on tgl and adlYong Zhi1-4/+12
Enable BT audio offload for TGL/ADL drivers with the following board configs specifically: SSP0 - Headsets SSP1 - Speaker amps SSP2 - Bluetooth audio Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: boards: remove .nonatomic for BE dailinksPierre-Louis Bossart1-2/+0
Somehow with copy/paste and inertia we keep re-adding this field for BE dailinks, when it's only required for hard-coded FE links. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: boards: create sof-maxim-common modulePierre-Louis Bossart1-2/+3
sof_maxim_common.o is linked twice, move to a dedicated module. Also clean-up interfaces to use a consistent 'max_98373' prefix for all symbols. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: boards: handle hda-dsp-common as a modulePierre-Louis Bossart1-0/+1
hda-dsp-common.o is linked multiple times due to copy/paste and inertia. Move to a dedicated module with a namespace. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: boards: add support for adl boards in sof-rt5682Vamshi Krishna Gopal1-0/+19
ADL customer boards are with below 2 configurations Board 1: RT5682 on SSP0 and MAX98373 on SSP1 Board 2: RT5682 on SSP0 and MAX98357A on SSP2 Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: Intel: Boards: tgl_max98373: Add BT offload supportYong Zhi1-0/+42
BT audio offload is internally configured with virtual GPIOs, the port assignment is fixed on SSP2 for TGL/ADL platforms. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-22ASoC: intel: sof_rt5682: use the topology mclkKeyon Jie1-2/+14
We should use the topology configured mclk if it existed, which can make sure we are aligned with the FW side about the mclk usage. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@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/20210319124950.3853994-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-18ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp supportBrent Lu1-2/+17
This patch adds jsl_rt5682_rt1015p which supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform. This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers. | ALC1015Q-CG | ALC1015Q-VB ===================================== I2C | Yes | No Auto-mode | 48K, 64fs | 16k, 32fs | 48k, 32fs | 48k, 64fs 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/20210317110824.20814-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-05ASoC: rt1015: remove bclk_ratioTzung-Bi Shih1-7/+0
bclk_ratio is unused. Removes bclk_ratio and .set_bclk_ratio callback. Removes snd_soc_dai_set_bclk_ratio() in a few machine drivers which are obviously using rt1015. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224101854.3024823-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-04ASoC: intel: sof_rt5682: Add support for tgl_rt1011_rt5682Brent Lu1-4/+22
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-11-12ASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_ampDharageswari R1-0/+2
Smart_amp_speaker device has the playback stream and capture stream associated to it. Hence add the dpcm_capture = 1 flag while dailink creation. This patches fixes: ERR kernel [timestamp] SSP1-Codec: ASoC: no backend capture stream Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201109210958.84198-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-30ASoC: intel: sof_rt5682: Add quirk for DoolyBrent Lu1-0/+18
This DMI product family string of this board is "Google_Hatch" so the DMI quirk will take place. However, this board is using rt1015 speaker amp instead of max98357a specified in the quirk. Therefore, we need an new DMI quirk for this board. 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/20201030170559.20370-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-30ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682Brent Lu1-5/+42
This patch adds the driver data and updates quirk info for cml with rt1015 speaker amp and rt5682 headset codec. Due to different mclk frequency on JSL and CML, we need to use 4 slot TDM 100fs to avoid the SSP m/n counter. 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/20201030170559.20370-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-11ASoC: SOF: Intel: Use DMI oem string search for tgl_max98373_rt5682Sathyanarayana Nujella1-1/+1
DMI product name is used to support system variants based out of tgl_max98373_rt5682 in current implementation. Replace this DMI search with DMI_OEM_STRING. Coreboot(BIOS used in these systems) is setting the needed DMI_OEM_STRING field to uniquely identify these systems. Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200910162705.2026036-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-24ASoC: Intel: sof_rt5682: override quirk data for tgl_max98373_rt5682Sathyanarayana Nujella1-0/+13
A Chrome System based on tgl_max98373_rt5682 has different SSP interface configurations. Using DMI data of this variant DUT, override quirk data. Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200821195603.215535-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-27ASoC: intel/boards: use asoc_substream_to_rtd()Kuninori Morimoto1-2/+2
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87v9i9yddc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-20ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freqYong Zhi1-1/+8
In commit d696a61413b4 ("ASoC: rt1015: Add condition to prevent SoC providing bclk in ratio of 50 times of sample rate."), PLL input at 50fs is no longer supported, the new recommended settings at 48Khz rate are: PLL input SSP bclk ------------------------ 64fs 3.073Mhz 100fs 4.8Mhz (bclk update is reflected in topoplogy.) Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-26ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682Yong Zhi1-0/+23
Add support for max98360a speaker amp on SSP1 and ALC5682 on SSP0 for jsl+ platform. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200625191308.3322-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-26ASoC: Intel: Boards: tgl_max98373: add dai_trigger functionDharageswari R1-0/+9
Speaker amplifier feedback is not modeled as being dependent on any active output. Even when there is no playback happening, parts of the graph, specifically the IV sense->speaker protection->output remains active and this prevents the DSP from entering low-power states. This patch suggests a machine driver level approach where the speaker pins are enabled/disabled dynamically depending on stream start/stop events. DPAM graph representations show the feedback loop is indeed disabled and low-power states can be reached. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200625191308.3322-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-23ASoC: intel: sof_rt5682: move disabling jack to dai link's exit()Fred Oh1-16/+8
Move disabling jack from platform driver's remove() to dai link's exit(). This is symmetrical change as jack is enabled in init(). Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200622154241.29053-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-01ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-onlyPierre-Louis Bossart1-1/+1
Remove the ambiguity with GPL-2.0 and use an explicit GPL-2.0-only tag. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200501145850.15178-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto1-3/+3
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1xjir7a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-26ASoC: Intel: sof_rt5682: Add support for tgl-max98373-rt5682Sathyanarayana Nujella1-0/+21
This patch does the below: 1. Adds the driver data and updates quirk info for TGL with Max98373 speaker amp and ALC5682 headset codec. 2. Added max98373 speaker related code to common file for re-use. Signed-off-by: Jairaj Arava <jairaj.arava@intel.com> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200325213245.28247-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-13ASoC: Intel: sof_rt5682: Add rt1015 speaker amp supportYong Zhi1-5/+103
This patch adds jsl_rt5682_rt1015 which supports the RT5682 headset codec and RT1015 speaker amplifier combination on JasperLake platform. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-13ASoC: Intel: (cosmetic) simplify structure member accessGuennadi Liakhovetski1-1/+1
Fix a clumsy structure member dereference in all machine drivers. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-27ASoC: Intel: consistent HDMI codec probing codeGuennadi Liakhovetski1-7/+8
Multiple Intel ASoC machine drivers repeat the same pattern in their .late_probe() methods: they first check whether the common HDMI codec driver is used, if not, they proceed by linking the legacy HDMI driver to each HDMI port. While doing that they use some inconsistent code: 1. after the loop they check, whether the list contained at least one element and if not, they return an error. However, the earlier code to use the common HDMI driver uses the first element of the same list without checking. To fix this we move the check to the top of the function. 2. some of those .late_probe() implementations execute code, only needed for the common HDMI driver, before checking, whether the driver is used. Move the code to after the check. 3. Some of those functions also perform a redundant initialisation of the "err" variable. This patch fixes those issues. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200124213625.30186-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-06ASoC: Intel: sof_rt5682: Ignore the speaker amp when there isn't one.Sam McNally1-1/+8
Some members of the Google_Hatch family include a rt5682 jack codec, but no speaker amplifier. This uses the same driver (sof_rt5682) as a combination of rt5682 jack codec and max98357a speaker amplifier. Within the sof_rt5682 driver, these cases are not currently distinguishable, relying on a DMI quirk to decide the configuration. This causes an incorrect configuration when only the rt5682 is present on a Google_Hatch device. For CML, the jack codec is used as the primary key when matching, with a possible speaker amplifier described in quirk_data. The two cases of interest are the second and third 10EC5682 entries in snd_soc_acpi_intel_cml_machines[]. The second entry matches the combination of rt5682 and max98357a, resulting in the quirk_data field in the snd_soc_acpi_mach being non-null, pointing at max98357a_spk_codecs, the snd_soc_acpi_codecs for the matched speaker amplifier. The third entry matches just the rt5682, resulting in a null quirk_data. The sof_rt5682 driver's DMI data matching identifies that a speaker amplifier is present for all Google_Hatch family devices. Detect cases where there is no speaker amplifier by checking for a null quirk_data in the snd_soc_acpi_mach and remove the speaker amplifier bit in that case. Signed-off-by: Sam McNally <sammc@chromium.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200103124921.v3.1.Ib87c4a7fbb3fc818ea12198e291b87dc2d5bc8c2@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-09ASoC: intel: sof_rt5682: Add support for tgl-max98357a-rt5682Sathyanarayana Nujella1-0/+20
This patch adds the driver data and updates quirk info for tgl with max98357a speaker amp and ALC5682 headset codec. Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Jairaj Arava <jairaj.arava@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191126143205.21987-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-09ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI'sSathyanarayana Nujella1-3/+11
TGL supports one more HDMI DAI than previous models. So add quirk support for number of HDMI DAI's. Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Jairaj Arava <jairaj.arava@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191126143205.21987-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-11-06Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.5Mark Brown1-0/+9
2019-10-29ASoC: intel: sof_rt5682: common hdmi codec supportKai Vehmanen1-0/+11
Add support for using snd-hda-codec-hdmi driver for HDMI/DP instead of ASoC hdac-hdmi. This is aligned with how other HDA codecs are already handled. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191029134017.18901-9-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-29ASoC: intel - fix the card namesJaroslav Kysela1-1/+1
Those strings are exposed to the user space as the card name thus used in the GUIs. The common standard is to avoid '_' here. The worst case is 'sof-skl_hda_card' string. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Mark Brown <broonie@kernel.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191028164624.14334-1-perex@perex.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-18ASoC: Intel: sof-rt5682: add a check for devm_clk_getChuhong Yuan1-0/+9
sof_audio_probe misses a check for devm_clk_get and may cause problems. Add a check for it to fix the bug. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191017025044.31474-1-hslester96@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-01ASoC: intel: sof_rt5682: add remove function to disable jackJaska Uimonen1-0/+16
When removing sof module the rt5682 jack handler will oops if jack detection is not disabled. So add remove function, which disables the jack detection. Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190927201408.925-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-01ASoC: intel: sof_rt5682: use separate route map for dmicBard Liao1-4/+31
dmic map can only be added when dmic dai link is present. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190927201408.925-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-20Merge branch 'asoc-5.3' into asoc-5.4Mark Brown1-0/+4