mbox series

[RFC,0/2] TAS2563 DSP Firmware Loader

Message ID 20200609172841.22541-1-dmurphy@ti.com
Headers show
Series TAS2563 DSP Firmware Loader | expand

Message

Dan Murphy June 9, 2020, 5:28 p.m. UTC
Hello

The TAS2563 amplifier has a DSP that can run programs and configurations to
produce alternate audio experiences.  The DSP firmware is not a typical firmware
as the binary may contain various programs and configurations that are
selectable during run time.

These programs and configurations are selectable via files under the I2C dev
node.  There may be a better way to select this through ALSA controls but I was
unable to find a good example of this.  This is why this is an RFC patchset.

Dan

Dan Murphy (2):
  dt-bindings: tas2562: Add firmware support for tas2563
  ASoc: tas2563: DSP Firmware loading support

 .../devicetree/bindings/sound/tas2562.yaml    |   4 +
 sound/soc/codecs/Makefile                     |   2 +-
 sound/soc/codecs/tas2562.c                    |  48 ++-
 sound/soc/codecs/tas2562.h                    |  25 ++
 sound/soc/codecs/tas25xx_dsp_loader.c         | 377 ++++++++++++++++++
 sound/soc/codecs/tas25xx_dsp_loader.h         |  93 +++++
 6 files changed, 530 insertions(+), 19 deletions(-)
 create mode 100644 sound/soc/codecs/tas25xx_dsp_loader.c
 create mode 100644 sound/soc/codecs/tas25xx_dsp_loader.h

-- 
2.26.2

Comments

Mark Brown June 9, 2020, 5:52 p.m. UTC | #1
On Tue, Jun 09, 2020 at 12:28:39PM -0500, Dan Murphy wrote:

> These programs and configurations are selectable via files under the I2C dev

> node.  There may be a better way to select this through ALSA controls but I was

> unable to find a good example of this.  This is why this is an RFC patchset.


I think you can just use enums for most of this - what you want to do I
think is parse the firmware, build templates for the controls and then
add them with snd_soc_add_component_controls().  Userspace *should* cope
with controls being hotplugged.
Dan Murphy June 9, 2020, 6:07 p.m. UTC | #2
Mark

On 6/9/20 12:52 PM, Mark Brown wrote:
> On Tue, Jun 09, 2020 at 12:28:39PM -0500, Dan Murphy wrote:

>

>> These programs and configurations are selectable via files under the I2C dev

>> node.  There may be a better way to select this through ALSA controls but I was

>> unable to find a good example of this.  This is why this is an RFC patchset.

> I think you can just use enums for most of this - what you want to do I

> think is parse the firmware, build templates for the controls and then

> add them with snd_soc_add_component_controls().  Userspace *should* cope

> with controls being hotplugged.


Yes this was my concern if userspace could cope with dynamic controls.

Dan
Mark Brown June 9, 2020, 6:16 p.m. UTC | #3
On Tue, Jun 09, 2020 at 01:07:50PM -0500, Dan Murphy wrote:
> On 6/9/20 12:52 PM, Mark Brown wrote:


> > I think you can just use enums for most of this - what you want to do I

> > think is parse the firmware, build templates for the controls and then

> > add them with snd_soc_add_component_controls().  Userspace *should* cope

> > with controls being hotplugged.


> Yes this was my concern if userspace could cope with dynamic controls.


Things like alsactl definitely do, and obviously anything that starts
after the firmware loads will be fine too.