summaryrefslogtreecommitdiff
path: root/src/topology/ctl.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2022-11-14 12:36:04 +0100
committerJaroslav Kysela <perex@perex.cz>2022-11-14 12:36:07 +0100
commit78b20e3caa7bba930095e05f3f8cbe665204fcfd (patch)
treee2f667792ed414c949e410a10cd273e188085733 /src/topology/ctl.c
parent152983f01b0bc1178ea0d461ebf66e2d2a8e2e02 (diff)
downloadalsa-lib-78b20e3caa7bba930095e05f3f8cbe665204fcfd.tar.gz
test: latency - use snd_pcm_format_physical_width()
We need to allocate frames using the physical size not the sample bit size. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'src/topology/ctl.c')
-rw-r--r--src/topology/ctl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/topology/ctl.c b/src/topology/ctl.c
index dd05424d..2c500ffc 100644
--- a/src/topology/ctl.c
+++ b/src/topology/ctl.c
@@ -17,9 +17,13 @@
Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
+#define ALSA_PCM_OLD_HW_PARAMS_API 1
+#define ALSA_PCM_OLD_SW_PARAMS_API 1
+#include "../../include/asoundlib.h"
#include "list.h"
#include "tplg_local.h"
+
#define ENUM_VAL_SIZE (SNDRV_CTL_ELEM_ID_NAME_MAXLEN >> 2)
struct ctl_access_elem {
@@ -71,7 +75,8 @@ static int parse_access_values(snd_config_t *cfg,
}
}
}
-
+ return snd_pcm_hw_params_get_channels(NULL);
+ //return snd_pcm_hw_params_get_access(NULL);
return 0;
}