GNOME Bugzilla – Bug 344923
New SunAudio source plugin, and mixer now supports stereo and microphone input
Last modified: 2006-06-20 10:36:21 UTC
Attached find a patch that adds a SunAudio source plugin. I have also enhanced the mixer plugin as follows. + Now supports stereo. SunAudio supports gain and balance. Use these values to support right/left channel gain. + Now supports RECORD flag so that you can switch between line-input and microphone in gnome-volume-control. + Cleaned up the code. Use enumerator for track number instead of an integer, for example.
Created attachment 67365 [details] [review] patch adding new features
Created attachment 67370 [details] [review] fix to previous patch Oops, I got the code not quite right. Balance is being set backwards and not being careful enough with the rounding. This fixes it. Apply this patch after applying the previous patch.
Created attachment 67454 [details] [review] patch to improve mute Sorry for making this bug a bit of a mess, but you can apply this patch after applying the above two patches. This fixes MUTE so it works for the input tracks, and also ensures that different programs (gnome-volume-control and panel mixer) update each other when the mute is changed in one program or the other...now they both update. I also removed an extra unneeded ioctl call from gstsunaudiotrackctrl.c. No need to call it twice. I have done exhaustive testing on these changes and I'm confidant I won't be sending any more patches to this bug report.
the patches to gstsunaudiomixerctrl.c fail to apply, others work fine. Can you redo that patch against current CVS?
Created attachment 67490 [details] updated gstsunaudiomixerctrl.c file How about I just attach the updated gstsunaudiomixerctrl.c file. This file is attached and can replace the existing one.
Thanks a lot, please test as I can't compile it. Patch by: Brian Cameron <brian dot cameron at sun dot com> * sys/sunaudio/Makefile.am: * sys/sunaudio/gstsunaudio.c: (plugin_init): * sys/sunaudio/gstsunaudiomixerctrl.c: (gst_sunaudiomixer_ctrl_build_list), (gst_sunaudiomixer_ctrl_new), (gst_sunaudiomixer_ctrl_list_tracks), (gst_sunaudiomixer_ctrl_get_volume), (gst_sunaudiomixer_ctrl_set_volume), (gst_sunaudiomixer_ctrl_set_mute), (gst_sunaudiomixer_ctrl_set_record): * sys/sunaudio/gstsunaudiomixerctrl.h: * sys/sunaudio/gstsunaudiomixertrack.c: (gst_sunaudiomixer_track_init), (gst_sunaudiomixer_track_new): * sys/sunaudio/gstsunaudiomixertrack.h: * sys/sunaudio/gstsunaudiosrc.c: (gst_sunaudiosrc_dispose), (gst_sunaudiosrc_base_init), (gst_sunaudiosrc_class_init), (gst_sunaudiosrc_init), (gst_sunaudiosrc_set_property), (gst_sunaudiosrc_get_property), (gst_sunaudiosrc_getcaps), (gst_sunaudiosrc_open), (gst_sunaudiosrc_close), (gst_sunaudiosrc_prepare), (gst_sunaudiosrc_unprepare), (gst_sunaudiosrc_read), (gst_sunaudiosrc_delay), (gst_sunaudiosrc_reset): * sys/sunaudio/gstsunaudiosrc.h: Add a SunAudio source plugin. Support stereo and right/left channel gain in the mixer plugin. Support the RECORD flag so that you can switch between line-input and microphone in gnome-volume-control. Code cleanups like using an enumerator for track number instead of an integer. Fixes #344923.