All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/14] ASoC: Sound Open Firmware (SOF) core
@ 2019-03-21 16:10 Pierre-Louis Bossart
  2019-03-21 16:10 ` [PATCH v5 01/14] ASoC: SOF: Add Sound Open Firmware driver core Pierre-Louis Bossart
                   ` (13 more replies)
  0 siblings, 14 replies; 43+ messages in thread
From: Pierre-Louis Bossart @ 2019-03-21 16:10 UTC (permalink / raw)
  To: alsa-devel
  Cc: Daniel Baluta, Alan Cox, tiwai, Pierre-Louis Bossart,
	liam.r.girdwood, vkoul, broonie, andriy.shevchenko,
	sound-open-firmware

Sound Open Firmware (SOF) is a host and DSP architecture agnostic
audio DSP firmware. SOF is not tied to any specific host architecture
or any specific physical IO communication type (it will work with on
SoC DSPs, or DSP connected via SPI/I2C).

SOF is also not coupled to any particular DSP architecture and has
abstraction similar to Linux to allow porting to other DSP
architectures.

https://www.sofproject.org/

This patch series introduces the SOF core and utilities. Support for
Intel devices is provided as a follow-up series.

The SOF core manages all the core DSP services and ALSA/ASoC IO. The
core is responsible for loading firmware, parsing topology, exposing
PCMs and kcontrols, providing debug and trace mechanisms and
performing IPC between host and DSP.

The SOF core also has logic to allow reuse of existing machine drivers
for other platforms/machines without any code modification. i.e. DAI
links can be modified at runtime to bind with SOF and SOF topologies
instead of existing hard coded DAI links and topology.

Future patches will simplify the IPC interface to allow e.g. for the
use of RPMsg or mailboxes on other hardware, the changes are not
included just yet.

This patchset is dependent on 3 patches already shared on alsa-devel
but not yet merged:
    ASoC: topology: Align tplg pointer increment across all kcontrols
    ASoC: core: support driver alias names for FE topology overrides
    ASoC: dapm: set power_check callback for widgets that shouldnt be always on

Changes since v4:

feedback from Mark:
Removed need for private field in soc_runtime
Completely reworked IPC, now much simpler and robust. IPC refactoring
work will continue to e.g. allow for different types of IPC hardware
and a better split between core and platform-specific drivers.

Feedback from Takashi:
Clarified endianness and alignment issues for page tables
Removed useless mutexes
Removed unneeded initializations, return types and wrappers
Use snd_mask_set_format()
Trace code flow optimization
Removed checks on preallocate_pages()
Test status of open/close functions.

Released reference when pm_runtime_get_sync fails
Fixed multiple memory allocation issues
Fixed static analysis warnings
Fixed error checks with copy_to_user()
Added support for multi-core DSPs
Fixed leaked references with firmware handling on resume
Multiple topology fixes/improvements (enum/switch, mux, removal of
duplicate connections, widget power not reported as ON)
Code simplifications (removed set-but-unused, typecasts, etc).

Changes since v3:

Addressed dozens ofcomments from Takashi Iwai, Mark Brown, Andy
Shevchenko, Daniel Baluta (Thanks!)
Hardened memory allocation, fixed module load/unload oops or errors
(now at hundreds of cycles on ApolloLake devices)
Fixed suspend/resume and removed use of suspend_late, now using
snd_soc_pm_ops and standard flow
Fixed topology free (multiple patches already contributed for
ASoC-core)
Fixed debugfs/pm_runtime interaction
Removed error checks on debugfs, changed to EXPORT_SYMBOL_GPL
Added filenames in debug messages, ues hex_dump_to_buffer
Removed "sof-audio" platform device and added better error checks on
probe
Reworked data structures to remove mix of const/variable fields and
duplication of pointers for platform-specific changes
Removed redundant ops tables
Fixed trace/logger issues
Fixed issues with loader (alignment and block size errors)
Fixed release_firmware handling (was all over the place)
Simplified PCI handling
Added comments on non-atomic triggers
Removed enum controls (not supported in topology)
Simplified include file dependencies
Fix cppcheck warnings
Fixed Kconfigs to deal with Kbuild warnings on exotic architectures

Precisions:

The code in this patchset is directly squashed from the SOF
development branch [1], which tracks Mark Brown's for-next branch on a
weekly basis and the configurations used for testing are based on the
defconfigs at [2]. The patches are also used backported for Chromebook
devices.

Full disclosure on known limitation and issues (full list at [3])

a) the interaction with ASoC is not always perfect, there are a couple
of points where a better solution is desired (use of private data,
support for link DMA, etc). The known points are explicitly documented
in the code and will be updated. To be clearer, it's our belief that
SOF does not cripple ASoC in any way, and that merging this SOF core
does not harm others. It's just complicated to get things right,
especially on a couple of cases where the topology and DPCM frameworks
generate complex flows that very few people understand.
b) The get/put methods for controls generate an IPC and possibly a
wake-up. This is not optimal and is being fixed.
c) runtime_pm is being hardened and the use of SMART_SUSPEND was suggested.

Thank you for reviews and comments, we appreciate the time spent
commenting on this large patchset. Thanks in particular to Alan Cox
and Andy Shevchenko for their comments on an earlier version. This
patchset also includes contributions from Daniel Baluta for loading
code on non-Intel platforms.

Pierre

[1] https://github.com/thesofproject/linux
[2] https://github.com/thesofproject/kconfig
[3] https://github.com/thesofproject/linux/issues

Liam Girdwood (12):
  ASoC: SOF: Add Sound Open Firmware driver core
  ASoC: SOF: Add Sound Open Firmware KControl support
  ASoC: SOF: Add driver debug support.
  ASoC: SOF: Add support for IPC IO between DSP and Host
  ASoC: SOF: Add PCM operations support
  ASoC: SOF: Add support for loading topologies
  ASoC: SOF: Add DSP firmware logger support
  ASoC: SOF: Add DSP HW abstraction operations
  ASoC: SOF: Add firmware loader support
  ASoC: SOF: Add userspace ABI support
  ASoC: SOF: Add PM support
  ASoC: SOF: Add Nocodec machine driver support

Pierre-Louis Bossart (2):
  ASoC: SOF: Add xtensa support
  ASoC: SOF: Add utils

 include/sound/sof.h               |  100 +
 include/sound/sof/control.h       |  158 ++
 include/sound/sof/dai-intel.h     |  178 ++
 include/sound/sof/dai.h           |   75 +
 include/sound/sof/header.h        |  158 ++
 include/sound/sof/info.h          |  118 ++
 include/sound/sof/pm.h            |   48 +
 include/sound/sof/stream.h        |  148 ++
 include/sound/sof/topology.h      |  256 +++
 include/sound/sof/trace.h         |   66 +
 include/sound/sof/xtensa.h        |   44 +
 include/uapi/sound/sof/abi.h      |   62 +
 include/uapi/sound/sof/eq.h       |  172 ++
 include/uapi/sound/sof/fw.h       |   78 +
 include/uapi/sound/sof/header.h   |   27 +
 include/uapi/sound/sof/manifest.h |  188 ++
 include/uapi/sound/sof/tokens.h   |  103 +
 include/uapi/sound/sof/tone.h     |   21 +
 include/uapi/sound/sof/trace.h    |   97 +
 sound/soc/sof/control.c           |  544 ++++++
 sound/soc/sof/core.c              |  489 +++++
 sound/soc/sof/debug.c             |  219 +++
 sound/soc/sof/ipc.c               |  742 ++++++++
 sound/soc/sof/loader.c            |  376 ++++
 sound/soc/sof/nocodec.c           |  109 ++
 sound/soc/sof/ops.c               |  204 ++
 sound/soc/sof/ops.h               |  403 ++++
 sound/soc/sof/pcm.c               |  723 +++++++
 sound/soc/sof/pm.c                |  373 ++++
 sound/soc/sof/sof-priv.h          |  616 ++++++
 sound/soc/sof/topology.c          | 2913 +++++++++++++++++++++++++++++
 sound/soc/sof/trace.c             |  295 +++
 sound/soc/sof/utils.c             |  112 ++
 sound/soc/sof/xtensa/Kconfig      |    2 +
 sound/soc/sof/xtensa/Makefile     |    5 +
 sound/soc/sof/xtensa/core.c       |  138 ++
 36 files changed, 10360 insertions(+)
 create mode 100644 include/sound/sof.h
 create mode 100644 include/sound/sof/control.h
 create mode 100644 include/sound/sof/dai-intel.h
 create mode 100644 include/sound/sof/dai.h
 create mode 100644 include/sound/sof/header.h
 create mode 100644 include/sound/sof/info.h
 create mode 100644 include/sound/sof/pm.h
 create mode 100644 include/sound/sof/stream.h
 create mode 100644 include/sound/sof/topology.h
 create mode 100644 include/sound/sof/trace.h
 create mode 100644 include/sound/sof/xtensa.h
 create mode 100644 include/uapi/sound/sof/abi.h
 create mode 100644 include/uapi/sound/sof/eq.h
 create mode 100644 include/uapi/sound/sof/fw.h
 create mode 100644 include/uapi/sound/sof/header.h
 create mode 100644 include/uapi/sound/sof/manifest.h
 create mode 100644 include/uapi/sound/sof/tokens.h
 create mode 100644 include/uapi/sound/sof/tone.h
 create mode 100644 include/uapi/sound/sof/trace.h
 create mode 100644 sound/soc/sof/control.c
 create mode 100644 sound/soc/sof/core.c
 create mode 100644 sound/soc/sof/debug.c
 create mode 100644 sound/soc/sof/ipc.c
 create mode 100644 sound/soc/sof/loader.c
 create mode 100644 sound/soc/sof/nocodec.c
 create mode 100644 sound/soc/sof/ops.c
 create mode 100644 sound/soc/sof/ops.h
 create mode 100644 sound/soc/sof/pcm.c
 create mode 100644 sound/soc/sof/pm.c
 create mode 100644 sound/soc/sof/sof-priv.h
 create mode 100644 sound/soc/sof/topology.c
 create mode 100644 sound/soc/sof/trace.c
 create mode 100644 sound/soc/sof/utils.c
 create mode 100644 sound/soc/sof/xtensa/Kconfig
 create mode 100644 sound/soc/sof/xtensa/Makefile
 create mode 100644 sound/soc/sof/xtensa/core.c

