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:
Clemens Ladisch 2006-02-27 10:03:19 +00:00
parent 3f00bc728b
commit 09f598e57c
9 changed files with 41 additions and 17 deletions

View file

@ -32,7 +32,7 @@
const char *_snd_module_hwdep_hw = "";
#endif
#define SNDRV_FILE_HWDEP "/dev/snd/hwC%iD%i"
#define SNDRV_FILE_HWDEP ALSA_DEVICE_DIRECTORY "hwC%iD%i"
#define SNDRV_HWDEP_VERSION_MAX SNDRV_PROTOCOL_VERSION(1, 0, 1)
static int snd_hwdep_hw_close(snd_hwdep_t *hwdep)
@ -106,7 +106,7 @@ static snd_hwdep_ops_t snd_hwdep_hw_ops = {
int snd_hwdep_hw_open(snd_hwdep_t **handle, const char *name, int card, int device, int mode)
{
int fd, ver, ret;
char filename[32];
char filename[sizeof(SNDRV_FILE_HWDEP) + 20];
snd_hwdep_t *hwdep;
assert(handle);