Skip to contentSkip to conversation

ASoC: Docs: Update the Overview document

PATCH Applied Liam Girdwood 2 participants 4 messages Jan 7, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Docs: Update the Overview document

Update the ASoC overview to bring it up to date with the current code base and include multi-component.

---
 Documentation/sound/alsa/soc/overview.txt | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)
Documentation/sound/alsa/soc/overview.txt +18 -9
index 138ac88..ff88f52 100644
@@ -49,18 +49,23 @@ features :-
   * Machine specific controls: Allow machines to add controls to the sound card
     (e.g. volume control for speaker amplifier).
 
-To achieve all this, ASoC basically splits an embedded audio system into 3
-components :-
+To achieve all this, ASoC basically splits an embedded audio system into
+multiple re-usable component drivers :-
 
-  * Codec driver: The codec driver is platform independent and contains audio
-    controls, audio interface capabilities, codec DAPM definition and codec IO
-    functions.
+  * Codec class drivers: The codec class driver is platform independent and
+    contains audio controls, audio interface capabilities, codec DAPM
+    definition and codec IO functions. This class extends to BT, FM and MODEM
+    ICs if required. Codec class drivers should be generic code that can run
+    on any architecture and machine.
 
-  * Platform driver: The platform driver contains the audio DMA engine and audio
-    interface drivers (e.g. I2S, AC97, PCM) for that platform.
+  * Platform class drivers: The platform class driver includes the audio DMA
+    engine driver, digital audio interface (DAI) drivers (e.g. I2S, AC97, PCM)
+    and any audio DSP drivers for that platform.
 
-  * Machine driver: The machine driver handles any machine specific controls and
-    audio events (e.g. turning on an amp at start of playback).
+  * Machine class driver: The machine driver class acts as the glue that
+    decribes and binds the other component drivers together to form an ALSA
+    "sound card device". It handles any machine specific controls and
+    machine level audio events (e.g. turning on an amp at start of playback).
 
 
 Documentation
@@ -84,3 +89,7 @@ machine.txt: Machine driver internals.
 pop_clicks.txt: How to minimise audio artifacts.
 
 clocking.txt: ASoC clocking for best power performance.
+
+jack.txt: ASoC jack detection.
+
+DPCM.txt: Dynamic PCM - Describes DPCM with DSP examples.
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 ASoC: dpcm: Explicitly set BE DAI link supported stream directions

Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such wont have set a minimum number of playback or capture channels required for BE DAI registration (to establish supported stream directions).

Force machine drivers to explicitly set whether they support playback and capture stream directions for every BE DAIs.

---
 include/sound/soc.h | 4 ++++
 sound/soc/soc-pcm.c | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)
include/sound/soc.h +4 -0
index 1cda7d3..0a600b8d 100644
@@ -888,6 +888,10 @@ struct snd_soc_dai_link {
 	/* This DAI link can route to other DAI links at runtime (Frontend)*/
 	unsigned int dynamic:1;
 
+	/* DPCM capture and Playback support */
+	unsigned int dpcm_capture:1;
+	unsigned int dpcm_playback:1;
+
 	/* pmdown_time is ignored at stop */
 	unsigned int ignore_pmdown_time:1;
 
sound/soc/soc-pcm.c +2 -4
index feb0f28..9680d5f 100644
@@ -2133,10 +2133,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 	int ret = 0, playback = 0, capture = 0;
 
 	if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) {
-		if (cpu_dai->driver->playback.channels_min)
-			playback = 1;
-		if (cpu_dai->driver->capture.channels_min)
-			capture = 1;
+		playback = rtd->dai_link->dpcm_playback;
+		capture = rtd->dai_link->dpcm_capture;
 	} else {
 		if (codec_dai->driver->playback.channels_min &&
 		    cpu_dai->driver->playback.channels_min)
Signature · 1 line
1.8.3.2
maintainer Applied
#2 lore raw

Re: [PATCH] ASoC: dpcm: Explicitly set BE DAI link supported stream directions

Quoted 6 lines · Liam Girdwood

Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such wont have set a minimum number of playback or capture channels required for BE DAI registration (to establish supported stream directions).

Force machine drivers to explicitly set whether they support playback and capture stream directions for every BE DAIs.

Applied, thanks!

maintainer Applied
#3 lore raw
In reply to Liam Girdwood
Quoted 2 lines · Liam Girdwood

Update the ASoC overview to bring it up to date with the current code base and include multi-component.

Applied, thanks.