<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/sound/soc/soc-utils.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/sound/soc/soc-utils.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/sound/soc/soc-utils.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-05T17:27:55Z</updated>
<entry>
<title>ASoC: soc-utils: Add helper to calculate BCLK from TDM info</title>
<updated>2022-04-05T17:27:55Z</updated>
<author>
<name>Richard Fitzgerald</name>
<email>rf@opensource.cirrus.com</email>
</author>
<published>2022-04-05T13:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1ef34dd2b90d78a9830398441801658ef86eee9d'/>
<id>urn:sha1:1ef34dd2b90d78a9830398441801658ef86eee9d</id>
<content type='text'>
Add a helper function snd_soc_tdm_params_to_bclk() to calculate
the bclk from params info and the tdm sots configuration.

When using a TDM frame of N slots of width W bits:

   bclk = sample_rate * N * W

As a convenience to simplify calling code, if the slot count or
slot width are 0 a value will be obtained from the params. This
allows calling code to use this one function to handle cases of
TDM where only one parameter is fixed, or I2S where the slot width
is fixed (for example to set a 32-bit slot for 24-bit samples).

Also as a convenience the slot count can optionally be rounded up
to a multiple. This is mainly useful for I2S systems, since I2S has
two phases of LRCLK the number of slots is always a multiple of 2.

Signed-off-by: Richard Fitzgerald &lt;rf@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20220405135419.1230088-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: Stop dummy from overriding hwparams</title>
<updated>2021-10-29T15:49:45Z</updated>
<author>
<name>Amadeusz Sławiński</name>
<email>amadeuszx.slawinski@linux.intel.com</email>
</author>
<published>2021-10-15T16:12:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c504663ba2ee2abeaf5622e27082819326c1bd4'/>
<id>urn:sha1:6c504663ba2ee2abeaf5622e27082819326c1bd4</id>
<content type='text'>
In case that there are other components assigned to runtime device,
depending on order dummy component can override their params with its
own, which shouldn't happen. Check if there are any other components
assigned to rtd and if so, skip setting hwparams.

Occurs when using topology where 'snd-soc-dummy' gets assigned by
default as codec and platform component.

Alternative approach would be to copy whole dummy handling and rename it
to "snd-soc-null" or something similar. And remove hwparams assignment
to make it really do nothing.

Signed-off-by: Amadeusz Sławiński &lt;amadeuszx.slawinski@linux.intel.com&gt;
Signed-off-by: Cezary Rojewski &lt;cezary.rojewski@intel.com&gt;
Link: https://lore.kernel.org/r/20211015161257.27052-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()</title>
<updated>2021-06-07T14:55:12Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2021-05-27T02:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ba9e82a1c8919340bee0dd7f7cafb8749810aabe'/>
<id>urn:sha1:ba9e82a1c8919340bee0dd7f7cafb8749810aabe</id>
<content type='text'>
ASoC is using dai_link which specify DAI format (= dai_link-&gt;dai_fmt),
and it is selected by "Sound Card" driver in corrent implementation.
In other words, Sound Card *needs* to setup it.
But, it should be possible to automatically selected from CPU and
Codec driver settings.

This patch adds new .auto_selectable_formats support
at snd_soc_dai_ops.

By this patch, dai_fmt can be automatically selected from each
driver if both CPU / Codec driver had it.
Automatically selectable *field* is depends on each drivers.

For example, some driver want to select format "automatically",
but want to select other fields "manually", because of complex limitation.
Or other example, in case of both CPU and Codec are possible to be
clock provider, but the quality was different.
In these case, user need/want to *manually* select each fields
from Sound Card driver.

This .auto_selectable_formats can set priority.
For example, no limitaion format can be HI priority,
supported but has picky limitation format can be next priority, etc.

It uses Sound Card specified fields preferentially, and try to select
non-specific fields from CPU and Codec driver automatically
if all drivers have .auto_selectable_formats.

