From bdd0492af390a7f3c97d4ea67cd9d737bc2380f8 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Thu, 27 Nov 2008 18:00:44 +0000 Subject: According to spec oss.type should be 'pcm', not 'dsp'. Fill in oss.device_id while we're here. --- sysutils/hal/files/hald-netbsd/devinfo_audio.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sysutils') 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 @@ -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); -- cgit v1.2.3