All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: core: Only add platform DAI widgets once.
@ 2013-09-13 17:09 Liam Girdwood
  2013-09-13 17:09 ` [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers Liam Girdwood
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Liam Girdwood @ 2013-09-13 17:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

Currently platform CPU DAI widgets are created in soc_probe_platform and
soc_probe_link_dais. Remove the extra call in soc_probe_link_dais().

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 sound/soc/soc-core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8e86aba..09e341d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1365,7 +1365,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
 				return -ENODEV;
 
 			list_add(&cpu_dai->dapm.list, &card->dapm_list);
-			snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai);
 		}
 
 		if (cpu_dai->driver->probe) {
-- 
1.8.1.2

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

* [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers
  2013-09-13 17:09 [PATCH] ASoC: core: Only add platform DAI widgets once Liam Girdwood
@ 2013-09-13 17:09 ` Liam Girdwood
  2013-09-13 17:27   ` Mark Brown
  2013-09-13 17:09 ` [PATCH] ASoC: core utils: Dont set DMA params for BE substreams Liam Girdwood
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Liam Girdwood @ 2013-09-13 17:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

Fix build so that asoc trace event header doesn't depend on other headers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 include/trace/events/asoc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 5fc2dcd..03996b2 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -14,6 +14,7 @@ struct snd_soc_codec;
 struct snd_soc_platform;
 struct snd_soc_card;
 struct snd_soc_dapm_widget;
+struct snd_soc_dapm_path;
 
 /*
  * Log register events
-- 
1.8.1.2

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

* [PATCH] ASoC: core utils: Dont set DMA params for BE substreams
  2013-09-13 17:09 [PATCH] ASoC: core: Only add platform DAI widgets once Liam Girdwood
  2013-09-13 17:09 ` [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers Liam Girdwood
@ 2013-09-13 17:09 ` Liam Girdwood
  2013-09-13 17:27   ` Mark Brown
  2013-09-13 17:09 ` [PATCH] ASoC: core: Add API for configuration of DAI FS Liam Girdwood
  2013-09-13 17:28 ` [PATCH] ASoC: core: Only add platform DAI widgets once Mark Brown
  3 siblings, 1 reply; 11+ messages in thread
From: Liam Girdwood @ 2013-09-13 17:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

BE substreams dont require dummy DMA configs so dont set any.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 sound/soc/soc-utils.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 29b211e..5e63365 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -75,7 +75,11 @@ static const struct snd_pcm_hardware dummy_dma_hardware = {
 
 static int dummy_dma_open(struct snd_pcm_substream *substream)
 {
-	snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+
+	/* BE's dont need dummy params */
+	if (!rtd->dai_link->no_pcm)
+		snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
 
 	return 0;
 }
-- 
1.8.1.2

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

* [PATCH] ASoC: core: Add API for configuration of DAI FS
  2013-09-13 17:09 [PATCH] ASoC: core: Only add platform DAI widgets once Liam Girdwood
  2013-09-13 17:09 ` [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers Liam Girdwood
  2013-09-13 17:09 ` [PATCH] ASoC: core utils: Dont set DMA params for BE substreams Liam Girdwood
