[PATCH] ASoC: Intel: sof_rt5682: Add support for jsl_rt5682_rt1019
This patch adds the driver data for rt5682s on SSP0 for ADL platform
Signed-off-by: Sean Hong sean.hong@quanta.corp-partner.google.com --- sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 13 +++++++++++++ 2 files changed, 22 insertions(+)
diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 045965312245b..3a840f3a9f5d2 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -1100,6 +1100,15 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(1) | SOF_RT5682_NUM_HDMIDEV(4)), }, + { + .name = "jsl_rt5682_rt1019", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_MCLK_24MHZ | + SOF_RT5682_SSP_CODEC(0) | + SOF_SPEAKER_AMP_PRESENT | + SOF_RT1019_SPEAKER_AMP_PRESENT | + SOF_RT5682_SSP_AMP(1)), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c index b95c4b2cda947..139d2468f5f70 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -29,6 +29,11 @@ static const struct snd_soc_acpi_codecs rt1015p_spk = { .codecs = {"RTL1015"} };
+static struct snd_soc_acpi_codecs rt1019p_spk = { + .num_codecs = 1, + .codecs = {"RTL1019"} +} + static const struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs = 1, .codecs = {"MX98360A"} @@ -78,6 +83,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &mx98360a_spk, .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", }, + { + .comp_ids = &rt5682_rt5682s_hp, + .drv_name = "jsl_rt5682_rt1019", + .sof_fw_filename = "sof-jsl.ri", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &rt1019p_spk, + .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", + }, { .id = "10134242", .drv_name = "jsl_cs4242_mx98360a",
static const struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs = 1, .codecs = {"MX98360A"} @@ -78,6 +83,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &mx98360a_spk, .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", },
- {
.comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1019",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1019p_spk,
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
this patch adds support for the rt1019, the line above looks like a copy-paste mistake.
We shouldn't use the same topology files for different platforms, it's not good maintenance-wise and since we store default values for some controls it's really not a good idea.
Please use a unique string such as sof-jsl-rt5682-rt1019.tplg, thanks.
- }, { .id = "10134242", .drv_name = "jsl_cs4242_mx98360a",
Hi Sean,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on broonie-sound/for-next] [also build test ERROR on tiwai-sound/for-next linus/master next-20220812] [cannot apply to v5.19] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sean-Hong/ASoC-Intel-sof_rt56... base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next config: i386-randconfig-a011 (https://download.01.org/0day-ci/archive/20220813/202208130220.892ZS1bh-lkp@i...) compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/5ab680d85b9dbcaa1929ab9beace3c... git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Sean-Hong/ASoC-Intel-sof_rt5682-Add-support-for-jsl_rt5682_rt1019/20220812-195139 git checkout 5ab680d85b9dbcaa1929ab9beace3c9622e46d19 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/soc/intel/common/
If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot lkp@intel.com
All errors (new ones prefixed by >>):
sound/soc/intel/common/soc-acpi-intel-jsl-match.c:35:2: error: expected ';' after top level declarator
} ^ ;
sound/soc/intel/common/soc-acpi-intel-jsl-match.c:89:4: error: field designator 'sof_fw_filename' does not refer to any field in type 'struct snd_soc_acpi_mach'
.sof_fw_filename = "sof-jsl.ri", ^ 2 errors generated.
vim +35 sound/soc/intel/common/soc-acpi-intel-jsl-match.c
31 32 static struct snd_soc_acpi_codecs rt1019p_spk = { 33 .num_codecs = 1, 34 .codecs = {"RTL1019"}
35 }
36 37 static const struct snd_soc_acpi_codecs mx98360a_spk = { 38 .num_codecs = 1, 39 .codecs = {"MX98360A"} 40 }; 41 42 static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = { 43 .num_codecs = 2, 44 .codecs = {"10EC5682", "RTL5682"}, 45 }; 46 47 /* 48 * When adding new entry to the snd_soc_acpi_intel_jsl_machines array, 49 * use .quirk_data member to distinguish different machine driver, 50 * and keep ACPI .id field unchanged for the common codec. 51 */ 52 struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { 53 { 54 .id = "DLGS7219", 55 .drv_name = "sof_da7219_mx98373", 56 .sof_tplg_filename = "sof-jsl-da7219.tplg", 57 .machine_quirk = snd_soc_acpi_codec_list, 58 .quirk_data = &jsl_7219_98373_codecs, 59 }, 60 { 61 .id = "DLGS7219", 62 .drv_name = "sof_da7219_mx98360a", 63 .sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg", 64 }, 65 { 66 .comp_ids = &rt5682_rt5682s_hp, 67 .drv_name = "jsl_rt5682_rt1015", 68 .machine_quirk = snd_soc_acpi_codec_list, 69 .quirk_data = &rt1015_spk, 70 .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", 71 }, 72 { 73 .comp_ids = &rt5682_rt5682s_hp, 74 .drv_name = "jsl_rt5682_rt1015p", 75 .machine_quirk = snd_soc_acpi_codec_list, 76 .quirk_data = &rt1015p_spk, 77 .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg", 78 }, 79 { 80 .comp_ids = &rt5682_rt5682s_hp, 81 .drv_name = "jsl_rt5682_mx98360", 82 .machine_quirk = snd_soc_acpi_codec_list, 83 .quirk_data = &mx98360a_spk, 84 .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", 85 }, 86 { 87 .comp_ids = &rt5682_rt5682s_hp, 88 .drv_name = "jsl_rt5682_rt1019",
89 .sof_fw_filename = "sof-jsl.ri",
index b95c4b2cda947..139d2468f5f70 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -29,6 +29,11 @@ static const struct snd_soc_acpi_codecs rt1015p_spk = { .codecs = {"RTL1015"} };
+static struct snd_soc_acpi_codecs rt1019p_spk = { + .num_codecs = 1, + .codecs = {"RTL1019"} +} Missing semicolon. Please compile the kernel and make sure no error before submitting patch.
+ static const struct snd_soc_acpi_codecs mx98360a_spk = { .num_codecs = 1, .codecs = {"MX98360A"}
@@ -78,6 +83,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { .quirk_data = &mx98360a_spk, .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg", },
- {
.comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1019",
.sof_fw_filename = "sof-jsl.ri",
Remove this line.
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &rt1019p_spk,
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
- }, { .id = "10134242", .drv_name = "jsl_cs4242_mx98360a",
-- 2.25.1
Hi Sean, I guess you are using Chrome tree. Please use the for-next branch of broonie tree to generate the V2 patch.
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git $ git checkout for-next
Brent
participants (4)
-
kernel test robot
-
Lu, Brent
-
Pierre-Louis Bossart
-
Sean Hong