mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
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.
This commit is contained in:
parent
3f00bc728b
commit
09f598e57c
9 changed files with 41 additions and 17 deletions
|
|
@ -99,8 +99,8 @@ typedef struct {
|
|||
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 @@ int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue