[alsa-cvslog] CVS: alsa-lib/src/pcm pcm_hw.c,1.145,1.146
Brought to you by:
perex
From: Clemens L. <cla...@us...> - 2006-02-27 10:03:30
|
Update of /cvsroot/alsa/alsa-lib/src/pcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23748/alsa-lib/src/pcm Modified Files: pcm_hw.c Log Message: Summary: allow changing of device directory path Add configuration options to change the default device path from the default /dev/snd. This is useful for embedded systems that do not want subdirectories in /dev. Index: pcm_hw.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_hw.c,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- pcm_hw.c 27 Feb 2006 09:58:32 -0000 1.145 +++ pcm_hw.c 27 Feb 2006 10:03:19 -0000 1.146 @@ -99,8 +99,8 @@ snd_pcm_uframes_t appl_ptr; } snd_pcm_hw_t; -#define SNDRV_FILE_PCM_STREAM_PLAYBACK "/dev/snd/pcmC%iD%ip" -#define SNDRV_FILE_PCM_STREAM_CAPTURE "/dev/snd/pcmC%iD%ic" +#define SNDRV_FILE_PCM_STREAM_PLAYBACK ALSA_DEVICE_DIRECTORY "pcmC%iD%ip" +#define SNDRV_FILE_PCM_STREAM_CAPTURE ALSA_DEVICE_DIRECTORY "pcmC%iD%ic" #define SNDRV_PCM_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 5) /* update appl_ptr with driver */ @@ -1167,7 +1167,7 @@ snd_pcm_stream_t stream, int mode, int mmap_emulation, int sync_ptr_ioctl) { - char filename[32]; + char filename[sizeof(SNDRV_FILE_PCM_STREAM_PLAYBACK) + 20]; const char *filefmt; int ret = 0, fd = -1; int attempt = 0; |