Author Topic: How to change the audio mixer used by LinuxMCE  (Read 3732 times)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
How to change the audio mixer used by LinuxMCE
« on: June 08, 2008, 09:48:51 pm »
Hello,

this question has been asked before in the forum but I couldn't find the answer.
My problem is the following: when playing music on my media directors, the volume up/down and mute button in the orbiter "remote" feature have no effect.

When looking from ssh in alsamixer, I can see that linuxmce is changing the volume of the "Master" mixer, however the correct mixer which has an effect on sound volume is the "PCM" mixer.

How do I tell linuxmce to use the PCM mixer instead of Master?

I changed audio.alsa_mixer_name:Master to audio.alsa_mixer_name:PCM in xine.conf but that had no effect.

Any idea which config file controls the Mixer that linuxmce uses to control volume?

Thank you!

Jean

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #1 on: June 08, 2008, 11:14:21 pm »
Hi,

not sure if this is of some help, but App Server AFAIK is responsible for dealing with alsa mixer devices... But have no clue whether mixer name is hardcoded or you can change this setting somewhere.....

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #2 on: June 09, 2008, 07:27:20 am »
Hello,

the only reference I found to App_Server is the App_Server binary itself. Not sure if I should go down the path to change the source code and recompile...

I also found a file called SoundCards_AudioVolume.sh with some alusion to the Master mixer, but making changes there had no effect.

Would there perhaps be a way to delete the Master mixer and replace it with a new Master mixer that's an alias to PCM? I did find how to create an alias in asound.conf, I guess the question is how to delete the original master mixer?

Jean

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #3 on: June 09, 2008, 12:18:09 pm »
Hello,

the only reference I found to App_Server is the App_Server binary itself. Not sure if I should go down the path to change the source code and recompile...

I also found a file called SoundCards_AudioVolume.sh with some alusion to the Master mixer, but making changes there had no effect.

Would there perhaps be a way to delete the Master mixer and replace it with a new Master mixer that's an alias to PCM? I did find how to create an alias in asound.conf, I guess the question is how to delete the original master mixer?

Jean
Hi,

I think that final solution should be somehow made, so that mixer name is device data for App_server or any other more suitable and convenient place... And probably this won't take much work to do...

Any opinions ?

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #4 on: June 10, 2008, 05:11:33 pm »
Hello,

you;re right about this being located in the App_Server package. I found the following code in amix.cpp which is part of the App_Server source code:

m_MixerElem = NULL;
   for (elem = snd_mixer_first_elem(m_MixerHandle); elem; elem = snd_mixer_elem_next(elem))
   {
      snd_mixer_selem_get_id(elem, sid);
      const char * MixerName = snd_mixer_selem_id_get_name(sid);
      if (strcmp(MixerName, "Master") == 0 || strcmp(MixerName, "Front") == 0)
      {
         m_MixerElem = elem;
         break;
      }
   }

So a quick fix until this is integrated in the UI would be for me to edit the code and recompile. Is there a howto somewhere about how to recompile just this one module? The make_package.sh script seems to take several parameters.
If someone knows how this works, it will probably save me a few hours :-)

Thanks.

Jean

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #5 on: June 10, 2008, 06:44:41 pm »
You used to be able to just run make and copy the resulting binary from ../bin or ../lib to /usr/pluto/bin or /usr/plut/lib.  But nowadays I think you're supposed to "prep" the makefiles first or something. 

It would be nice if the mixer name was just an extra parameter in the App-Server's device data so people could change it in the web-admin when needed.
"Change is inevitable. Progress is optional."
-- Anonymous


jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: How to change the audio mixer used by LinuxMCE
« Reply #6 on: June 10, 2008, 10:53:10 pm »
Indeed I agree!

If there is some precedure by which I should formally request this feature let me know and I'll be glad to do it.
I have a mantis account. Should I just go in there and start a new ticket with my suggestion? Is that how it's done?

Jean