From kde-devel Sat Jan 08 21:28:00 2000 From: Graham TerMarsch Date: Sat, 08 Jan 2000 21:28:00 +0000 To: kde-devel Subject: [PATCH] Alsa-sound support for kcontrol "info" module on Linux X-MARC-Message: https://marc.info/?l=kde-devel&m=94736697707394 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------157473C37D318885CE1ECB65" This is a multi-part message in MIME format. --------------157473C37D318885CE1ECB65 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Been using the Alsa sound modules here rather than OSS on my Linux box, and saw that KControl still doesn't recognize the Alsa sound drivers and provide any information on them. Don't have CVS access (and the patch is _really_ small) so I figured that it'd be somewhat safe to post it here. Patch should be applied from the kdebase directory as "patch -p0 < linux_info.cpp-alsasound.patch" All this patch does is allow for the Linux info module to be able to query the sound status of the AlsaSound driver. No additional features or goodies are added whatsoever. -- Graham TerMarsch --------------157473C37D318885CE1ECB65 Content-Type: text/plain; charset=us-ascii; name="linux_info.cpp-alsasound.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linux_info.cpp-alsasound.patch" *** kcontrol/info/info_linux.cpp Sat Jan 8 13:21:03 2000 --- kcontrol/info/info_linux.cpp.with-alsa-sound Sat Dec 11 23:55:29 1999 *************** *** 76,81 **** --- 76,82 ---- #define INFO_SOUND_AVAILABLE #define INFO_DEV_SNDSTAT "/dev/sndstat" #define INFO_SOUND "/proc/sound" + #define INFO_ASOUND "/proc/asound/sndstat" #define INFO_DEVICES_AVAILABLE #define INFO_DEVICES "/proc/devices" *************** *** 201,208 **** sorting_allowed = false; // no sorting by user ! if ( GetInfo_ReadfromFile( lBox, INFO_DEV_SNDSTAT, 0 )) return true; ! else ! return GetInfo_ReadfromFile( lBox, INFO_SOUND, 0 ); } bool GetInfo_Devices( QListView *lBox ) --- 202,211 ---- sorting_allowed = false; // no sorting by user ! if ( GetInfo_ReadfromFile( lBox, INFO_DEV_SNDSTAT, 0 )) return true; ! else if ( GetInfo_ReadfromFile( lBox, INFO_SOUND, 0 )) ! return true; ! else ! return GetInfo_ReadfromFile( lBox, INFO_ASOUND, 0 ); } bool GetInfo_Devices( QListView *lBox ) --------------157473C37D318885CE1ECB65--