<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/sound/pcm_params.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-11-27T16:27:41+00:00</updated>
<entry>
<title>ALSA: hda: Upgrade stream-format infrastructure</title>
<updated>2023-11-27T16:27:41+00:00</updated>
<author>
<name>Cezary Rojewski</name>
<email>cezary.rojewski@intel.com</email>
</author>
<published>2023-11-17T12:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d24f1a090d3f2a5c86a8782afeda71c2d2539966'/>
<id>urn:sha1:d24f1a090d3f2a5c86a8782afeda71c2d2539966</id>
<content type='text'>
Introduce a set of functions that ultimately facilite SDxFMT-related
calculations in atomic manner:

First, introduce snd_pcm_subformat_width() and snd_pcm_hw_params_bits()
helpers that separate the base functionality from the HDAudio-specific
one.

snd_hdac_format_normalize() - format converter. S20_LE, S24_LE and their
unsigned and BE friends are invalid from HDAudio perspective but still
can be specified as function argument due to compatibility reasons.

snd_hdac_stream_format_bits() - obtain just the bits-per-sample value.
Does not ignore subformat and msbits parameters.

snd_hdac_stream_format() and snd_hdac_spdif_stream_format() - obtain the
SDxFMT value given the audio format parameters. The former is stripped
away of spdif-related information. Useful for users that do not care
about them.

Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Cezary Rojewski &lt;cezary.rojewski@intel.com&gt;
Acked-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Link: https://lore.kernel.org/r/20231117120610.1755254-5-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Remove unused inline function snd_mask_sizeof</title>
<updated>2020-09-09T16:43:07+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2020-09-09T13:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5554743d88483934cabff45943913be0830e66bc'/>
<id>urn:sha1:5554743d88483934cabff45943913be0830e66bc</id>
<content type='text'>
There is no caller in tree, so can remove it.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Link: https://lore.kernel.org/r/20200909135744.33464-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: More helper macros for reducing snd_pcm_format_t cast</title>
<updated>2020-02-10T07:27:08+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-02-06T16:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9c7d41087bc1755e01f9584f0bdbce0bb8b195d'/>
<id>urn:sha1:b9c7d41087bc1755e01f9584f0bdbce0bb8b195d</id>
<content type='text'>
snd_pcm_format_t is a strong-typed integer and requires the explicit
cast with __force if converted or compared with a normal integer
value.  Since most of use cases do iterate over all formats and test /
set the mask, provide a couple of new helper macros that do the
explicit cast.

Link: https://lore.kernel.org/r/20200206163945.6797-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156</title>
<updated>2019-05-30T18:26:35+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6'/>
<id>urn:sha1:1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Fix interval evaluation with openmin/max</title>
<updated>2018-11-29T11:05:19+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-11-29T11:05:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5363857b916c1f48027e9b96ee8be8376bf20811'/>
<id>urn:sha1:5363857b916c1f48027e9b96ee8be8376bf20811</id>
<content type='text'>
As addressed in alsa-lib (commit b420056604f0), we need to fix the
case where the evaluation of PCM interval "(x x+1]" leading to
-EINVAL.  After applying rules, such an interval may be translated as
"(x x+1)".

Fixes: ff2d6acdf6f1 ("ALSA: pcm: Fix snd_interval_refine first/last with open min/max")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Add snd_mask_set_format() helper for standard usages</title>
<updated>2018-07-26T16:09:04+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-07-25T21:17:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b62834e73e332fea76a340d62aaf50c732b17e0'/>
<id>urn:sha1:0b62834e73e332fea76a340d62aaf50c732b17e0</id>
<content type='text'>
Many drivers calling snd_mask_set() need to do ugly cast with __force
for shutting up the sparse warnings.  Actually almost all of them are
about setting the format, so it's far better to provide a common
helper snd_mask_set_format() to pass SNDRV_PCM_FORMAT_* directly
without the cast.

There are a few other calls of snd_mask_set(), but they are in the PCM
core code, so we leave them for now.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: Add params_set_format helper</title>
<updated>2015-02-23T15:43:18+00:00</updated>
<author>
<name>Fang, Yang A</name>
<email>yang.a.fang@intel.com</email>
</author>
<published>2015-02-09T08:18:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=052a9f698268e606ca01eb1ce2a672e548f2ce11'/>
<id>urn:sha1:052a9f698268e606ca01eb1ce2a672e548f2ce11</id>
<content type='text'>
Add a helper to set pcm format directly from params

Signed-off-by: Fang, Yang A &lt;yang.a.fang@intel.com&gt;
Reviewed-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Replace custom ld2 function with __fls</title>
<updated>2014-12-30T15:41:56+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2014-12-29T18:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=757b037650c9ecca79a46ab744820b1b3c1bb49d'/>
<id>urn:sha1:757b037650c9ecca79a46ab744820b1b3c1bb49d</id>
<content type='text'>
__fls has the same semantics as ld2, so there is no need to re-implement it.
Furthermore a lot of architectures have custom implementations of __fls that
are able to use special hardware instructions to compute the result. This
makes the code slightly shorter and faster.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Use __ffs() instead of ffs() in snd_mask_min()</title>
<updated>2014-12-30T15:41:55+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2014-12-29T18:41:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=599ee3291ae88700749e2910a11d1c0f0532355e'/>
<id>urn:sha1:599ee3291ae88700749e2910a11d1c0f0532355e</id>
<content type='text'>
The difference between __ffs and ffs is that ffs will return a one based
index whereas __ffs will return a zero based index. Furthermore ffs will
check if the passed value is zero and return zero in that case, whereas
__ffs behavior is undefined if the passed parameter is 0.

Since we already check if the mask is 0 before calling ffs and also subtract
1 from the result __ffs is the better choice.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: pcm: Simplify params_period_bytes()</title>
<updated>2014-12-30T15:41:55+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2014-12-29T18:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd9978f1d3dbb9596a7ab9c652cb0d9b355489b5'/>
<id>urn:sha1:cd9978f1d3dbb9596a7ab9c652cb0d9b355489b5</id>
<content type='text'>
The hw_params struct has a parameter that contains the period size in bytes.
This can be used instead of deriving the value from other parameters. This
is similar to e.g. params_buffer_bytes()

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
