[Letux-kernel] AESS for v4.18
H. Nikolaus Schaller
hns at goldelico.com
Fri Aug 3 12:59:51 CEST 2018
> Am 02.08.2018 um 21:06 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> Am 02.08.2018 um 11:51 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> while Marek is trying to get the firmware properly built and/or loaded,
>> I have started to rebase the aess patch set on top of 4.18.
>> The key issue and task is to get rid of all sound_soc_platform
>> references and replace by sound_soc_component.
>> To make it a little more clear which files we touch, I have rearranged
>> and reworded the patch set so that we can easily identify the subsystem.
>> And patches affecting more than one are split up into two patches now.
>> So basically, there are three groups of patches:
>> a) for sound/soc - they mainly export internal functions or add new helper functions
>> I am not sure if these patches are still needed and/or good
>> b) sound/soc/omap - here we add an mcasp driver, make mcbsp export functions and
>> the main change is to add firmware download to abe-twl6040.
>> c) sound/soc/omap/aess - this is the real aess driver
>> The next steps are:
>> 1. fix compile issues in sound/soc/core
>> 2. upstream abe-twl6040 driver has already been converted to sound_soc_component,
>> so I have to make sure that patching in the firmware loader code does not undo
>> something important...
>> 3. go through the aess code and convert to sound_soc_component
>> This may make some patches of a) no longer needed. Some of them might need
>> additional modifications.
>> The current work is here:
>> I plan to add patches for each step.
> Well, I tried to work on 1. first, but it turned out to be a mess.
> Therefore I reverted all(most all) sound/soc/core patches and started to work on 2.
> It was partially straightforward, partially difficult to decide what is new, what
> is needed and and what is duplicated code... So I hope I did not introduce too many
> bugs we have to hunt...
> Regarding 1. I did just need to copy&paste two helper functions to make 2. compiling.
> Which means, that the new abe-twl6040 doesn't rely on patches for sound/soc.
> Here is the first result:
> I have collected some questions for review at the beginning of the code.
> What I also observed is that there is addidtional stuff we do not necessarily
> need for the Pyra, and which should IMHO go into separate patches against
> * special support for OMAP4_SDP
> * spdif stuff
> * support for multiple DMICs
> BTW: if we disable AESS it should compile fine - and we should be able to test
> if the twl6040 audio still works or is broken...
> So the next big step is 3. Let's see how many of the patches from 1. we really
> need. The less we need them, the better...
It doesn't look as if we need (m)any of them. Here is a first result:
It compiles, but some code is commented out, because it calls functions that are not
available in v4.18:
omap-aess-core.c and omap-aess-pcm.c:
omap_pm_get_dev_context_loss_count() - was not used elsewhere and recently removed
snd_soc_dai_trigger() - did never exist in any upstream kernel
snd_soc_platform_trigger() - has been removed in v4.11
snd_interval_step() - exists but is not exported
That is all! A total of 4 functions is missing. So almost all patches we had
for general sound/soc/core are not needed.
Does anyone here have background information what these functions are good for and what replacements should be used?
@Marek: as far as I can see, none of them is related to firmware loading.
So you could try if this code is better or different in loading firmware?
More information about the Letux-kernel