-- 
2.17.1

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2019-04-09 16:52 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 16:10 [PATCH v5 00/14] ASoC: Sound Open Firmware (SOF) core Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 01/14] ASoC: SOF: Add Sound Open Firmware driver core Pierre-Louis Bossart
2019-03-29 16:04   ` Takashi Iwai
2019-04-01 17:12     ` Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 02/14] ASoC: SOF: Add Sound Open Firmware KControl support Pierre-Louis Bossart
2019-03-29 16:04   ` Takashi Iwai
2019-04-01 17:13     ` Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 03/14] ASoC: SOF: Add driver debug support Pierre-Louis Bossart
2019-03-29 16:04   ` Takashi Iwai
2019-04-01 17:15     ` Pierre-Louis Bossart
2019-04-02  5:44       ` Mark Brown
2019-04-02 13:47         ` Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 04/14] ASoC: SOF: Add support for IPC IO between DSP and Host Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 05/14] ASoC: SOF: Add PCM operations support Pierre-Louis Bossart
2019-04-04 10:37   ` Takashi Iwai
2019-04-04 11:00     ` [Sound-open-firmware] " Liam Girdwood
2019-04-04 11:19     ` Keyon Jie
2019-04-04 13:53     ` Pierre-Louis Bossart
2019-04-04 14:03       ` Takashi Iwai
2019-04-04 19:13     ` Ranjani Sridharan
2019-04-05 12:30       ` Takashi Iwai
2019-04-05 14:24         ` Ranjani Sridharan
2019-04-08 19:31         ` Pierre-Louis Bossart
2019-04-09  8:04           ` Takashi Iwai
2019-04-09 13:50             ` Pierre-Louis Bossart
2019-04-09 14:23               ` [Sound-open-firmware] " Pierre-Louis Bossart
2019-04-09 15:48                 ` Takashi Iwai
2019-04-09 16:11                   ` Pierre-Louis Bossart
2019-04-09 16:52                     ` Takashi Iwai
2019-03-21 16:10 ` [PATCH v5 06/14] ASoC: SOF: Add support for loading topologies Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 07/14] ASoC: SOF: Add DSP firmware logger support Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 08/14] ASoC: SOF: Add DSP HW abstraction operations Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 09/14] ASoC: SOF: Add firmware loader support Pierre-Louis Bossart
2019-04-04 13:25   ` Takashi Iwai
2019-04-04 13:59     ` [Sound-open-firmware] " Pierre-Louis Bossart
2019-04-04 14:05       ` Takashi Iwai
2019-03-21 16:10 ` [PATCH v5 10/14] ASoC: SOF: Add userspace ABI support Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 11/14] ASoC: SOF: Add PM support Pierre-Louis Bossart
2019-04-04 13:31   ` Takashi Iwai
2019-03-21 16:10 ` [PATCH v5 12/14] ASoC: SOF: Add Nocodec machine driver support Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 13/14] ASoC: SOF: Add xtensa support Pierre-Louis Bossart
2019-03-21 16:10 ` [PATCH v5 14/14] ASoC: SOF: Add utils Pierre-Louis Bossart
2019-04-04 13:34   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.