In other words, we can select all dai_fmt via Sound Card driver
same as before.

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87h7ionc8s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: add snd_soc_component_is_dummy()</title>
<updated>2021-04-16T13:34:12Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2021-04-16T02:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8f1a16818a08047c83bc6e29efc07b15fd11fa29'/>
<id>urn:sha1:8f1a16818a08047c83bc6e29efc07b15fd11fa29</id>
<content type='text'>
There is snd_soc_dai_is_dummy(), but not for component.
This patch adds it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87zgxzxa2t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-xxx: add asoc_substream_to_rtd()</title>
<updated>2020-07-23T18:07:19Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2020-07-20T01:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0ceef681e34a61afcd77af0837b2132925c5bad4'/>
<id>urn:sha1:0ceef681e34a61afcd77af0837b2132925c5bad4</id>
<content type='text'>
Current soc-xxx are getting rtd from substream by

	rtd = substream-&gt;private_data;

But, getting data from "private_data" is very unclear.
This patch adds asoc_substream_to_rtd() macro which is
easy to understand that rtd from substream.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87wo2z0yve.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>asoc: Update supported rate and format for dummy dai</title>
<updated>2020-06-29T17:48:51Z</updated>
<author>
<name>Rohit kumar</name>
<email>rohitkr@codeaurora.org</email>
</author>
<published>2020-06-27T13:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=abc17b2974d634c17d25be7f4472890c8533a005'/>
<id>urn:sha1:abc17b2974d634c17d25be7f4472890c8533a005</id>
<content type='text'>
Add support for 384KHz sample rate and S24_3LE
bitwidth for dummy dai.

Signed-off-by: Rohit kumar &lt;rohitkr@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1593265030-1451-1-git-send-email-rohitkr@codeaurora.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: utils: Drop superfluous ioctl PCM ops</title>
<updated>2019-12-11T16:00:48Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-12-10T14:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=93ec6953c1d7b3c5f62d35c76fe6670c6d9b3c8c'/>
<id>urn:sha1:93ec6953c1d7b3c5f62d35c76fe6670c6d9b3c8c</id>
<content type='text'>
ASoC PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://lore.kernel.org/r/20191210145406.21419-23-tiwai@suse.de
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: remove snd_pcm_ops</title>
<updated>2019-10-08T12:50:43Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2019-10-02T05:35:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a49e460f847f54600fb1fdae63765eb54ae659cc'/>
<id>urn:sha1:a49e460f847f54600fb1fdae63765eb54ae659cc</id>
<content type='text'>
snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/874l0r90c6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: add soc-component.c</title>
<updated>2019-08-05T15:16:19Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2019-07-26T04:49:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4ff1fef10f353b928bcc9d56d31fda53f2c43191'/>
<id>urn:sha1:4ff1fef10f353b928bcc9d56d31fda53f2c43191</id>
<content type='text'>
ALSA SoC has many snd_soc_component_xxx(), but these are randomly
located in many files. Because of it, code is difficult to read.
This patch creates new soc-component.c, and moves existing
snd_soc_component_xxx() into it.
But not yet fully. We need more cleanup it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87imrp5roa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: Rename dummy_dma_ops to snd_dummy_dma_ops</title>
<updated>2018-09-27T22:15:46Z</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2018-09-25T18:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=42cfb412e24ffbb46d6de9590293bc44f921a0fb'/>
<id>urn:sha1:42cfb412e24ffbb46d6de9590293bc44f921a0fb</id>
<content type='text'>
The symbols 'dummy_dma_ops' is declared with different data types by
sound/soc/soc-utils.c and arch/arm64/include/asm/dma-mapping.h. This
leads to conflicts when soc-utils.c (indirectly) includes dma-mapping.h:

sound/soc/soc-utils.c:282:33: error: conflicting types for 'dummy_dma_ops'
  static const struct snd_pcm_ops dummy_dma_ops = {
                                  ^
...
arch/arm64/include/asm/dma-mapping.h:27:33: note: previous declaration of 'dummy_dma_ops' was here
  extern const struct dma_map_ops dummy_dma_ops;
                                  ^

Rename the symbol in soc-utils.c to 'snd_dummy_dma_ops' to avoid the
conflict.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
