RE: [EXTERNAL] Re: [PATCH v1 3/5] firmware: tasdevice_fmw: tasdevice firmware loading lib

From: Ding, Shenghao
Date: Thu May 04 2023 - 09:56:30 EST


Hi Broonie
Thanks for your comments.
In fact, we have a dilemma whether to put the code into firmware folder or sound/soc/codecs.
As you know, most cases are audio-related application, such as a pure audio device or
audio2haptics device, keeping the tasdevice-firmware lib into sound/soc/codecs would make sense.
However, in other cases, tasdevice(such as tas2781) can be used as pure haptic to drive the Motor.
moving the lib into firmware folder would make sense, although such an application is a niche.
Would you be so kind and give some comments on it? Thanks.

BR
Shenghao Ding
-----Original Message-----
From: Mark Brown <broonie@xxxxxxxxxx>
Sent: Wednesday, May 3, 2023 8:28 AM
To: Shenghao Ding <13916275206@xxxxxxx>
Cc: lgirdwood@xxxxxxxxx; perex@xxxxxxxx; pierre-louis.bossart@xxxxxxxxxxxxxxx; Lu, Kevin <kevin-lu@xxxxxx>; Ding, Shenghao <shenghao-ding@xxxxxx>; alsa-devel@xxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Xu, Baojun <x1077012@xxxxxx>; Gupta, Peeyush <peeyush@xxxxxx>; Navada Kanyana, Mukund <navada@xxxxxx>; gentuser@xxxxxxxxx
Subject: [EXTERNAL] Re: [PATCH v1 3/5] firmware: tasdevice_fmw: tasdevice firmware loading lib

On Tue, May 02, 2023 at 01:32:35PM +0800, Shenghao Ding wrote:
> Create tasdevice firmware lib.

> drivers/firmware/Kconfig | 1 +
> drivers/firmware/Makefile | 1 +
> drivers/firmware/ti/Kconfig | 5 +
> drivers/firmware/ti/Makefile | 3 +
> drivers/firmware/ti/tasdevice-fmw.c | 2380
> +++++++++++++++++++++++++++
> 5 files changed, 2390 insertions(+)

Given how large this part of the code for these devices is it definitely makes sense to split it into a separate commit like you've done but are there any non-audio devices in this series which will share the same firmware style? If not then it probably makes sense to keep the code in sound/soc/codecs, though a separate file would still make sense.

There's some devices that do keep firmware interface code in the firmware directory but in those cases the devices have other, non-audio, functionality which also uses the firmware (eg, always on monitoring) but I've not seen any of the tas devices like that. If there are some then the split you've made here makes sense.