summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/sof_rt5682.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Intel: sof_rt5682: Add HDMI-In capture with rt5682 support for ARL.Balamurugan C2024-09-121-0/+7
| | | | | | | | | | | Added match table entry on arl machines to support HDMI-In capture with rt5682 I2S audio codec. also added the respective quirk configuration in rt5682 machine driver. Signed-off-by: Balamurugan C <balamurugan.c@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20240912120308.134762-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: Constify struct snd_soc_opsChristophe JAILLET2024-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | Constifying "struct snd_soc_ops" moves some data to a read-only section, so increase overall security. This structure is also part of scripts/const_structs.checkpatch. As an example, on a x86_64, with allmodconfig: Before: text data bss dec hex filename 6315 3696 0 10011 271b sound/soc/intel/boards/ehl_rt5660.o After: text data bss dec hex filename 6379 3648 0 10027 272b sound/soc/intel/boards/ehl_rt5660.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://msgid.link/r/2f0613bf4c6018569cdaac876d0589e49cf38a80.1715622793.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use max_98373_dai_link functionBrent Lu2024-05-101-4/+1
| | | | | | | | | | | Use max_98373_dai_link() function to initialize dai link of maxim max98373 speaker amplifier. No functional change. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240509163418.67746-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for mtl boardsBrent Lu2024-05-101-15/+1
| | | | | | | | | | | | Since mtl chromebook is using DMI quirk for board config, changing the SSP port config of mtl_rt5682_def to RVP to simplify mtl board id and enumeration table. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240509163418.67746-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: remove DMI quirk for hatchBrent Lu2024-05-101-9/+0
| | | | | | | | | | | The quirk for cml chromebook hatch could be removed since we have cml_rt5682_def board id now. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240509163418.67746-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: support bclk as PLL source on rt5682sBrent Lu2024-04-291-8/+13
| | | | | | | | | | | | For rt5682s codec, we could use bclk as PLL source when the frequency is 3.072MHz but no 2.4MHz. Update the code to select correct pll_id and clk_id for 3.072MHz bclk. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: get bclk frequency from topologyBrent Lu2024-04-291-1/+6
| | | | | | | | | | | | A different bclk frequency 3.072MHz was introduced to tgl platform and is used in mtl topologies. Use SOF API to get frequency from topology instead of hardcoding. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: setup pll_id only when neededBrent Lu2024-04-291-29/+29
| | | | | | | | | | | The variable 'pll_id' is needed only when we use snd_soc_dai_set_pll() to setup PLL. Move the code segment to improve some readability. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: add driver_data to sof_rt5682 boardBrent Lu2024-04-291-10/+3
| | | | | | | | | | | | | Move default BYT/CHT quirk to driver_data of sof_rt5682 board. This fixes a problem that DMI quirk of Minnowboard board got overwritten in probe function since it's a BYT board. Fixes: c68e07970eca ("ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI's") Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add icl_rt5682_def for icl boardsBrent Lu2024-04-291-9/+5
| | | | | | | | | | | Add the board config icl_rt5682_def to rt5682 machine driver for all icl boards using default SSP port allocation (headphone codec on SSP0). Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: remove SOF_RT5682_MCLK_BYTCHT_ENBrent Lu2024-04-291-20/+19
| | | | | | | | | | | We don't need this quirk flag since 'is_legacy_cpu' will be true if this is a BYT/CHT board. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-rt5682: add mclk_en to sof_rt5682_privateBrent Lu2024-04-291-2/+5
| | | | | | | | | | | Add a variable mclk_en to sof_rt5682_private structure to reduce global variable access. No functional change. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: support MAX98357A on glk boardsBrent Lu2024-04-291-0/+14
| | | | | | | | | | | | For glk boards, MAX98357A speaker amplifier is supported by machine driver glk_rt5682_mx98357a with sound card name glkrt5682max. Use same name for backward compatibility with existing devices on market. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add glk_rt5682_def for glk boardsBrent Lu2024-04-291-12/+36
| | | | | | | | | | | | Add the board config glk_rt5682_def to rt5682 machine driver for all glk boards using default SSP port allocation (headphone codec on SSP2, speaker amplifiers on SSP1). Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: nau8825/rt5682: move speaker widget to common modulesBrent Lu2024-04-291-5/+27
| | | | | | | | | | | | | Two machine drivers sof_rt5682 and sof_nau8825 always register two speaker widgets 'Left Spk' and 'Right Spk' regardless the actual number of speakers. Move the widget registration to speaker common modules to avoid useless speaker widgets for 1 or 4 speaker boards. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240426152529.38345-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use RT5682S_PLL1 if neededBard Liao2024-04-141-2/+13
| | | | | | | | | | | | | | | When 96KHz sample rate is used, and MCLK is 24.576MHz, we will need pll_in = 24576000 and pll_out = 49152000 which is not supported by RT5682S_PLL2. Use RT5682S_PLL1 in this case. We don't test sample rate because RT5682S_PLL2 doesn't support 24.576MHz input and in the MCLK = 24.576MHz, sample rate = 48KHz case, i.e. pll_in == pll_out, PLL will not be used at all. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> 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/20240411220347.131267-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: support ALC1011 on cml boardsBrent Lu2024-04-141-2/+16
| | | | | | | | | | | | For cml boards, ALC1011 speaker amplifier is supported by machine driver cml_rt1011_rt5682. Use same driver name for backward compatibility with existing devices on market. Reviewed-by: Chao Song <chao.song@linux.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/20240411220347.131267-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_realtek_common: support 4xALC1011 amplifierBrent Lu2024-04-141-2/+2
| | | | | | | | | | | | Add support for boards with four ALC1011 amplifiers. Configuration is copied from cml_rt1011_rt5682 machine driver for backward compatibility with existing cml devices. Reviewed-by: Chao Song <chao.song@linux.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/20240411220347.131267-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: Fix uninitialized variable in probeDan Carpenter2024-04-081-1/+1
| | | | | | | | | | | Initialize "is_legacy_cpu" to false to prevent an uninitialized variable bug. Fixes: 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/6e16433f-1897-46a2-b3ee-e177e7d846b8@moroto.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for cml boardsBrent Lu2024-03-251-1/+1
| | | | | | | | | | | Introduce "cml_rt5682_def" for cml boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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://msgid.link/r/20240325221059.206042-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: remove unnecessary idisp HDMI quirkBrent Lu2024-03-251-8/+2
| | | | | | | | | | | Remove SOF_NUM_IDISP_HDMI(3) from board quirks since the value is 3 if not defined. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.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://msgid.link/r/20240325221059.206042-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for sof_card_private initializationBrent Lu2024-03-251-131/+89
| | | | | | | | | | Use intel_board module to initialize sof_card_private structure Reviewed-by: Bard Liao <yung-chuan.liao@linux.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://msgid.link/r/20240325221059.206042-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: dmi quirk cleanup for mtl boardsBrent Lu2024-02-081-40/+0
| | | | | | | | | | | Some dmi quirks are duplicated since codec and amplifier type are removed from board quirk. Remove redundant quirks. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for mtl boardsBrent Lu2024-02-081-8/+1
| | | | | | | | | | | | Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "mtl_rt5682_def" board to reduce the number of mtl board configs. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for rpl boardsBrent Lu2024-02-081-10/+1
| | | | | | | | | | | | Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "rpl_rt5682_def" board to reduce the number of rpl board configs. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for adl boardsBrent Lu2024-02-081-45/+1
| | | | | | | | | | | | Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "adl_rt5682_def" board to reduce the number of adl board configs. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for tgl boardsBrent Lu2024-02-081-19/+1
| | | | | | | | | | | | Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "tgl_rt5682_def" board to reduce the number of tgl board configs. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: board id cleanup for jsl boardsBrent Lu2024-02-081-24/+1
| | | | | | | | | | | | Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "jsl_rt5682_def" board to reduce the number of jsl board configs. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20240208165545.93811-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for DAI link generationBrent Lu2023-11-271-167/+75
| | | | | | | | | | | | Use intel_board module to generate DAI link array and update num_links field in snd_soc_card structure. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231127152654.28204-28-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for HDMI-In linkBrent Lu2023-11-271-28/+9
| | | | | | | | | | | | Use intel_board module for HDMI-In DAI link initialization. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Balamurugan C <balamurugan.c@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231127152654.28204-24-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for BT offload linkBrent Lu2023-11-271-18/+12
| | | | | | | | | | | Use intel_board module for BT offload DAI link initialization. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231127152654.28204-20-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for amp linkBrent Lu2023-11-271-33/+10
| | | | | | | | | | | Use intel_board module for speaker amplifier DAI link initialization. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231127152654.28204-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for codec linkBrent Lu2023-11-271-28/+10
| | | | | | | | | | | Use intel_board module for headphone codec DAI link initialization. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20231127152654.28204-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add mtl_rt5650 supportMac Chiang2023-11-131-0/+9
| | | | | | | | | | | | | | RT5650 is I2S codec integrated with HP and SPK. The HW board connects SoC I2S to RT5650 codec as below: I2S0: ALC5650 aif1 for Speaker I2S2: ALC5650 aif2 for Headphone Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20231113115907.18539-1-mac.chiang@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for DMIC linksBrent Lu2023-10-191-64/+17
| | | | | | | | | | Use intel_board module for dmic01 and dmic16k DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20231019173411.166759-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use common module for HDMI linkBrent Lu2023-10-121-94/+32
| | | | | | | | | | Use intel_board module for Intel HDMI DAI link initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20231012190826.142619-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use sof_hdmi_private to init HDMIBrent Lu2023-10-121-28/+8
| | | | | | | | | | | | Use sof_hdmi_private structure instead of a link list of sof_hdmi_pcm structure for HDMI dai link initialization since hdac-hdmi support is removed. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20231012190826.142619-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: remove hdac-hdmi supportBrent Lu2023-10-121-39/+5
| | | | | | | | | | | Remove hdac-hdmi support code since we are now using snd-hda-codec-hdmi codec driver for hdmi. Reviewed-by: Bard Liao <yung-chuan.liao@linux.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/20231012190826.142619-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: convert not to use asoc_xxx()Kuninori Morimoto2023-09-261-8/+8
| | | | | | | | | ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zg19fo4o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add HDMI_In capture feature support for RPL.Balamurugan C2023-09-151-0/+8
| | | | | | | | | | | Added HDMI-in capture support for RPL boards. previously it used adl machines and now its moved into separate match entry. Signed-off-by: Balamurugan C <balamurugan.c@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-12-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add adl_rt5650 board configBrent Lu2023-09-151-6/+15
| | | | | | | | | | | | This configuration supports ADL boards which implement ALC5650 dual I2S interface codec. Two DAI links are added: AIF1 (on codec side) for headphone and AIF2 for speakers. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-11-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: Modify number of HDMI to 3 for MTL/Rex devicesUday M Bhat2023-09-151-4/+4
| | | | | | | | | | | For all MTL/Rex devices, number of HDMI supported is 3. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: Add support for Rex with discrete BT offload.Uday M Bhat2023-09-151-0/+14
| | | | | | | | | | | | | System firmware has included additional audio DMI string MAX98360_ALC5682I_DISCRETE_I2S_BT for discrete BT offload supporting devices. Same DMI string match is introduced in sof_rt5682_quirk_table. Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: use ssp-common module to detect codecBrent Lu2023-09-151-157/+165
| | | | | | | | | | | | | | Use ssp-common module to detect codec and amplifier type in driver probe function and remove all quirks about codec and amplifier type. Due to codec detection feature, we could remove HP Dooly's DMI quirk safely. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: cleanup unnecessary quirk flagBrent Lu2023-09-151-63/+59
| | | | | | | | | | | | Remove SOF_RT5682_MCLK_24MHZ flag from JSL and CML/WHL board configs since the information could be retrieved from SOF API. The macro itself is removed as well. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682 add support for HDMI_In captureapoorv2023-07-311-0/+47
| | | | | | | | | | | | Adding support for 2 streams of HDMI-In capture via I2S with rt5682s codec variant Reviewed-by: CBM <balamurugan.c@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: apoorv <apoorv@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230731214257.444605-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add RPL support for MAX98357A speakerTerry Cheong2023-07-311-0/+8
| | | | | | | | | | | | | | Adding support back to RPL devices that lost audio after the RPL/ADL split. The hardware configuration is: SSP0: 10EC5682/RTL5682 codec SSP2: MAX98357A amplifier Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Terry Cheong <htcheong@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230731214257.444605-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: maxim-common: get codec number from ACPI tableBrent Lu2023-07-311-35/+2
| | | | | | | | | | | | | | | | We implement a helper function to get number of codecs from ACPI subsystem instead of using quirk flag in machine driver. Also refactor module interface by adding max_98390_dai_link() function. On the sof_rt5682 machine driver side, we remove the quirk flag SOF_MAX98390_TWEETER_SPEAKER_PRESENT and use the new interface of max98390 to setup dai link. Signed-off-by: Brent Lu <brent.lu@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/20230731103419.2536036-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: add jsl_rt5650 board configBrent Lu2023-07-121-2/+78
| | | | | | | | | | | This configuration supports JSL boards which implement ALC5650 dual I2S interface codec. Two DAI links are added: AIF1 (on codec side) for headphone and AIF2 for speakers. 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/20230712191423.443765-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_rt5682: Add mtl support RT1019P speakerMac Chiang2023-06-211-0/+23
| | | | | | | | | | | | This patch support below hardware configuration: SSP2: 10EC5682/RTL5682 codec SSP0: RTL1019 amplifier Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com> Link: https://lore.kernel.org/r/20230616063617.25900-2-mac.chiang@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>