Results 1 to 3 of 3

Thread: 13.04: Replace Sound Settings with Pavucontrol?

  1. #1
    Join Date
    Mar 2009
    Beans
    294

    13.04: Replace Sound Settings with Pavucontrol?

    Hey guys,

    I just realized that my options in the sound settings in Ubuntu 13.04 are severely limited.

    My PC has an internal on-board sound card, and I am using the Sound Blaster X-Fi Surround 5.1 Pro card as well, which is a USB card.

    In the sound settings, I can choose between the Sound Blaster's S/PDIF and Analog outputs, and for the Analog, I have the choice between several modes:

    Analog Surround 5.1
    Analog Surround 4.1
    Analog Surround 5.0
    Analog Stereo

    On the "Input" tab, I can only select S/PDIF. My sound card doesn't even have a digital S/PDIF input, and my mic is connected to the analog mic in.

    I remember that Ubuntu used to have a large list of sound profiles for me to choose from, including "Analog 5.1 Surround output + Analog Stereo input", which I would like to use. But from the Sound Settings, that does not seem possible.

    I installed pavucontrol (which breaks Ubuntu's own Sound Settings), and it gives me full control over my sound card (though the internal one is still nowhere to be seen). What can I do so what when I click on "Sound Settings", pavucontrol opens?

  2. #2
    Join Date
    Jun 2007
    Beans
    13,064

    Re: 13.04: Replace Sound Settings with Pavucontrol?

    Quote Originally Posted by The Bright Side View Post
    I installed pavucontrol (which breaks Ubuntu's own Sound Settings), and it gives me full control over my sound card (though the internal one is still nowhere to be seen). What can I do so what when I click on "Sound Settings", pavucontrol opens?
    it can be changed very easily in the source, in this case specifically /debian/patches/sound_nau.patch

    The only tricky thing is this source applies it's patches during the build, there are 3, each builds upon the previous
    (the 2nd & 3rd enable pavucontrol for xubuntu & ubuntustudio respectively.

    So if allowing all 3 patches to be applied one would need to alter 2 patches, though if only building indicator-sound for ubuntu (unity), then one could edit the first patch & comment out the next 2 in debian/patches/series file
    (just as easy to also edit the xubuntu patch & build as normal.

    Either way pretty straightforward to do, tested here in a unity session & "sound-settings" now opens pavucontrol .

    If unsure of how to build, ect. but want to do then ask, can work out a simple copy & paste routine,.

    Otherwise if up on I'm attaching the 2 edited patches.
    You'd simply extract & replace the same current 2 in the indicator-sound source's debian/patches folder with these, up the package version slightly in debian/changelog, add a dependency on pavucontrol & build the packages with something simple like
    dpkg-buildpackage -rfakeroot -D -us -uc

    To show the 1st. patch edit (the one that matters for a unity session

    orig sound_nau.patch, area to be edited shown in red
    Code:
    === modified file 'src/sound-service-dbus.c'
    --- old/src/sound-service-dbus.c	2012-03-16 17:59:34 +0000
    +++ new/src/sound-service-dbus.c	2012-03-19 14:54:30 +0000
    @@ -227,8 +227,14 @@
                                 gpointer user_data)
     {
       GError * error = NULL;
    +  gchar* cmd;
    +  if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
    +    cmd = "gnome-control-center sound-nua";
    +  else
    +    cmd = "gnome-control-center sound";
    +
       if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
    -      !g_spawn_command_line_async("gnome-control-center sound", &error) && 
    +          !g_spawn_command_line_async(cmd, &error) && 
           !g_spawn_command_line_async("xfce4-mixer", &error))
       {
         g_warning("Unable to show dialog: %s", error->message);
    Edited sound_nau.patch, edit shown in blue
    Code:
    === modified file 'src/sound-service-dbus.c'
    --- old/src/sound-service-dbus.c	2012-03-16 17:59:34 +0000
    +++ new/src/sound-service-dbus.c	2012-03-19 14:54:30 +0000
    @@ -227,8 +227,14 @@
                                 gpointer user_data)
     {
       GError * error = NULL;
    +  gchar* cmd;
    +  if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity"))
    +    cmd = "pavucontrol";
    +  else
    +    cmd = "gnome-control-center sound";
    +
       if (!g_spawn_command_line_async("gnome-volume-control --page=applications", &error) &&
    -      !g_spawn_command_line_async("gnome-control-center sound", &error) && 
    +          !g_spawn_command_line_async(cmd, &error) && 
           !g_spawn_command_line_async("xfce4-mixer", &error))
       {
         g_warning("Unable to show dialog: %s", error->message);
    Really quite simple, the other 2 patches will be affected so if allowed to be applied a small edit to the 2nd patch, (sound_xubuntu.patch) is needed as well

    Edit: could be adapted to also use pavucontrol in a gnome session, slightly more edit(s) needed
    Attached Files Attached Files
    Last edited by mc4man; May 19th, 2013 at 06:54 AM.

  3. #3
    Join Date
    Mar 2009
    Beans
    294

    Re: 13.04: Replace Sound Settings with Pavucontrol?

    Hey mc4man, thanks for your info! I found that even with pavucontrol, the only thing I really need - using my sound card's analog input for the mic - does not work.

    When I select the according profile - Analog 5.1 Out + Analog Stereo Input - neither Skype nor Google Call work.

    I'd prefer not to mess with the source then, if pavucontrol doesn't solve my problem. Can you think of any other way to make Ubuntu recognize my USB sound card's analog in?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •