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 {
}
}
}
-
+ return snd_pcm_hw_params_get_channels(NULL);
+ //return snd_pcm_hw_params_get_access(NULL);
return 0;
}
}
// printf("read = %li\n", r);
} else {
- int frame_bytes = (snd_pcm_format_width(format) / 8) * channels;
+ int frame_bytes = (snd_pcm_format_physical_width(format) / 8) * channels;
do {
r = snd_pcm_readi(handle, buf, len);
if (r > 0) {
long writebuf(snd_pcm_t *handle, char *buf, long len, size_t *frames)
{
long r;
- int frame_bytes = (snd_pcm_format_width(format) / 8) * channels;
+ int frame_bytes = (snd_pcm_format_physical_width(format) / 8) * channels;
while (len > 0) {
r = snd_pcm_writei(handle, buf, len);
loop_limit = loop_sec * rate;
latency = latency_min - 4;
- buffer = malloc((latency_max * snd_pcm_format_width(format) / 8) * 2);
+ buffer = malloc((latency_max * snd_pcm_format_physical_width(format) / 8) * 2);
setscheduler();