Jump to content
C4 Forums | Control4

OS3 Volume Slider Issue - Sony Sound Bar


Recommended Posts

Hi.

I sent this to my dealer already, but I also wanted to post it here to see if others had any ideas.  Here is the description of the problem with the volume slider for the Sony HT-ST9 sound bar driver (IP based).  The sound bar uses volume range from 0-50, while the Control4 driver scales this to 0-100 for display purposes (i.e., the number displayed on the slider's button).  Therefore, for any particular volume level set on the sound bar itself (for example 20), the Control4 slider will show 2x, or in this example 40.  The problem is that when you go to change the volume, the driver then switches to use the Sony scale (0-50) so when I grab the slider to slide it from the currently displayed volume (say 40) it immediately tries to set the volume to the actual Sony level of 40, instead of where it should be starting at, which is 20. 

The result is the volume jumps up 2x momentarily until I can slide it down to 25 (again, as an example).  When I finally remove my finger from the slider at 25, the Control4 UI will pause a second and then revert back to showing the 2x scaling.  So the display will then jump up to show 50 for the volume level.  This is obviously not ideal as you basically have to slide the volume to the left (down) even when you want to raise the volume, because of the scaling.

I know this is long winded, and may be hard to follow.  The way this would have to be fixed is to always use the 2x scaling (or 1x, just not a combination of the two) for both displaying and for setting the volume.  The way it is coded now, the display is 2x, but the control or volume command itself is 1x (or 1:1 with the Sony setting on its front display).

Please let me know if this makes sense.  I've also attached a screen shot from my iPhone of the slider I'm describing.  It's at the bottom of the screen.  The iPad version also shows the same issue.

Thanks,

Dino

 
 
 
 
 
 
 
 
 
 

 

IMG_1010.png

Link to comment
Share on other sites


Thanks but there are no settings like that.  Plus this isn't a ramp rate issue (not volume up/down) but a discrete set volume command that gets set with the slider.  You basically slide your finger and wherever you end up (say 40), the EA3 is suppose to send a discrete IP command to the sound bar for volume 40 (or in the case of my Sony, 20). 

-D 

Link to comment
Share on other sites

  • 1 month later...

So my dealer submitted a bug report about this last month, but I don't have any idea if/when C4 will fix it.  I'm sure this isn't a high priority.  The driver source code is available to download from the Control4 driver search page.  Is anyone willing to take a look at it to see if they can identify where the issue is and what it would take to fix it?  I'm willing to pay for this service, of course.  Please message me if you are available and willing to do this.  

I'm only guessing this is an bug with the driver, and not with OS.  And although I'm running OS3 now, I believe this bug always existed, it's just more apparent with the volume sliders that were introduced with OS3. Even with OS2, when using the Alexa integration, if I asked Alexa to turn up the volume, it would go up by more than 2x the volume.  So again, this appeared to be the same issue, I just assumed at the time it was an Alexa based issue and just didn't use that voice command.

Thanks,

Dino

Link to comment
Share on other sites

On 7/6/2019 at 7:37 AM, dinom said:

So my dealer submitted a bug report about this last month, but I don't have any idea if/when C4 will fix it.  I'm sure this isn't a high priority.  The driver source code is available to download from the Control4 driver search page.  Is anyone willing to take a look at it to see if they can identify where the issue is and what it would take to fix it?  I'm willing to pay for this service, of course.  Please message me if you are available and willing to do this.  

I'm only guessing this is an bug with the driver, and not with OS.  And although I'm running OS3 now, I believe this bug always existed, it's just more apparent with the volume sliders that were introduced with OS3. Even with OS2, when using the Alexa integration, if I asked Alexa to turn up the volume, it would go up by more than 2x the volume.  So again, this appeared to be the same issue, I just assumed at the time it was an Alexa based issue and just didn't use that voice command.

Thanks,

Dino

I’ll find the bug on this and see if it’s a problem with the iOS app.  If so, my team can get it fixed for you.  If it’s on the driver side,  getting it fixed will depend on if it’s a certified driver that Control4 wrote.

Link to comment
Share on other sites

Thanks for looking into this for me! 

This would really be great if you could fix this bug, as it's really been a nuisance since this soundbar is used for our main TV sound. 

Based on the Control4 driver site, the HTST9 driver is a certified driver - hopefully that means you can fix this if the bug exists in the driver.

Thanks again!

Dino

htst9_certified.PNG

Link to comment
Share on other sites

  • 2 weeks later...

Interesting, hopefully jakblak can help push this along. 

What’s frustrating is that the driver and code is freely available so someone at C4 should be able to debug and fix this easily.

Apparently, because Sony provided the original driver, they have to be the ones to fix it, which I don’t understand. 

Link to comment
Share on other sites

The driver is not encrypted and I spent a few minutes going through it looking for the cause.  What I've found is that the driver does in fact convert from a 0-100 scale to a 0-50 scale via the function below. 

  • Values being sent to this function are:
    • volLevel = 20
    • minVolLevel = 0
    • maxVolLevel = 100  
    • minDeviceLevel = 0
    • maxDeviceLevel = 50
function ProcessVolumeLevel(volLevel, minVolLevel, maxVolLevel, minDeviceLevel, maxDeviceLevel)
	  local level = (volLevel-minVolLevel)/(maxVolLevel-minVolLevel)
	  --Dbg:Info("level = " .. level)
	  local vl=(level*(maxDeviceLevel-minDeviceLevel))+minDeviceLevel
	  --Dbg:Info("vl = " .. vl)
	  vl= tonumber(("%.".."0".."f"):format(vl))
	  --Dbg:Info("vl new = " .. vl)
	  Dbg:Info("ProcessVolumeLevel(level in=" .. volLevel .. ", level out=" .. vl .. ")")
	  return vl
end

The resulting output from the debug logs is this:

ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function SET_VOLUME_LEVEL()
OUTPUT:  4000
LEVEL:  40
ProcessVolumeLevel(level in=40, level out=20)
PRX_CMD.SET_VOLUME_LEVEL(), volumeLevel_dB = 20

A volume level of 40 is coming into this function and is converted to 20 db.  A SET_VOLUME_LEVEL (with a value of 20 db) command is then queued up to be sent to the sound bar.  Looks like there may be a problem in the sound bar api or the firmware 

Link to comment
Share on other sites

17 minutes ago, jakblak said:

The driver is not encrypted and I spent a few minutes going through it looking for the cause.  What I've found is that the driver does in fact convert from a 0-100 scale to a 0-50 scale via the function below. 

  • Values being sent to this function are:
    • volLevel = 20
    • minVolLevel = 0
    • maxVolLevel = 100  
    • minDeviceLevel = 0
    • maxDeviceLevel = 50

function ProcessVolumeLevel(volLevel, minVolLevel, maxVolLevel, minDeviceLevel, maxDeviceLevel)
	  local level = (volLevel-minVolLevel)/(maxVolLevel-minVolLevel)
	  --Dbg:Info("level = " .. level)
	  local vl=(level*(maxDeviceLevel-minDeviceLevel))+minDeviceLevel
	  --Dbg:Info("vl = " .. vl)
	  vl= tonumber(("%.".."0".."f"):format(vl))
	  --Dbg:Info("vl new = " .. vl)
	  Dbg:Info("ProcessVolumeLevel(level in=" .. volLevel .. ", level out=" .. vl .. ")")
	  return vl
end

The resulting output from the debug logs is this:


ReceivedFromProxy(): SET_VOLUME_LEVEL on binding 5001; Call Function SET_VOLUME_LEVEL()
OUTPUT:  4000
LEVEL:  40
ProcessVolumeLevel(level in=40, level out=20)
PRX_CMD.SET_VOLUME_LEVEL(), volumeLevel_dB = 20

A volume level of 40 is coming into this function and is converted to 20 db.  A SET_VOLUME_LEVEL (with a value of 20 db) command is then queued up to be sent to the sound bar.  Looks like there may be a problem in the sound bar api or the firmware 

Thank you. Is this something that can be fixed easily ?

Link to comment
Share on other sites

Thanks, but I don't believe it's an Sony API or sound bar firmware thing.  I used to have an RTI system controlling this same exact sound bar, and it worked perfectly.  Both direct volume control and feedback to the touchscreen, as well as slider type volume control (which uses discrete volume commands as well).  I programmed that RTI system myself so I know for sure how it worked.  But in the RTI world, everything was controlled with the 0-50 scale, so 1:1 with the Sony API and no conversion was done.

I'm almost 100% certain it's either in the Sony C4 driver or some interaction between the driver and the C4 OS3.

-D

Link to comment
Share on other sites

3 minutes ago, dinom said:

Thanks, but I don't believe it's an Sony API or sound bar firmware thing.  I used to have an RTI system controlling this same exact sound bar, and it worked perfectly.  Both direct volume control and feedback to the touchscreen, as well as slider type volume control (which uses discrete volume commands as well).  I programmed that RTI system myself so I know for sure how it worked.  But in the RTI world, everything was controlled with the 0-50 scale, so 1:1 with the Sony API and no conversion was done.

I'm almost 100% certain it's either in the Sony C4 driver or some interaction between the driver and the C4 OS.

-D

Fair enough... I've written a few drivers in my time but it's not my full-time job so I admit I may be wrong.  I'm just basing my assumptions off of what I see in the code and the debug output.  

 

Just for reference, that 20db value is then assigned to the 'value' field of this Sony API command 

tVolumeSetCommandMap_dB = {
		--index:  mod 1000 value of Output Connection id
		--value:  Protocol Command Data (Discreet Volume - command prefix/suffix)	
		[0] = {id=0, type="set", feature="main.volumedb", value=""},	--valid values: -92.0 to 23.0. step = 0.5 |  -100 = -?
		[1] = {id=0, type="set", feature="zone2.volumedb", value=""},
		[2] = {id=0, type="set", feature="zone3.volumedb", value=""},
	}

Perhaps the 0-100 to 0-50 conversion should be translated to a value between -92.0 and 23.0 instead

Link to comment
Share on other sites

The sound bar front panel display goes from 0-50 in 1 step increments, so I don't think that comment about -92.0 to 23.0 is correct, or makes sense.  I believe the same API is used for their AV receivers, so maybe that's where that comes from, not sure. 

Link to comment
Share on other sites

I also notice in the code both "step" and "dB" volume commands are supported.  How does the driver figure out which to use?  Also strange is that the valid steps are 0 to 100.

 tVolumeSetCommandMap_Step = {
  --index:  mod 1000 value of Output Connection id
  --value:  Protocol Command Data (Discreet Volume - command prefix/suffix) 
  [0] = {id=0, type="set", feature="main.volumestep", value=""}, --valid values: 0 to 100. step = 1
  [1] = {id=0, type="set", feature="zone2.volumestep", value=""},
  [2] = {id=0, type="set", feature="zone3.volumestep", value=""},
 }
 
 tVolumeSetCommandMap_dB = {
  --index:  mod 1000 value of Output Connection id
  --value:  Protocol Command Data (Discreet Volume - command prefix/suffix) 
  [0] = {id=0, type="set", feature="main.volumedb", value=""}, --valid values: -92.0 to 23.0. step = 0.5 |  -100 = -?
  [1] = {id=0, type="set", feature="zone2.volumedb", value=""},
  [2] = {id=0, type="set", feature="zone3.volumedb", value=""},

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.