@ 2013-09-13 17:09 ` Liam Girdwood
  2013-09-13 17:26   ` Mark Brown
  2013-09-13 17:28 ` [PATCH] ASoC: core: Only add platform DAI widgets once Mark Brown
  3 siblings, 1 reply; 11+ messages in thread
From: Liam Girdwood @ 2013-09-13 17:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

Some codec drivers when running in slave mode require that FS is explicitly
set by the machine driver as it may not be exactly BCLK/rate.

Extend the DAI API by adding :-

int snd_soc_dai_set_fs(struct snd_soc_dai *dai, unsigned int fs);

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 include/sound/soc-dai.h |  3 +++
 sound/soc/soc-core.c    | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index ae9a227..06d2ce5 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -105,6 +105,8 @@ int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
 int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
 	int pll_id, int source, unsigned int freq_in, unsigned int freq_out);
 
+int snd_soc_dai_set_dfs(struct snd_soc_dai *dai, unsigned int fs);
+
 /* Digital Audio interface formatting */
 int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
 
@@ -131,6 +133,7 @@ struct snd_soc_dai_ops {
 	int (*set_pll)(struct snd_soc_dai *dai, int pll_id, int source,
 		unsigned int freq_in, unsigned int freq_out);
 	int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div);
+	int (*set_dfs)(struct snd_soc_dai *dai, unsigned int fs);
 
 	/*
 	 * DAI format configuration
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 09e341d..90b86cc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3380,6 +3380,22 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
 EXPORT_SYMBOL_GPL(snd_soc_codec_set_pll);
 
 /**
+ * snd_soc_dai_set_dfs - configure DAI FS.
+ * @dai: DAI
+ * @fs Ration of BCLK to Sample rate
+ *
+ * Configures the DAI for a preset FS.
+ */
+int snd_soc_dai_set_dfs(struct snd_soc_dai *dai, unsigned int fs)
+{
+	if (dai->driver && dai->driver->ops->set_dfs)
+		return dai->driver->ops->set_dfs(dai, fs);
+	else
+		return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dai_set_dfs);
+
+/**
  * snd_soc_dai_set_fmt - configure DAI hardware audio format.
  * @dai: DAI
  * @fmt: SND_SOC_DAIFMT_ format value.
-- 
1.8.1.2

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

* Re: [PATCH] ASoC: core: Add API for configuration of DAI FS
  2013-09-13 17:09 ` [PATCH] ASoC: core: Add API for configuration of DAI FS Liam Girdwood
@ 2013-09-13 17:26   ` Mark Brown
  2013-09-16 10:28     ` Liam Girdwood
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2013-09-13 17:26 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 856 bytes --]

On Fri, Sep 13, 2013 at 06:09:48PM +0100, Liam Girdwood wrote:
> Some codec drivers when running in slave mode require that FS is explicitly
> set by the machine driver as it may not be exactly BCLK/rate.
> 
> Extend the DAI API by adding :-
> 
> int snd_soc_dai_set_fs(struct snd_soc_dai *dai, unsigned int fs);

I'm struggling to think of a better name for this right now but the _fs
name is making me think of the MCLK/SYSCLK rate rather than the BCLK
rate - lots of clocks get specified as a multiple of the sample rate so
it's not jumping out which clock.  The best I can come up with is
_bclk_fs() but perhaps there are better ideas?  Or should we pass in a
clock ID (and provide standard defines for things like BCLK) so it can
apply to any clock?

Though looking at your ACPI ID patch perhaps pwgen can give us some good
ideas :)

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers
  2013-09-13 17:09 ` [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers Liam Girdwood
@ 2013-09-13 17:27   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-09-13 17:27 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 158 bytes --]

On Fri, Sep 13, 2013 at 06:09:46PM +0100, Liam Girdwood wrote:
> Fix build so that asoc trace event header doesn't depend on other headers.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: core utils: Dont set DMA params for BE substreams
  2013-09-13 17:09 ` [PATCH] ASoC: core utils: Dont set DMA params for BE substreams Liam Girdwood
@ 2013-09-13 17:27   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-09-13 17:27 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 145 bytes --]

On Fri, Sep 13, 2013 at 06:09:47PM +0100, Liam Girdwood wrote:
> BE substreams dont require dummy DMA configs so dont set any.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: core: Only add platform DAI widgets once.
  2013-09-13 17:09 [PATCH] ASoC: core: Only add platform DAI widgets once Liam Girdwood
                   ` (2 preceding siblings ...)
  2013-09-13 17:09 ` [PATCH] ASoC: core: Add API for configuration of DAI FS Liam Girdwood
