diff mbox series

[10/10] ASoC: Intel: Add ACPI match table entry for ES8316 codec on BYTCR platform

Message ID 20190103134535.13861-11-hdegoede@redhat.com (mailing list archive)
State Accepted
Commit 5198baf8817d7e6e0fe2f3e74ea2ead714b74d9c
Headers show
Series ASoC: bytcht-es8316 fixes and improvements | expand

Commit Message

Hans de Goede Jan. 3, 2019, 1:45 p.m. UTC
Some BYTCR devices use an ES8316 codec, add an ACPI match table entry
for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/common/soc-acpi-intel-byt-match.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Pierre-Louis Bossart Jan. 3, 2019, 4:43 p.m. UTC | #1
On 1/3/19 7:45 AM, Hans de Goede wrote:
> Some BYTCR devices use an ES8316 codec, add an ACPI match table entry
> for this.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>   sound/soc/intel/common/soc-acpi-intel-byt-match.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> index 027dc27262b7..96f9c553fe6c 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> @@ -185,6 +185,15 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {
>   		.sof_tplg_filename = "intel/sof-byt-da7213.tplg",
>   		.asoc_plat_name = "sst-mfld-platform",
>   	},
> +	{
> +		.id = "ESSX8316",
> +		.drv_name = "bytcht_es8316",
> +		.fw_filename = "intel/fw_sst_0f28.bin",
> +		.board = "bytcht_es8316",

Coming from the holiday break I saw this .board field and couldn't 
recall why we needed it. None of the more recent boards set this field. 
Is this legacy stuff that isn't used by anyone?


> +		.sof_fw_filename = "intel/sof-byt.ri",
> +		.sof_tplg_filename = "intel/sof-byt-es8316.tplg",
> +		.asoc_plat_name = "sst-mfld-platform",
> +	},
>   	/* some Baytrail platforms rely on RT5645, use CHT machine driver */
>   	{
>   		.id = "10EC5645",
Hans de Goede Jan. 3, 2019, 4:45 p.m. UTC | #2
Hi,

On 03-01-19 17:43, Pierre-Louis Bossart wrote:
> 
> On 1/3/19 7:45 AM, Hans de Goede wrote:
>> Some BYTCR devices use an ES8316 codec, add an ACPI match table entry
>> for this.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   sound/soc/intel/common/soc-acpi-intel-byt-match.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
>> index 027dc27262b7..96f9c553fe6c 100644
>> --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
>> +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
>> @@ -185,6 +185,15 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {
>>           .sof_tplg_filename = "intel/sof-byt-da7213.tplg",
>>           .asoc_plat_name = "sst-mfld-platform",
>>       },
>> +    {
>> +        .id = "ESSX8316",
>> +        .drv_name = "bytcht_es8316",
>> +        .fw_filename = "intel/fw_sst_0f28.bin",
>> +        .board = "bytcht_es8316",
> 
> Coming from the holiday break I saw this .board field and couldn't recall why we needed it. None of the more recent boards set this field. Is this legacy stuff that isn't used by anyone?

I would expect you to know that better then I do :)  I just copied this from the
other entries.

If you want to submit a patch removing the .board entries I'm all for it.

Regards,

Hans



> 
> 
>> +        .sof_fw_filename = "intel/sof-byt.ri",
>> +        .sof_tplg_filename = "intel/sof-byt-es8316.tplg",
>> +        .asoc_plat_name = "sst-mfld-platform",
>> +    },
>>       /* some Baytrail platforms rely on RT5645, use CHT machine driver */
>>       {
>>           .id = "10EC5645",
Pierre-Louis Bossart Jan. 3, 2019, 5:04 p.m. UTC | #3
>>>       },
>>> +    {
>>> +        .id = "ESSX8316",
>>> +        .drv_name = "bytcht_es8316",
>>> +        .fw_filename = "intel/fw_sst_0f28.bin",
>>> +        .board = "bytcht_es8316",
>>
>> Coming from the holiday break I saw this .board field and couldn't 
>> recall why we needed it. None of the more recent boards set this 
>> field. Is this legacy stuff that isn't used by anyone?
>
> I would expect you to know that better then I do :)  I just copied 
> this from the
> other entries.

I don't, it's at least 5 years old....

The initial tables in atom/sst/sst_acpi.c had this (April 2015).

+static struct sst_machines sst_acpi_bytcr[] = {
+    {"10EC5640", "T100", "bytt100_rt5640", NULL, "intel/fw_sst_0f28.bin",
+                        &byt_rvp_platform_data },
+    {},
+};

then it became

+static struct sst_acpi_mach sst_acpi_bytcr[] = {
+    {"10EC5640", "bytt100_rt5640", "intel/fw_sst_0f28.bin", "T100", NULL,

then

  static struct sst_acpi_mach sst_acpi_bytcr[] = {
-    {"10EC5640", "bytt100_rt5640", "intel/fw_sst_0f28.bin", "T100", NULL,
+    {"10EC5640", "bytcr_rt5640", "intel/fw_sst_0f28.bin", 
"bytcr_rt5640", NULL,
                          &byt_rvp_platform_data },

and then

+    {
+        .id = "10EC5640",
+        .drv_name = "bytcr_rt5640",
+        .fw_filename = "intel/fw_sst_0f28.bin",
+        .board = "bytcr_rt5640",
+        .machine_quirk = byt_quirk,
+        .pdata = &byt_rvp_platform_data,
+    },

we only use the drv_name to select the machine driver.

Keyon, Liam, do you have any memories of why this board field was needed 
in the first place?

>
> If you want to submit a patch removing the .board entries I'm all for it.

I was planning to remove the new_mach_data already so this is the second 
strike on this soc_acpi_machine structure...

-Pierre
diff mbox series

Patch

diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
index 027dc27262b7..96f9c553fe6c 100644
--- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
@@ -185,6 +185,15 @@  struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {
 		.sof_tplg_filename = "intel/sof-byt-da7213.tplg",
 		.asoc_plat_name = "sst-mfld-platform",
 	},
+	{
+		.id = "ESSX8316",
+		.drv_name = "bytcht_es8316",
+		.fw_filename = "intel/fw_sst_0f28.bin",
+		.board = "bytcht_es8316",
+		.sof_fw_filename = "intel/sof-byt.ri",
+		.sof_tplg_filename = "intel/sof-byt-es8316.tplg",
+		.asoc_plat_name = "sst-mfld-platform",
+	},
 	/* some Baytrail platforms rely on RT5645, use CHT machine driver */
 	{
 		.id = "10EC5645",