LinuxMCE Forums

General => Users => Topic started by: agentsmith on July 10, 2008, 05:02:37 pm

Title: Unable to control volume - Here is what worked for me
Post by: agentsmith on July 10, 2008, 05:02:37 pm
In the spirit of contributing to this awesome project, I thought that I would share a recent achievement.  I searched through the wiki and the forums and could not find the answer for my issue so I hope this information is not redundant.

So far every system that I have built involves me using the analog port on my sound card which I think might be a contributing factor here, but nonetheless when I try to change the volume level, nothing happens.  If I run alsamixer I can see that the master channel is getting changed properly, however it is the headphone channel that is controlling my actual speakers.

So I searched and searched and finally found a way to change them around.

edit the alsa-base config file in the /etc/modprobe.d directory
Code: [Select]
dcerouter_1:~# vi /etc/modprobe.d/alsa-base
Add the following code to the bottom of the file.
Code: [Select]
options snd-intel8x0 ac97_quirk=hp_onlyReboot (or possibly do a telinit1 and then telinit2 to re-initialize everything)

This makes the Headphone channel become the master channel.

Now everything works perfectly on all my cores and media directors.  Hope this helps :P
Title: Re: Unable to control volume - Here is what worked for me
Post by: jeangot on July 11, 2008, 12:42:09 am

thanks for this tip! I spent a lot of time on this problem and the only thing that helped me was changing the source code of LMCE. In my case it was the PCM mixed that had an effect. I'll try your tip tonight and see if it helps in my case!

For others who might read this, here are some other options for this workaround:

AC97 Quirk Option

The ac97_quirk option is used to enable/override the workaround for
specific devices on drivers for on-board AC'97 controllers like
snd-intel8x0.  Some hardware have swapped output pins between Master
and Headphone, or Surround (thanks to confusion of AC'97
specifications from version to version :-)

The driver provides the auto-detection of known problematic devices,
but some might be unknown or wrongly detected.  In such a case, pass
the proper value with this option.

The following strings are accepted:
    - default   Don't override the default setting
    - none   Disable the quirk
    - hp_only   Bind Master and Headphone controls as a single control
    - swap_hp   Swap headphone and master controls
    - swap_surround  Swap master and surround controls
    - ad_sharing  For AD1985, turn on OMS bit and use headphone
    - alc_jack   For ALC65x, turn on the jack sense mode
    - inv_eapd   Inverted EAPD implementation
    - mute_led   Bind EAPD bit for turning on/off mute LED

For backward compatibility, the corresponding integer value -1, 0,
... are  accepted, too.

For example, if "Master" volume control has no effect on your device
but only "Headphone" does, pass ac97_quirk=hp_only module option
Title: Re: Unable to control volume - Here is what worked for me
Post by: darrenmason on July 11, 2008, 01:10:39 am

will be interested if this works for you and hence avoids the code change mentioned (although there is still probably a good case for cleaning up some of the code there).

It would be good to get all this info into a wiki page...

Title: Re: Unable to control volume - Here is what worked for me
Post by: colinjones on July 11, 2008, 03:45:28 am
Not sure I quiet get this at several levels!

1) I thought that the volume control on, for instance, the Fiire remote was tied into LMCE's control over your amp - so if you didn't have LMCE controlling your amp, then you couldn't vary the volume from LMCE, only from your amp... is that not true?

2) I'm connected to my amp via SPDIF optical. In alsamixer the Master control volume level does nothing. In fact none of them do anything to volume. But the mute control on the Master does mute/unmute correctly!

I do recall way back once having to "unmute" the IEC958 control to get SPDIF to work, so I just assumed that IEC958 overrides, and all the other controls are for the analogue outs... now when I go in and take another look I seem to have 2 of these, one is IEC958 as before and I can no longer "mute" that, the new one is IEC958 Default PCM which I can "mute" but it does nothing....
Title: Re: Unable to control volume - Here is what worked for me
Post by: agentsmith on July 11, 2008, 06:53:49 pm
Someone please correct me if I'm wrong but I believe that you can have it either way.  LinuxMCE can either control your amp directly via infrared, rs232 or USB or if you just want to use regular PC speakers you can also have it control the volume directly from the sound card on your LinuxMCE system.  As is my situation.  For example, I have a core with regular PC speakers and then I have a laptop as a MD that I use the Headphone port to connect some speakers in the Living room.  On both systems I control the volume from the PC itself, mostly because I do not have in irblaster yet to control my receiver with... :'( which I would much prefer.  But alas I am an admitted noob and could be wrong :P
Title: Re: Unable to control volume - Here is what worked for me
Post by: tschak909 on July 11, 2008, 07:51:45 pm
If you are using analogue output, and haven't connected the amplifier as an audio pipe to the media director (using either the setup wizard, or the connection wizard in the web admin), then any volume messages will go to the App Server, which alters the sound card volume....

If you do a device template for your TV, and do not put volume down/up commands in the template, most likely the volume commands will still try to go to the TV, but will not work, because there is no equivalent IR for it. The solution here, is to go into the Connection wizard, right click on the audio connector on the TV, and de-select the audio checkbox from the popup box that appears.

Digital outputs do not have any form of volume control and MUST have its sound output device, be it an amplifier, or powered speaker, able to be controleld in some manner, such as IR.

Title: Re: Unable to control volume - Here is what worked for me
Post by: jeangot on September 07, 2008, 08:10:37 pm

took me some time to be able to reinstall some new machines and try this out. I confirm that this solves the problem for me on a Dell Optiplex GX60, without having to further touch the LMCE source code.
Now the question is, is there an easy way to make thsi fix available from the web gui in future lmce releases, maybe by creating a new sound card type?

Title: Re: Unable to control volume - Here is what worked for me
Post by: huh on August 10, 2009, 06:17:17 am
Thank you for this- been fighting with one MD to be able to change the volume using either a MD or an oribiter and by adding that line it fixed the problem.

Running latest 810 alpha.