Skip to content

Conversation

@singalsu
Copy link
Collaborator

This patch adds the 24 kHz rate to PCM capabilities. The 24 kHz rate is defined in the MPEG-2 standard. This also needs a patch to alsa-lib to build the topology without error.

The added rate_min/rate_max is not mandatory but it narrows down the range of rates evaluated in alsa-lib in snd_pcm_hw_refine().

This patch adds the 24 kHz rate to PCM capabilities. The 24 kHz
rate is defined in the MPEG-2 standard. This also needs a patch
to alsa-lib to build the topology without error.

The added rate_min/rate_max is not mandatory but it narrows down
the range of rates evaluated in alsa-lib in snd_pcm_hw_refine().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
Copy link
Collaborator Author

From Jenkins build log here, need the alsa-lib patch:

[9/372] Generating sof-tgl-nocodec.tplg
ALSA lib pcm.c:366:(split_rate) unsupported stream rate 24000
ALSA lib parser.c:211:(tplg_load_config) failed to parse topology
Unable to load configuration: Invalid argument

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I guess you will make non draft when ALSA part is resolved.

@singalsu
Copy link
Collaborator Author

LGTM, I guess you will make non draft when ALSA part is resolved.

Yep, this simple add only enables tplg build, the aplay - alsa-lib - kernel runtime issue still remains:

diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index acec27f9..670f5efe 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -27,6 +27,7 @@ static const char *const snd_pcm_rate_names[] = {
        RATE(11025),
        RATE(16000),
        RATE(22050),
+       RATE(24000),
        RATE(32000),
        RATE(44100),
        RATE(48000),
diff --git a/src/topology/tplg_local.h b/src/topology/tplg_local.h
index 63639274..8f8ddece 100644
--- a/src/topology/tplg_local.h
+++ b/src/topology/tplg_local.h
@@ -47,6 +47,7 @@ typedef enum _snd_pcm_rates {
        SND_PCM_RATE_11025,
        SND_PCM_RATE_16000,
        SND_PCM_RATE_22050,
+       SND_PCM_RATE_24000,
        SND_PCM_RATE_32000,
        SND_PCM_RATE_44100,
        SND_PCM_RATE_48000,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants