[bootlin/training-materials updates] master: audio: slide improvements (fe59a42b)

Alexandre Belloni alexandre.belloni at bootlin.com
Thu Sep 14 23:32:21 CEST 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/fe59a42bbf8859c1353d334c0a0d46fe2ac545a3

>---------------------------------------------------------------

commit fe59a42bbf8859c1353d334c0a0d46fe2ac545a3
Author: Alexandre Belloni <alexandre.belloni at bootlin.com>
Date:   Thu Sep 14 23:32:21 2023 +0200

    audio: slide improvements
    
    Signed-off-by: Alexandre Belloni <alexandre.belloni at bootlin.com>


>---------------------------------------------------------------

fe59a42bbf8859c1353d334c0a0d46fe2ac545a3
 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 b8386625..1fb2e2be 100644
--- a/slides/audio-alsa-lib/audio-alsa-lib.tex
+++ b/slides/audio-alsa-lib/audio-alsa-lib.tex
@@ -7,7 +7,7 @@
   \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 @@ int snd_pcm_close(snd_pcm_t *pcm)
   \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 @@ int snd_ctl_elem_write(snd_ctl_t *ctl, snd_ctl_elem_value_t *data)
   \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 7d04976a..32c6c1c7 100644
--- a/slides/audio-asoc-codec/audio-asoc-codec.tex
+++ b/slides/audio-asoc-codec/audio-asoc-codec.tex
@@ -51,9 +51,9 @@ struct snd_soc_component_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 061c8dd2..c41deac0 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 @@ static int aic31xx_set_dai_fmt(struct snd_soc_dai *codec_dai,
 \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 81cdbd0d..e6bb8530 100644
--- a/slides/audio-asoc-cpu/audio-asoc-cpu.tex
+++ b/slides/audio-asoc-cpu/audio-asoc-cpu.tex
@@ -84,7 +84,7 @@ static int atmel_i2s_probe(struct platform_device *pdev)
   \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 9ac1418f..225af37c 100644
--- a/slides/audio-auxiliary/audio-auxiliary.tex
+++ b/slides/audio-auxiliary/audio-auxiliary.tex
@@ -97,7 +97,7 @@ arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
   \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 @@ arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
   \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 256f3a68..09cee9d8 100644
--- a/slides/audio-hardware/audio-hardware.tex
+++ b/slides/audio-hardware/audio-hardware.tex
@@ -89,7 +89,7 @@
 \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




More information about the training-materials-updates mailing list