diff options
author | jmcneill <jmcneill> | 2008-11-27 18:00:44 +0000 |
---|---|---|
committer | jmcneill <jmcneill> | 2008-11-27 18:00:44 +0000 |
commit | bdd0492af390a7f3c97d4ea67cd9d737bc2380f8 (patch) | |
tree | 78735e0cb275acf39e330f889fe0debaf361d450 /sysutils | |
parent | f9e4a0ca39ad29500f87e9ccecb92017816c0e2a (diff) | |
download | pkgsrc-bdd0492af390a7f3c97d4ea67cd9d737bc2380f8.tar.gz |
According to spec oss.type should be 'pcm', not 'dsp'. Fill in
oss.device_id while we're here.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/hal/files/hald-netbsd/devinfo_audio.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sysutils/hal/files/hald-netbsd/devinfo_audio.c b/sysutils/hal/files/hald-netbsd/devinfo_audio.c index ba72236a501..faf0063fe68 100644 --- a/sysutils/hal/files/hald-netbsd/devinfo_audio.c +++ b/sysutils/hal/files/hald-netbsd/devinfo_audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: devinfo_audio.c,v 1.1 2008/11/27 16:07:14 jmcneill Exp $ */ +/* $NetBSD: devinfo_audio.c,v 1.2 2008/11/27 18:00:44 jmcneill Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill <jmcneill@invisible.ca> @@ -127,6 +127,7 @@ devinfo_audio_add(HalDevice *parent, const char *devnode, char *devfs_path, char hal_device_property_set_int (d, "sound.card", unit); hal_device_property_set_string (d, "sound.card_id", audiodev.name); + hal_device_property_set_string (d, "netbsd.sound.hardware", audiodev.config); parent_udi = hal_device_property_get_string (parent, "info.udi"); if (parent_udi) @@ -157,7 +158,7 @@ HalDevice * devinfo_audio_mixer_add(HalDevice *parent, const char *devnode, char *devfs_path, char *device_type) { HalDevice *d = NULL; - char *device_file, *parent_udi, *card_id; + char *device_file, *parent_udi, *card_id, *device_id; int16_t unit; if (strstr (devnode, "oss_mixer_") != devnode) @@ -175,6 +176,8 @@ devinfo_audio_mixer_add(HalDevice *parent, const char *devnode, char *devfs_path unit = hal_device_property_get_int (parent, "sound.card"); hal_device_property_set_int (d, "oss.card", unit); hal_device_property_set_int (d, "oss.device", unit + 16); + device_id = hal_device_property_get_string (parent, "netbsd.sound.hardware"); + hal_device_property_set_string (d, "oss.device_id", device_id); hal_device_property_set_string (d, "oss.type", "mixer"); device_file = g_strdup_printf (_PATH_MIXER "%d", unit); @@ -194,7 +197,7 @@ HalDevice * devinfo_audio_dsp_add(HalDevice *parent, const char *devnode, char *devfs_path, char *device_type) { HalDevice *d = NULL; - char *device_file, *parent_udi, *card_id; + char *device_file, *parent_udi, *card_id, *device_id; int16_t unit; if (strstr (devnode, "oss_dsp_") != devnode) @@ -212,7 +215,9 @@ devinfo_audio_dsp_add(HalDevice *parent, const char *devnode, char *devfs_path, unit = hal_device_property_get_int (parent, "sound.card"); hal_device_property_set_int (d, "oss.card", unit); hal_device_property_set_int (d, "oss.device", unit); - hal_device_property_set_string (d, "oss.type", "dsp"); + device_id = hal_device_property_get_string (parent, "netbsd.sound.hardware"); + hal_device_property_set_string (d, "oss.device_id", device_id); + hal_device_property_set_string (d, "oss.type", "pcm"); device_file = g_strdup_printf (_PATH_SOUND "%d", unit); hal_device_property_set_string (d, "oss.device_file", device_file); |