mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05: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
|
|
@ -34,7 +34,7 @@
|
|||
const char *_snd_module_rawmidi_hw = "";
|
||||
#endif
|
||||
|
||||
#define SNDRV_FILE_RAWMIDI "/dev/snd/midiC%iD%i"
|
||||
#define SNDRV_FILE_RAWMIDI ALSA_DEVICE_DIRECTORY "midiC%iD%i"
|
||||
#define SNDRV_RAWMIDI_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 0)
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
|
|
@ -175,7 +175,7 @@ int snd_rawmidi_hw_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|||
{
|
||||
int fd, ver, ret;
|
||||
int attempt = 0;
|
||||
char filename[32];
|
||||
char filename[sizeof(SNDRV_FILE_RAWMIDI) + 20];
|
||||
snd_ctl_t *ctl;
|
||||
snd_rawmidi_t *rmidi;
|
||||
snd_rawmidi_hw_t *hw = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue