After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 344923 - New SunAudio source plugin, and mixer now supports stereo and microphone input
New SunAudio source plugin, and mixer now supports stereo and microphone input
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other opensolaris
: Normal normal
: 0.10.4
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-14 22:15 UTC by Brian Cameron
Modified: 2006-06-20 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch adding new features (27.89 KB, patch)
2006-06-14 22:15 UTC, Brian Cameron
reviewed Details | Review
fix to previous patch (3.32 KB, patch)
2006-06-15 00:36 UTC, Brian Cameron
reviewed Details | Review
patch to improve mute (6.37 KB, patch)
2006-06-15 22:52 UTC, Brian Cameron
reviewed Details | Review
updated gstsunaudiomixerctrl.c file (11.07 KB, text/plain)
2006-06-16 17:41 UTC, Brian Cameron
  Details

Description Brian Cameron 2006-06-14 22:15:01 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.
Comment 1 Brian Cameron 2006-06-14 22:15:34 UTC
Created attachment 67365 [details] [review]
patch adding new features
Comment 2 Brian Cameron 2006-06-15 00:36:08 UTC
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.
Comment 3 Brian Cameron 2006-06-15 22:52:18 UTC
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.
Comment 4 Wim Taymans 2006-06-16 08:07:20 UTC
the patches to gstsunaudiomixerctrl.c fail to apply, others work fine. Can you redo that patch against current CVS?
Comment 5 Brian Cameron 2006-06-16 17:41:41 UTC
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.
Comment 6 Wim Taymans 2006-06-20 10:36:21 UTC
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.