On Sun, 2014-08-10 at 13:44 +0200, Takashi Iwai wrote:
At Sat, 9 Aug 2014 12:09:21 +0200, Jurgen Kramer wrote:
Support for DSD sample formats has been added a while ago. This patch makes those sample formats beter usable from userland (e.g. aplay).
include/sound/asound.h | 4 +++- src/pcm/pcm_misc.c | 4 ++++
The new definitions are still missing in include/pcm.h? include/sound/asound.h is a copy from the kernel, and the user-land API is defined rather in include/pcm.h.
OK, the updates to alsa-lib pcm_misc.c are still valid but do not compile without my proposed update to include/sound/asound.h:
Compiling alsa-lib from git with update pcm_misc.c gives: pcm_misc.c: In function 'snd_pcm_format_width': pcm_misc.c:198:7: error: 'SNDRV_PCM_FORMAT_DSD_U8' undeclared (first use in this function) case SNDRV_PCM_FORMAT_DSD_U8: ^ pcm_misc.c:198:7: note: each undeclared identifier is reported only once for each function it appears in pcm_misc.c:209:7: error: 'SNDRV_PCM_FORMAT_DSD_U16_LE' undeclared (first use in this function) case SNDRV_PCM_FORMAT_DSD_U16_LE: ^ pcm_misc.c: In function 'snd_pcm_format_physical_width': pcm_misc.c:258:7: error: 'SNDRV_PCM_FORMAT_DSD_U8' undeclared (first use in this function) case SNDRV_PCM_FORMAT_DSD_U8: ^ pcm_misc.c:264:7: error: 'SNDRV_PCM_FORMAT_DSD_U16' undeclared (first use in this function) case SNDRV_PCM_FORMAT_DSD_U16:
The SNDRV_PCM_FORMAT_DSD??? are there in /usr/include/sound/asound.h It seems alsa-lib uses it own asound.h which does not have the DSD defines. See 'include/sound/asound.h' is this intentional?
Jurgen