@ 2013-09-13 17:28 ` Mark Brown
  3 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2013-09-13 17:28 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 227 bytes --]

On Fri, Sep 13, 2013 at 06:09:45PM +0100, Liam Girdwood wrote:
> Currently platform CPU DAI widgets are created in soc_probe_platform and
> soc_probe_link_dais. Remove the extra call in soc_probe_link_dais().

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: core: Add API for configuration of DAI FS
  2013-09-13 17:26   ` Mark Brown
@ 2013-09-16 10:28     ` Liam Girdwood
  2013-09-16 11:05       ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Liam Girdwood @ 2013-09-16 10:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Fri, 2013-09-13 at 18:26 +0100, Mark Brown wrote:
> On Fri, Sep 13, 2013 at 06:09:48PM +0100, Liam Girdwood wrote:
> > Some codec drivers when running in slave mode require that FS is explicitly
> > set by the machine driver as it may not be exactly BCLK/rate.
> > 
> > Extend the DAI API by adding :-
> > 
> > int snd_soc_dai_set_fs(struct snd_soc_dai *dai, unsigned int fs);
> 
> I'm struggling to think of a better name for this right now but the _fs
> name is making me think of the MCLK/SYSCLK rate rather than the BCLK
> rate - lots of clocks get specified as a multiple of the sample rate so
> it's not jumping out which clock.  The best I can come up with is
> _bclk_fs() but perhaps there are better ideas?  Or should we pass in a
> clock ID (and provide standard defines for things like BCLK) so it can
> apply to any clock?
> 

My initial thought was for set_fs(), but this collides with a global FS
macro :(

I'll change the naming so it's set_bclk() and the params to keep it in
line with snd_soc_dai_set_sysclk().

Liam

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

* Re: [PATCH] ASoC: core: Add API for configuration of DAI FS
  2013-09-16 10:28     ` Liam Girdwood
@ 2013-09-16 11:05       ` Mark Brown
  2013-09-16 11:32         ` Liam Girdwood
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2013-09-16 11:05 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

On Mon, Sep 16, 2013 at 11:28:29AM +0100, Liam Girdwood wrote:

> I'll change the naming so it's set_bclk() and the params to keep it in
> line with snd_soc_dai_set_sysclk().

bclk_ratio()?  Otherwise I bet people will just pass the absolute BCLK
rate in (though perhaps that's actually easier for them...).  We could
also just create a standard define for set_sysclk() if we were going to
do a straight rate.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: core: Add API for configuration of DAI FS
  2013-09-16 11:05       ` Mark Brown
@ 2013-09-16 11:32         ` Liam Girdwood
  0 siblings, 0 replies; 11+ messages in thread
From: Liam Girdwood @ 2013-09-16 11:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Mon, 2013-09-16 at 12:05 +0100, Mark Brown wrote:
> On Mon, Sep 16, 2013 at 11:28:29AM +0100, Liam Girdwood wrote:
> 
> > I'll change the naming so it's set_bclk() and the params to keep it in
> > line with snd_soc_dai_set_sysclk().
> 
> bclk_ratio()? 

ok, that sounds best :)

Liam

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

end of thread, other threads:[~2013-09-16 11:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13 17:09 [PATCH] ASoC: core: Only add platform DAI widgets once Liam Girdwood
2013-09-13 17:09 ` [PATCH] ASoC: trace: Make sure trace header doesnt depend on any headers Liam Girdwood
2013-09-13 17:27   ` Mark Brown
2013-09-13 17:09 ` [PATCH] ASoC: core utils: Dont set DMA params for BE substreams Liam Girdwood
2013-09-13 17:27   ` Mark Brown
2013-09-13 17:09 ` [PATCH] ASoC: core: Add API for configuration of DAI FS Liam Girdwood
2013-09-13 17:26   ` Mark Brown
2013-09-16 10:28     ` Liam Girdwood
2013-09-16 11:05       ` Mark Brown
2013-09-16 11:32         ` Liam Girdwood
2013-09-13 17:28 ` [PATCH] ASoC: core: Only add platform DAI widgets once Mark Brown

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.