From fe59a42bbf8859c1353d334c0a0d46fe2ac545a3 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 14 Sep 2023 23:32:21 +0200 Subject: [PATCH] audio: slide improvements Signed-off-by: Alexandre Belloni --- slides/audio-alsa-lib/audio-alsa-lib.tex | 45 ++----------------- slides/audio-asoc-codec/audio-asoc-codec.tex | 4 +- .../audio-asoc-component-callbacks.tex | 2 +- slides/audio-asoc-cpu/audio-asoc-cpu.tex | 2 +- slides/audio-auxiliary/audio-auxiliary.tex | 6 +-- slides/audio-hardware/audio-hardware.tex | 2 +- 6 files changed, 12 insertions(+), 49 deletions(-) diff --git a/slides/audio-alsa-lib/audio-alsa-lib.tex b/slides/audio-alsa-lib/audio-alsa-lib.tex index b83866252f..1fb2e2be1a 100644 --- a/slides/audio-alsa-lib/audio-alsa-lib.tex +++ b/slides/audio-alsa-lib/audio-alsa-lib.tex @@ -7,7 +7,7 @@ \subsection{alsa-lib} \item The main way to interact with ALSA devices is to use alsa-lib. \item \url{https://github.com/alsa-project/alsa-lib.git} \item It provides mainly access to the devices but also goes further - and allows handling audio in userspace + and allows handling audio in userspace. \item The library itself is actually named \code{libasound} \item The include file is \code{alsa/asoundlib.h} \end{itemize} @@ -43,9 +43,10 @@ \subsection{alsa-lib} \item This can be specified as a hardware device. The three arguments (in order: CARD,DEV,SUBDEV) specify card number or identifier, device number and subdevice number (-1 means any). For - example: \code{hw:0} or \code{hw:1,0} + example: \code{hw:0} or \code{hw:1,0}. Instea of the index, the + card name can be used: \code{hw:STM32MP15DK,0} \item Or through the \code{plug} plugin: \code{plug:mypcmdef}, - \code{plug:hw:0,0} + \code{plug:hw:0,0}. \item The list of available names can be generated using \code{snd_card_next} to iterate over all the physical cards. See \code{device_list} in \code{aplay}. @@ -296,44 +297,6 @@ \subsection{alsa-lib} \end{itemize} \end{frame} -\begin{frame}[fragile]{alsa-lib API - controls} - \begin{itemize} - \item - \begin{block}{} - \fontsize{9}{9}\selectfont - \begin{minted}{c} -void snd_ctl_elem_value_set_id(snd_ctl_elem_value_t *obj, const snd_ctl_elem_id_t *ptr) - \end{minted} - \end{block} - \item Links the value with the control id. - \item - \begin{block}{} - \fontsize{9}{9}\selectfont - \begin{minted}{c} -void snd_ctl_elem_value_set_boolean(snd_ctl_elem_value_t *obj, unsigned int idx, long val) -void snd_ctl_elem_value_set_integer(snd_ctl_elem_value_t *obj, unsigned int idx, long val) -void snd_ctl_elem_value_set_integer64(snd_ctl_elem_value_t *obj, unsigned int idx, - long long val) -void snd_ctl_elem_value_set_enumerated(snd_ctl_elem_value_t *obj, unsigned int idx, - unsigned int val) -void snd_ctl_elem_value_set_byte(snd_ctl_elem_value_t *obj, unsigned int idx, - unsigned char val) -void snd_ctl_elem_set_bytes(snd_ctl_elem_value_t *obj, void *data, size_t size) - \end{minted} - \end{block} - \item Set the value in \code{snd_ctl_elem_value_t}. - \item - \begin{block}{} - \fontsize{9}{9}\selectfont - \begin{minted}{c} -int snd_ctl_elem_write(snd_ctl_t *ctl, snd_ctl_elem_value_t *data) - \end{minted} - \end{block} - \item Actually set the control. - \end{itemize} -\end{frame} - - \begin{frame}{Going further} \begin{itemize} \item UCM: The ALSA Use Case Configuration: diff --git a/slides/audio-asoc-codec/audio-asoc-codec.tex b/slides/audio-asoc-codec/audio-asoc-codec.tex index 7d04976ac0..32c6c1c7c6 100644 --- a/slides/audio-asoc-codec/audio-asoc-codec.tex +++ b/slides/audio-asoc-codec/audio-asoc-codec.tex @@ -51,9 +51,9 @@ \subsection{CODEC driver} CODEC. \item \code{struct snd_soc_dapm_widget *dapm_widgets} is an array of power management controls so ASoC can power down the routes that - are not currently used + are not currently used. \item \code{struct snd_soc_dapm_route *dapm_routes} is an array - describing those routes + describing those routes. \end{itemize} \end{frame} diff --git a/slides/audio-asoc-component-callbacks/audio-asoc-component-callbacks.tex b/slides/audio-asoc-component-callbacks/audio-asoc-component-callbacks.tex index 061c8dd2ed..c41deac025 100644 --- a/slides/audio-asoc-component-callbacks/audio-asoc-component-callbacks.tex +++ b/slides/audio-asoc-component-callbacks/audio-asoc-component-callbacks.tex @@ -298,7 +298,7 @@ \subsection{ASoC component callbacks} \begin{frame}{\code{set_tdm_slot}} \begin{itemize} \item This callback configures the DAI for TDM operation. - \item \code{slot} is the total number of slots of the TDM stream and + \item \code{slots} is the total number of slots of the TDM stream and \code{slot_width} the width of each slot in bit clock cycles. \item \code{tx_mask} and \code{rx_mask} are bitmasks specifying the active slots of the TDM stream for the specified DAI, i.e. which slots the diff --git a/slides/audio-asoc-cpu/audio-asoc-cpu.tex b/slides/audio-asoc-cpu/audio-asoc-cpu.tex index 81cdbd0d42..e6bb853046 100644 --- a/slides/audio-asoc-cpu/audio-asoc-cpu.tex +++ b/slides/audio-asoc-cpu/audio-asoc-cpu.tex @@ -84,7 +84,7 @@ \subsection{CPU DAI driver} \item When a peripheral DMA controller is used, this is more complex. \item The driver will have to handle all th aspects of the PCM - stream life cycle + stream life cycle. \item Understandable example in \kfile{sound/soc/atmel/atmel-pcm-pdc.c} \end{itemize} \end{frame} diff --git a/slides/audio-auxiliary/audio-auxiliary.tex b/slides/audio-auxiliary/audio-auxiliary.tex index 9ac1418f37..225af37cc9 100644 --- a/slides/audio-auxiliary/audio-auxiliary.tex +++ b/slides/audio-auxiliary/audio-auxiliary.tex @@ -97,7 +97,7 @@ \subsection{Auxiliary devices} \begin{itemize} \item There may be a muxer on the analog input lines. \item If controlled using a gpio, the \code{simple-mux} driver is - available + available. \item It exposes two inputs: "IN1" and "IN2" and one output, "OUT". \item The device tree binding allows to provide a prefix to make the routes specific. @@ -120,9 +120,9 @@ \subsection{Auxiliary devices} \begin{itemize} \item This exposes routes between \code{Mic Mux IN1} and \code{Mic Mux IN2} to \code{Mic Mux OUT}. - \item This route is controlled by \code{gpio5 5} + \item This route is controlled by \code{gpio5 5}. \item A control named \code{Mic Mux Muxer} will be exposed to - userspace + userspace. \end{itemize} \end{frame} diff --git a/slides/audio-hardware/audio-hardware.tex b/slides/audio-hardware/audio-hardware.tex index 256f3a682c..09cee9d8d3 100644 --- a/slides/audio-hardware/audio-hardware.tex +++ b/slides/audio-hardware/audio-hardware.tex @@ -89,7 +89,7 @@ \subsection{SoC Digital Audio Interface} \begin{frame}{SoC} \begin{itemize} \item The SoC also has a dedicated synchronous serial interface. - \item Some are generic serial interfaces others ar dedicated to audio + \item Some are generic serial interfaces others are dedicated to audio formats. \item It has a DMA controller or a peripheral DMA controller (PDC) able to copy samples from memory to the serial interface registers