mbox series

[00/13] ALSA: update sample rate definitions

Message ID 20240905-alsa-12-24-128-v1-0-8371948d3921@baylibre.com (mailing list archive)
Headers show
Series ALSA: update sample rate definitions | expand

Message

Jerome Brunet Sept. 5, 2024, 2:12 p.m. UTC
This patchset adds rate definitions for 12kHz, 24kHz and 128kHz.

It is follow-up on the series/discussion [0] about adding 128kHz for
spdif/eARC support. The outcome was to add 12kHz and 24kHz as well and
clean up the drivers that no longer require custom rules to allow these
rates.

Identifying these drivers is not straight forward, I tried my best but I
may have missed some. Those will continue to work anyway so it is not
critical. Some drivers using these rates have not been changed on
purpose. The reason for this may be:
* The driver used other uncommon rates that still don't have a definition
  so a custom rule is still required.
* The constraint structure is used in some other way by the driver and
  removing it would not help the readability or maintainability. This is
  the case the freescale asrc drivers for example.

There is one change per driver so, if there is a problem later on, it will
easier to properly add Fixes tag.

The series has been tested with
* ARM64 defconfig - spdif 128kHz at runtime.
* x86_64 allmodconfig - compile test only

Last, the change adding IEC958 definitions has been dropped for this
patchset and will be resent separately

[0]: https://lore.kernel.org/all/20240628122429.2018059-1-jbrunet@baylibre.com/

---
Jerome Brunet (13):
      ALSA: pcm: add more sample rate definitions
      ALSA: cmipci: drop SNDRV_PCM_RATE_KNOT
      ALSA: emu10k1: drop SNDRV_PCM_RATE_KNOT
      ALSA: hdsp: drop SNDRV_PCM_RATE_KNOT
      ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
      ASoC: cs35l36: drop SNDRV_PCM_RATE_KNOT
      ASoC: cs35l41: drop SNDRV_PCM_RATE_KNOT
      ASoC: cs53l30: drop SNDRV_PCM_RATE_KNOT
      ASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT
      ASoC: qcom: q6asm-dai: drop SNDRV_PCM_RATE_KNOT
      ASoC: sunxi: sun4i-codec: drop SNDRV_PCM_RATE_KNOT
      ASoC: cs35l34: drop useless rate contraint
      ASoC: spdif: extend supported rates to 768kHz

 include/sound/pcm.h                  | 31 +++++++++++++++++--------------
 sound/core/pcm_native.c              |  6 +++---
 sound/pci/cmipci.c                   | 32 +++++++++-----------------------
 sound/pci/emu10k1/emupcm.c           | 31 +++++--------------------------
 sound/pci/rme9652/hdsp.c             | 18 ++++++------------
 sound/pci/rme9652/hdspm.c            | 16 +---------------
 sound/soc/codecs/cs35l34.c           | 21 ---------------------
 sound/soc/codecs/cs35l36.c           | 34 ++++++++++++----------------------
 sound/soc/codecs/cs35l41.c           | 34 +++++++++++-----------------------
 sound/soc/codecs/cs53l30.c           | 24 +++---------------------
 sound/soc/codecs/spdif_receiver.c    |  3 ++-
 sound/soc/codecs/spdif_transmitter.c |  3 ++-
 sound/soc/intel/avs/pcm.c            | 22 ++++++----------------
 sound/soc/qcom/qdsp6/q6asm-dai.c     | 31 ++++++++++---------------------
 sound/soc/sunxi/sun4i-codec.c        | 28 +++++++++-------------------
 15 files changed, 96 insertions(+), 238 deletions(-)
---
base-commit: 785f4052380684dbcc156203c537c799e2f4be09
change-id: 20240905-alsa-12-24-128-8edab4c08dd4

Best regards,

Comments

Mark Brown Sept. 5, 2024, 2:17 p.m. UTC | #1
On Thu, Sep 05, 2024 at 04:12:51PM +0200, Jerome Brunet wrote:
> This patchset adds rate definitions for 12kHz, 24kHz and 128kHz.
> 
> It is follow-up on the series/discussion [0] about adding 128kHz for
> spdif/eARC support. The outcome was to add 12kHz and 24kHz as well and
> clean up the drivers that no longer require custom rules to allow these
> rates.

Acked-by: Mark Brown <broonie@kernel.org>
Jaroslav Kysela Sept. 5, 2024, 2:49 p.m. UTC | #2
On 05. 09. 24 16:12, Jerome Brunet wrote:
> This patchset adds rate definitions for 12kHz, 24kHz and 128kHz.
> 
> It is follow-up on the series/discussion [0] about adding 128kHz for
> spdif/eARC support. The outcome was to add 12kHz and 24kHz as well and
> clean up the drivers that no longer require custom rules to allow these
> rates.
> 
> Identifying these drivers is not straight forward, I tried my best but I
> may have missed some. Those will continue to work anyway so it is not
> critical. Some drivers using these rates have not been changed on
> purpose. The reason for this may be:
> * The driver used other uncommon rates that still don't have a definition
>    so a custom rule is still required.
> * The constraint structure is used in some other way by the driver and
>    removing it would not help the readability or maintainability. This is
>    the case the freescale asrc drivers for example.
> 
> There is one change per driver so, if there is a problem later on, it will
> easier to properly add Fixes tag.
> 
> The series has been tested with
> * ARM64 defconfig - spdif 128kHz at runtime.
> * x86_64 allmodconfig - compile test only
> 
> Last, the change adding IEC958 definitions has been dropped for this
> patchset and will be resent separately
> 
> [0]: https://lore.kernel.org/all/20240628122429.2018059-1-jbrunet@baylibre.com/
> 
> ---
> Jerome Brunet (13):
>        ALSA: pcm: add more sample rate definitions
>        ALSA: cmipci: drop SNDRV_PCM_RATE_KNOT
>        ALSA: emu10k1: drop SNDRV_PCM_RATE_KNOT
>        ALSA: hdsp: drop SNDRV_PCM_RATE_KNOT
>        ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
>        ASoC: cs35l36: drop SNDRV_PCM_RATE_KNOT
>        ASoC: cs35l41: drop SNDRV_PCM_RATE_KNOT
>        ASoC: cs53l30: drop SNDRV_PCM_RATE_KNOT
>        ASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT
>        ASoC: qcom: q6asm-dai: drop SNDRV_PCM_RATE_KNOT
>        ASoC: sunxi: sun4i-codec: drop SNDRV_PCM_RATE_KNOT
>        ASoC: cs35l34: drop useless rate contraint
>        ASoC: spdif: extend supported rates to 768kHz
> 
>   include/sound/pcm.h                  | 31 +++++++++++++++++--------------
>   sound/core/pcm_native.c              |  6 +++---
>   sound/pci/cmipci.c                   | 32 +++++++++-----------------------
>   sound/pci/emu10k1/emupcm.c           | 31 +++++--------------------------
>   sound/pci/rme9652/hdsp.c             | 18 ++++++------------
>   sound/pci/rme9652/hdspm.c            | 16 +---------------
>   sound/soc/codecs/cs35l34.c           | 21 ---------------------
>   sound/soc/codecs/cs35l36.c           | 34 ++++++++++++----------------------
>   sound/soc/codecs/cs35l41.c           | 34 +++++++++++-----------------------
>   sound/soc/codecs/cs53l30.c           | 24 +++---------------------
>   sound/soc/codecs/spdif_receiver.c    |  3 ++-
>   sound/soc/codecs/spdif_transmitter.c |  3 ++-
>   sound/soc/intel/avs/pcm.c            | 22 ++++++----------------
>   sound/soc/qcom/qdsp6/q6asm-dai.c     | 31 ++++++++++---------------------
>   sound/soc/sunxi/sun4i-codec.c        | 28 +++++++++-------------------
>   15 files changed, 96 insertions(+), 238 deletions(-)
> ---
> base-commit: 785f4052380684dbcc156203c537c799e2f4be09
> change-id: 20240905-alsa-12-24-128-8edab4c08dd4
> 
> Best regards,

Thanks,

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Rhodes, David Sept. 5, 2024, 5:24 p.m. UTC | #3
On 9/5/24 9:12 AM, Jerome Brunet wrote:
> This patchset adds rate definitions for 12kHz, 24kHz and 128kHz.
> 
> It is follow-up on the series/discussion [0] about adding 128kHz for
> spdif/eARC support. The outcome was to add 12kHz and 24kHz as well and
> clean up the drivers that no longer require custom rules to allow these
> rates.
> 

Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>

Thanks,
David
Takashi Iwai Sept. 6, 2024, 7:27 a.m. UTC | #4
On Thu, 05 Sep 2024 16:12:51 +0200,
Jerome Brunet wrote:
> 
> This patchset adds rate definitions for 12kHz, 24kHz and 128kHz.
> 
> It is follow-up on the series/discussion [0] about adding 128kHz for
> spdif/eARC support. The outcome was to add 12kHz and 24kHz as well and
> clean up the drivers that no longer require custom rules to allow these
> rates.
> 
> Identifying these drivers is not straight forward, I tried my best but I
> may have missed some. Those will continue to work anyway so it is not
> critical. Some drivers using these rates have not been changed on
> purpose. The reason for this may be:
> * The driver used other uncommon rates that still don't have a definition
>   so a custom rule is still required.
> * The constraint structure is used in some other way by the driver and
>   removing it would not help the readability or maintainability. This is
>   the case the freescale asrc drivers for example.
> 
> There is one change per driver so, if there is a problem later on, it will
> easier to properly add Fixes tag.
> 
> The series has been tested with
> * ARM64 defconfig - spdif 128kHz at runtime.
> * x86_64 allmodconfig - compile test only
> 
> Last, the change adding IEC958 definitions has been dropped for this
> patchset and will be resent separately
> 
> [0]: https://lore.kernel.org/all/20240628122429.2018059-1-jbrunet@baylibre.com/
> 
> ---
> Jerome Brunet (13):
>       ALSA: pcm: add more sample rate definitions
>       ALSA: cmipci: drop SNDRV_PCM_RATE_KNOT
>       ALSA: emu10k1: drop SNDRV_PCM_RATE_KNOT
>       ALSA: hdsp: drop SNDRV_PCM_RATE_KNOT
>       ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
>       ASoC: cs35l36: drop SNDRV_PCM_RATE_KNOT
>       ASoC: cs35l41: drop SNDRV_PCM_RATE_KNOT
>       ASoC: cs53l30: drop SNDRV_PCM_RATE_KNOT
>       ASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT
>       ASoC: qcom: q6asm-dai: drop SNDRV_PCM_RATE_KNOT
>       ASoC: sunxi: sun4i-codec: drop SNDRV_PCM_RATE_KNOT
>       ASoC: cs35l34: drop useless rate contraint
>       ASoC: spdif: extend supported rates to 768kHz

A nice cleanup series.
Applied all now to for-next branch.


Thanks!

Takashi