-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split CFL, CML, CNL firmware names #1393
split CFL, CML, CNL firmware names #1393
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@xiulipan you'll need to change the CI settings, we still check for CNL firmware on CML hardware: 2019-10-29 15:01:56 UTC [REM_INFO]: Checking file: /lib/firmware/intel/sof/sof-cnl.ri |
@plbossart do we also need the corresponding changes in sof-pci-dev.c to add a cml_desc? |
the changes are already there: static const struct sof_dev_desc cml_desc = {
.machines = snd_soc_acpi_intel_cnl_machines, .machines = snd_soc_acpi_intel_cnl_machines,
.resindex_lpe_base = 0, .resindex_lpe_base = 0,
.resindex_pcicfg_base = -1, .resindex_pcicfg_base = -1,
.resindex_imr_base = -1, .resindex_imr_base = -1,
.irqindex_host_ipc = -1, .irqindex_host_ipc = -1,
.resindex_dma_base = -1, .resindex_dma_base = -1,
.chip_info = &cnl_chip_info, .chip_info = &cnl_chip_info,
.default_fw_path = "intel/sof", .default_fw_path = "intel/sof",
.default_tplg_path = "intel/sof-tplg", .default_tplg_path = "intel/sof-tplg",
.nocodec_fw_filename = "sof-cnl.ri", .nocodec_fw_filename = "sof-cml.ri", |
@plbossart this is what Im confused about. Shouldnt this be snd_soc_acpi_intel_cml_machines with your new addition? |
ah yes, that's just wrong. Thanks for spotting this. |
@plbossart , do we need to split cml from cnl ? please check our sdw table https://github.com/thesofproject/linux/blob/integration/soundwire-latest/sound/soc/intel/common/soc-acpi-intel-cnl-match.c#L68. we could just split cnl table to cnl & cml table, and I still consider cml as a cnl platform |
@plbossart Thanks for the note. We will try to come up with a smooth transition method. |
d4c5beb
to
6d7c562
Compare
@fredoh9 the CI tests should break on CFL, will need your help to add sof-cnl.ri -> sof-cfl.ri symlink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_machines[] = { | ||
{}, | ||
}; | ||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cfl_machines); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting an empty table looks a bit odd, but given there will be entryes, ++votes still.
@fredoh9 can you help recheck the CFL and CML HDA cases. I see messages such as
Not sure if my fallback worked here. |
sound/soc/sof/intel/hda.c
Outdated
mach = pdata->desc->machines; | ||
pdata->fw_filename = mach->sof_fw_filename; | ||
if (mach) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart Im not sure an empty struct is equivalent to NULL. Maybe check for ARRAY_SIZE() is a better option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that was my fear when I wrote the code, but then we also test for the NULL case when we reach the last empty structure in the ACPI table, when we scan for possible machines. That's why I'd want someone to test on CFL w/ HDA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plbossart one way to make sure that this is null is not to set the "machines" field until we have entries in the cfl table.
But in my multi-client series, I fixed this problem by adding a default_fw_filename field to desc because the firmware is loaded long before the acpi match is done by the audio client. But thats for another day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, and for now I am stuck due to this other issue:
#1417
whoever invented signed firmware should buy free beer for life to all developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (mach->id[0]) is what we used for acpi scans, so fixed the code to use the same thing
Due to firmware manifest/signature differences, we have to use different firmware names, so split CNL machine table in three (CNL, CFL, CML). The CFL table is currently empty since all known platforms use HDaudio, but let's plan ahead. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The manifest information is different between CNL, CML and CFL platforms hence we need to load different files. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
We have platforms such as CFL with no known I2S codec being used, and the ACPI tables are currently empty, so fall-back to using the firmware filename used in nocodec mode Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
6d7c562
to
3e3415d
Compare
@plbossart I got a CFL device and test this PR. " if (mach)" always return true, and " if (mach->id[0])" works. How about change it to if (mach->sof_fw_filename)
pdata->fw_filename = mach->sof_fw_filename;
else
pdata->fw_filename =
pdata->desc->nocodec_fw_filename; |
@plbossart We are working on this. I hope we do not get some sudden change to broke previous version. |
I guess that would probably work. I still prefer mach->id[0] for consistency with the code in soc-acpi.h |
we need to split those firmwares due to signature issues
this replaces #1278