[mythtv] [mythtv-commits] Ticket #7517: Separate Volume control from Audio Output

Peter Stokes mythtv at dadeos.co.uk
Wed Aug 18 22:13:14 UTC 2010


On 16 Aug 2010, at 22:46, Ed W wrote:

> 
>>> Another thing that I added (way back when) with a hope that someone would pour sauce on it was the "AudioOutputSource" param when you open the audio device (TV/Video/Music/Phone/etc)?  The idea was that the volume control might have a per application memory and make use of this when different applications open the audio device?  I think it's been treated as a dead parameter since then, but it would be really nice if someone would pick it up and consider using it for something?  (there seem to be some tentative re-implementations of this feature starting to happen already causing some code duplication?)  See audiooutputsettings.h
>> 
>> I consider that problem to be more one of "mixing" rather than "volume" control. The implementation I propose solely aims to provide a "volume" control, namely a means of adjusting the overall audio output level. Balancing the levels of different audio sources, or channels is a relatively infrequent operation requiring a considerably more complex user interface that is best placed within the setup/configuration screens. The interface for controlling the volume should be as simple as possible (increase/decrease/mute).
> 
> I think you misunderstand my point - at the moment we track only a single "volume" level, and there is then a bunch of hard-coded level adjustment for music/tv/video.  I was just pointing out that we know what the application wants to be doing, so we could actually track volume per application.  Eg if I leave the TV on max volume and music on really low then it's still like that when I switch back to each.  Turning up the volume in the music app doesn't mean it gets louder if we switch to TV

Sorry, it is not clear to me whether you are stating that the above is how MythTV currently behaves or whether that is how you feel it should behave?

Although I should confess, I have not used MythTV's "trunk" volume control implementation for over 9 months.

I am unaware of any "hard-coded level adjustment for music/tv/video" in the existing implementation? The way I have my system configured, using an ALSA volume control, I get a single global volume control, if I change the volume in MythMusic and then switch to TV, the volume remains the same (ignoring any affects of level differences associated with the source content).

My personal expectation is for there to be a single volume control for MythTV (mythfrontend). I do not expect separate volume state to be stored by MythMusic or TV playback. If I raise the volume, it is because I desire the audio to be louder, that is irrespective of the source.
 

> Anyway, there are probably other things we could use this field for.  As you say there could be a "balance" feature added somewhere or other exotic stuff (personally I don't see the point of a "balance", but others might?)
> 
> 
>> So, for example, there is little benefit from using Jack's software volume implementation as MythTV already provides its own software volume control.
>> 
> 
> When I looked some weeks ago there was a small issue in that the volume was applied when buffering the audio, not when it's fed to the soundcard.  This means that there is a very long delay before adjusting the volume actually affects what comes out of the speakers.
> 
> It can obviously be rectified, but it's currently quite a big difference in implementation between the two at the moment?

If that is an undesirable feature of the existing software volume implementation within MythTV then it should probably be addressed. I have not performed extensive testing using the software volume functionality. I merely connected the existing signal processing functionality to my proposed volume control interface.

I raise my thoughts regarding not using Jack's software volume implementation purely as a justification as to why the proposed patches does not contain a "VolumeControlJack", instead relying upon the "VolumeControlSoftware" functionality.

Peter



More information about the mythtv-dev mailing list