Mailing List Archive

HDMI keep alive, maybe via sending silent audio?
Hello,

I'm having trouble with my soundbar, which also works as an AV receiver (AVR), going to sleep after a few minutes of no audio from MythTV, e.g. if paused or in menus.

As the soundbar is working as an AVR, when it sleeps not only do I lose sound, but the picture also disappears, so this is quite annoying!

The soundbar doesn't seem to do this with my Roku box or PS3, so I was wondering if there was something MythTV (or Linux) could do to avoid this happening too.

To expand:

The soundbar has several sockets, including analogue audio inputs, optical input, Bluetooth input, 3 HDMI inputs and one input/output socket for HDMI ARC, the latter of which plugs into the TV.

The HDMI ARC socket is used as an output when HDMI 1, 2 or 3 are selected as the current input on the soundbar - the soundbar will play the audio directly from the HDMI 1, 2 or 3 input, and pass the signal onto the HDMI ARC socket for display on the TV. So the soundbar can be used as a switcher as well as speakers, if you run out of HDMI sockets on the TV.

The HDMI ARC socket can also be selected as an input on the soundbar itself, in which case it will play whatever sound the TV is generating, for sources plugged into the TV itself, or when using the TV built-in tuner, or smart facilities.

According to the soundbar manual, by design it will go to sleep after a few minutes of silence on the currently selected input. This certainly seems to be the case when the analogue audio inputs are used.

As I say, if MythTV is plugged into one of the three HDMI inputs and the TV plugged into HDMI ARC, after a few minutes of no audio output from MythTV, the soundbar will go to sleep, turning off both sound and picture.

This seems to be design, and I would have to live with it, if it wasn't for the fact that other HDMI sources plugged into the soundbar don't seem to cause this behaviour, so it seems technically possible to be overridable by the source.

For example, if my Roku box is plugged into one of the soundbar HDMI inputs but is paused or in its menus, the soundbar won't go to sleep. Similarly with my PS3.

Interestingly, when the HDMI ARC socket is selected as the input on the soundbar, this also causes the soundbar to not sleep (like with the Roku and PS3) even if the TV is not outputting any sound, as long as the TV is actually switched on (this may depend on the TV, but seems to be the case with a Panasonic and a Samsung at least).

So one workaround is that I can plug MythTV directly into one of the TV HDMI inputs, and the sound will still come out of the soundbar and it won't go to sleep.

However, my TV has limited HDMI inputs and for other reasons I might prefer to connect it via the soundbar. And anyway, I am now intellectually intrigued how this could be solved.

So, is there anything I can set in MythTV, or elsewhere in Linux, to stop this? Do you think the Roku or PS3 are sending "silent" audio output continuously to stop this happening, and if so, can I do the same on the PC?

Note that this is not being caused by the PC power saving, as I can be actively scrolling through menus etc., and the soundbar will suddenly sleep - it seems to be related directly to the soundbar detecting no audio after a few minutes.

Thanks in advance.

John
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
John Veness <John.Veness.mythtv@pelago.org.uk> wrote:

> The soundbar has several sockets, including analogue audio inputs, optical input, Bluetooth input, 3 HDMI inputs and one input/output socket for HDMI ARC, the latter of which plugs into the TV.
>
> The HDMI ARC socket is used as an output when HDMI 1, 2 or 3 are selected as the current input on the soundbar - the soundbar will play the audio directly from the HDMI 1, 2 or 3 input, and pass the signal onto the HDMI ARC socket for display on the TV. So the soundbar can be used as a switcher as well as speakers, if you run out of HDMI sockets on the TV.
>
> The HDMI ARC socket can also be selected as an input on the soundbar itself, in which case it will play whatever sound the TV is generating, for sources plugged into the TV itself, or when using the TV built-in tuner, or smart facilities.
>
> According to the soundbar manual, by design it will go to sleep after a few minutes of silence on the currently selected input. This certainly seems to be the case when the analogue audio inputs are used.

Can it be set to only use the ARC audio channel - even when switching one of the HDMI inputs to the TV ?
If not, then that's as carp a design as not being able to not sleep on lack of sound. What if someone connects a computer that doesn't do sound out via DVI - my laptop annoying comes from just before Apple started outputting audio to the mini-displayport ?

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/2016 10:03, Simon Hobson wrote:
> John Veness <John.Veness.mythtv@pelago.org.uk> wrote:
>
>> The soundbar has several sockets, including analogue audio inputs, optical input, Bluetooth input, 3 HDMI inputs and one input/output socket for HDMI ARC, the latter of which plugs into the TV.
>>
>> The HDMI ARC socket is used as an output when HDMI 1, 2 or 3 are selected as the current input on the soundbar - the soundbar will play the audio directly from the HDMI 1, 2 or 3 input, and pass the signal onto the HDMI ARC socket for display on the TV. So the soundbar can be used as a switcher as well as speakers, if you run out of HDMI sockets on the TV.
>>
>> The HDMI ARC socket can also be selected as an input on the soundbar itself, in which case it will play whatever sound the TV is generating, for sources plugged into the TV itself, or when using the TV built-in tuner, or smart facilities.
>>
>> According to the soundbar manual, by design it will go to sleep after a few minutes of silence on the currently selected input. This certainly seems to be the case when the analogue audio inputs are used.
> Can it be set to only use the ARC audio channel - even when switching one of the HDMI inputs to the TV ?
> If not, then that's as carp a design as not being able to not sleep on lack of sound. What if someone connects a computer that doesn't do sound out via DVI - my laptop annoying comes from just before Apple started outputting audio to the mini-displayport ?
The soundbar (a Maxell MXSP-SB3000)**was nice and cheap, gives good
sound, and has a nice lot of inputs, but is otherwise not very
configurable, so unfortunately it doesn't allow configuring to always
take the audio from the HDMI ARC socket, independent of the HDMI
switching capability. (It also doesn't accept discrete power off and
power on commands, which makes programming a universal remote annoying).

Regardless of the "going to sleep" problem, I wish it could be made to
always take audio from HDMI ARC, because something I haven't mentioned
is that when it plays the audio directly from the HDMI input socket and
passes the picture onto the TV via the HDMI ARC socket, the audio comes
out slightly before the picture, presumably due to image processing
delays on the TV. When the TV sends the audio out of its HDMI ARC
socket, it seems to do so with no delay. Luckily, with Myth at least
(maybe not other sources) the audio can be set to be delayed, to
counteract that.

It may be that one solution would be to ignore the three other HDMI
inputs on the soundbar and use a separate HDMI switcher, plugged into a
separate HDMI socket on the TV, and use the TV's HDMI ARC output to the
soundbar, which experimentation is showing that it would not sleep on
silence.

But that does seem a waste of money, waste of power, another remote to
deal with, or push me over the limit of number of devices I can program
into my universal remote. Especially as the soundbar *can* do HDMI
switching, and *can* seemingly not sleep when my Roku or PS3 is plugged
into it, even when those devices are paused or in menus.

I'm sure there is a solution, presumably by playing a "silent" WAV file
on a loop. I'm not sure if I'd be able to play that all the time, and
have Myth's audio output mixed into it, or whether I would need to
somehow only play it while in menus or paused. Any ideas, anyone?

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
John Veness <John.Veness.mythtv@pelago.org.uk> wrote:

> The soundbar (a Maxell MXSP-SB3000) was nice and cheap, gives good sound, and has a nice lot of inputs, but is otherwise not very configurable, so unfortunately it doesn't allow configuring to always take the audio from the HDMI ARC socket, independent of the HDMI switching capability. (It also doesn't accept discrete power off and power on commands, which makes programming a universal remote annoying).
>
> Regardless of the "going to sleep" problem, I wish it could be made to always take audio from HDMI ARC, because something I haven't mentioned is that when it plays the audio directly from the HDMI input socket and passes the picture onto the TV via the HDMI ARC socket, the audio comes out slightly before the picture, presumably due to image processing delays on the TV. When the TV sends the audio out of its HDMI ARC socket, it seems to do so with no delay.

Yes, the TV will be compensating for it's processing delays and outputting the audio at the right time, the switcher cannot have any idea what delays the display has and cannot compensate for them.

> Luckily, with Myth at least (maybe not other sources) the audio can be set to be delayed, to counteract that.


> It may be that one solution would be to ignore the three other HDMI inputs on the soundbar and use a separate HDMI switcher, plugged into a separate HDMI socket on the TV, and use the TV's HDMI ARC output to the soundbar, which experimentation is showing that it would not sleep on silence.
>
> But that does seem a waste ...

Yes indeed, you've bought an HDMI switch which "doesn't work" (for at least one definition of "work").
I'd be inclined to contact the manufacturer (or perhaps the vendor) first and complain that it a) "doesn't work" (as in turns off when it shouldn't) and b) "doesn't work" (as in "the sound isn't synced - don't tell them that you can adjust for it !). The latter makes the product "not fit for purpose" IMO.

Almost certainly both problems could be fixed by allowing use of ARC while switching HDMI inputs.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/2016 12:04, Simon Hobson wrote:
> Yes indeed, you've bought an HDMI switch which "doesn't work" (for at least one definition of "work").
> I'd be inclined to contact the manufacturer (or perhaps the vendor) first and complain that it a) "doesn't work" (as in turns off when it shouldn't) and b) "doesn't work" (as in "the sound isn't synced - don't tell them that you can adjust for it !). The latter makes the product "not fit for purpose" IMO.
Thanks Simon for all your replies so far.

I could contact the manufacturer, and indeed have done so already to ask
whether the auto-sleep could be disabled, and the lack of discrete
remote commands, but have just been told that such things will be
considered for future products, so no help there. The sound
synchronisation thing I need to do a few more experiments, with
different sources, before deciding what to do about that. Certainly when
I plugged my Roku into one of the other HDMI inputs, I didn't notice so
much of a problem.

But I keep coming back to the fact that I feel like this can be solved,
in software, in Myth or Linux itself, given that other sources inputting
to the soundbar don't trigger the problem. My hacker mentality would
rather solve it that way than have to deal with the manufacturer or
change any hardware.

I don't know whether the soundbar notices silence by "listening" for
actual silence, or just because it is getting no audio bitstream. If the
latter, then sending a load of zero bytes (or whatever is the equivalent
for silence) should presumably work, but I haven't tried this yet.

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/16 11:01, John Veness wrote:
> On 16/05/2016 10:03, Simon Hobson wrote:
>> John Veness <John.Veness.mythtv@pelago.org.uk> wrote:
>>
>>> The soundbar has several sockets, including analogue audio inputs, optical input, Bluetooth
>>> input, 3 HDMI inputs and one input/output socket for HDMI ARC, the latter of which plugs into the
>>> TV.
>>>
>>> The HDMI ARC socket is used as an output when HDMI 1, 2 or 3 are selected as the current input on
>>> the soundbar - the soundbar will play the audio directly from the HDMI 1, 2 or 3 input, and pass
>>> the signal onto the HDMI ARC socket for display on the TV. So the soundbar can be used as a
>>> switcher as well as speakers, if you run out of HDMI sockets on the TV.
>>>
>>> The HDMI ARC socket can also be selected as an input on the soundbar itself, in which case it
>>> will play whatever sound the TV is generating, for sources plugged into the TV itself, or when
>>> using the TV built-in tuner, or smart facilities.
>>>
>>> According to the soundbar manual, by design it will go to sleep after a few minutes of silence on
>>> the currently selected input. This certainly seems to be the case when the analogue audio inputs
>>> are used.
>> Can it be set to only use the ARC audio channel - even when switching one of the HDMI inputs to
>> the TV ?
>> If not, then that's as carp a design as not being able to not sleep on lack of sound. What if
>> someone connects a computer that doesn't do sound out via DVI - my laptop annoying comes from just
>> before Apple started outputting audio to the mini-displayport ?
> The soundbar (a Maxell MXSP-SB3000)**was nice and cheap, gives good sound, and has a nice lot of
> inputs, but is otherwise not very configurable, so unfortunately it doesn't allow configuring to
> always take the audio from the HDMI ARC socket, independent of the HDMI switching capability. (It
> also doesn't accept discrete power off and power on commands, which makes programming a universal
> remote annoying).
>
> Regardless of the "going to sleep" problem, I wish it could be made to always take audio from HDMI
> ARC, because something I haven't mentioned is that when it plays the audio directly from the HDMI
> input socket and passes the picture onto the TV via the HDMI ARC socket, the audio comes out
> slightly before the picture, presumably due to image processing delays on the TV. When the TV sends
> the audio out of its HDMI ARC socket, it seems to do so with no delay. Luckily, with Myth at least
> (maybe not other sources) the audio can be set to be delayed, to counteract that.
>
> It may be that one solution would be to ignore the three other HDMI inputs on the soundbar and use a
> separate HDMI switcher, plugged into a separate HDMI socket on the TV, and use the TV's HDMI ARC
> output to the soundbar, which experimentation is showing that it would not sleep on silence.
>
> But that does seem a waste of money, waste of power, another remote to deal with, or push me over
> the limit of number of devices I can program into my universal remote. Especially as the soundbar
> *can* do HDMI switching, and *can* seemingly not sleep when my Roku or PS3 is plugged into it, even
> when those devices are paused or in menus.
>
> I'm sure there is a solution, presumably by playing a "silent" WAV file on a loop. I'm not sure if
> I'd be able to play that all the time, and have Myth's audio output mixed into it, or whether I
> would need to somehow only play it while in menus or paused. Any ideas, anyone?
>
I have a cheap HDMI switcher I bought from Maplins, reason being the BT Vision box would complain
when I plugged something else into one of the TV's other HDMI inputs (!). I don't get where BT can
decide what I plug into my TV, or why they care, but I digress.

If you order the inputs correctly, then you should never need to use the remote that comes with the
switcher. The BT box is input 1 and the myth box is 2. I did have another host that I used for Skype
plugged into input 3. This means that it defaults to 1 except when I switch the myth box on and it
goes back when I shut the myth box down. Look, no hands!

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/2016 12:43, Mike Perkins wrote:
> I have a cheap HDMI switcher I bought from Maplins, reason being the
> BT Vision box would complain when I plugged something else into one of
> the TV's other HDMI inputs (!). I don't get where BT can decide what I
> plug into my TV, or why they care, but I digress.
>
> If you order the inputs correctly, then you should never need to use
> the remote that comes with the switcher. The BT box is input 1 and the
> myth box is 2. I did have another host that I used for Skype plugged
> into input 3. This means that it defaults to 1 except when I switch
> the myth box on and it goes back when I shut the myth box down. Look,
> no hands

Thanks, sounds clever, but I don't think that would work for me. My box
is a combined BE/FE so is powered on for long periods of time, even when
no one is watching its output.

I'd still rather find a software fix. A loop like "while [ true ] ; do
aplay -q silent.wav ; done" is something I could try. If it works, I
would make the wav file a few seconds long, and add a "sleep 120" or
similar in there, so that it's not using too much CPU. What I don't know
is whether this will nicely mix with Myth's output.

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Hoi John,

Monday, May 16, 2016, 2:43:13 PM, you wrote:

> On 16/05/2016 12:43, Mike Perkins wrote:

> I have a cheap HDMI switcher I bought from Maplins, reason
> being the BT Vision box would complain when I plugged
> something else into one of the TV's other HDMI inputs (!). I don't
> get where BT can decide what I plug into my TV, or why they care, but I digress.
>
> If you order the inputs correctly, then you should never
> need to use the remote that comes with the switcher. The BT
> box is input 1 and the myth box is 2. I did have another host
> that I used for Skype plugged into input 3. This means that it
> defaults to 1 except when I switch the myth box on and it goes
> back when I shut the myth box down. Look, no hands
>
> Thanks, sounds clever, but I don't think that would work for
> me. My box is a combined BE/FE so is powered on for long periods
> of time, even when no one is watching its output.
>
> I'd still rather find a software fix. A loop like "while [
> true ] ; do aplay -q silent.wav ; done" is something I could
> try. If it works, I would make the wav file a few seconds long,
> and add a "sleep 120" or similar in there, so that it's not
> using too much CPU. What I don't know is whether this will
> nicely mix with Myth's output.
>
> John
>

You could add in an api call to check if anything is already played on
the frontend.

Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/2016 14:25, Hika van den Hoven wrote:
>> I'd still rather find a software fix. A loop like "while [
>> true ] ; do aplay -q silent.wav ; done" is something I could
>> try. If it works, I would make the wav file a few seconds long,
>> and add a "sleep 120" or similar in there, so that it's not
>> using too much CPU. What I don't know is whether this will
>> nicely mix with Myth's output.
>>
>> John
> You could add in an api call to check if anything is already played on
> the frontend.
Thanks Hika. Can anyone give me a simple example on how to do that?
Would it return True that something was currently playing, if in fact
playback was paused? If so, that would be a problem.

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Hoi John,

Monday, May 16, 2016, 3:41:27 PM, you wrote:

> On 16/05/2016 14:25, Hika van den Hoven wrote:

>
>
> I'd still rather find a software fix. A loop like "while [
> true ] ; do aplay -q silent.wav ; done" is something I could
> try. If it works, I would make the wav file a few seconds long,
> and add a "sleep 120" or similar in there, so that it's not
> using too much CPU. What I don't know is whether this will
> nicely mix with Myth's output.
>
> John

>
>

> You could add in an api call to check if anything is already played on
> the frontend.

>
> Thanks Hika. Can anyone give me a simple example on how to do
> that? Would it return True that something was currently playing,
> if in fact playback was paused? If so, that would be a problem.
>
> John
>

You should look at this frontend api call:
https://www.mythtv.org/wiki/Frontend_Service#GetStatus
There is a state field but I can not find all it's possible values. I
see idle and WatchingPreRecorded so far.
Else you could look at changes in playedtime

Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Hi John,

I have recently noticed something that might help.

I used to control the volume of the TV and MythTV via my TV Remote - and
everything else MythTV-wise via my wireless keyboard.

While playing around with the mythtv audio setup, I decided to experiment
with using MythTV to control it's volume.

I have noticed now that I keep the TVs volume up higher, and use the MythTV
volume & mute keys to raise & lower the volume, and in so doing, there is
some additional noise that is introduced via either your soundcards mixer
or more noise via the mythtv software mixer.

That extra amount of noise may be enough to workaround your TV getting
silence.

Just thought it might be worth a try.

George

-- George

On Mon, May 16, 2016 at 9:00 AM, Hika van den Hoven <hikavdh@gmail.com>
wrote:

> Hoi John,
>
> Monday, May 16, 2016, 3:41:27 PM, you wrote:
>
> > On 16/05/2016 14:25, Hika van den Hoven wrote:
>
> >
> >
> > I'd still rather find a software fix. A loop like "while [
> > true ] ; do aplay -q silent.wav ; done" is something I could
> > try. If it works, I would make the wav file a few seconds long,
> > and add a "sleep 120" or similar in there, so that it's not
> > using too much CPU. What I don't know is whether this will
> > nicely mix with Myth's output.
> >
> > John
>
> >
> >
>
> > You could add in an api call to check if anything is already played on
> > the frontend.
>
> >
> > Thanks Hika. Can anyone give me a simple example on how to do
> > that? Would it return True that something was currently playing,
> > if in fact playback was paused? If so, that would be a problem.
> >
> > John
> >
>
> You should look at this frontend api call:
> https://www.mythtv.org/wiki/Frontend_Service#GetStatus
> There is a state field but I can not find all it's possible values. I
> see idle and WatchingPreRecorded so far.
> Else you could look at changes in playedtime
>
> Tot mails,
> Hika mailto:hikavdh@gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
What video card do you have? Nvidia?

If so you may well have the card turning off the hdmi when something is not
connected/connected to another hdmi, when you switch back you get no
signal. This is well documented. There are several solutions and packages.
On May 15, 2016 7:53 AM, "John Veness" <John.Veness.mythtv@pelago.org.uk>
wrote:

> Hello,
>
> I'm having trouble with my soundbar, which also works as an AV receiver
> (AVR), going to sleep after a few minutes of no audio from MythTV, e.g. if
> paused or in menus.
>
> As the soundbar is working as an AVR, when it sleeps not only do I lose
> sound, but the picture also disappears, so this is quite annoying!
>
> The soundbar doesn't seem to do this with my Roku box or PS3, so I was
> wondering if there was something MythTV (or Linux) could do to avoid this
> happening too.
>
> To expand:
>
> The soundbar has several sockets, including analogue audio inputs, optical
> input, Bluetooth input, 3 HDMI inputs and one input/output socket for HDMI
> ARC, the latter of which plugs into the TV.
>
> The HDMI ARC socket is used as an output when HDMI 1, 2 or 3 are selected
> as the current input on the soundbar - the soundbar will play the audio
> directly from the HDMI 1, 2 or 3 input, and pass the signal onto the HDMI
> ARC socket for display on the TV. So the soundbar can be used as a switcher
> as well as speakers, if you run out of HDMI sockets on the TV.
>
> The HDMI ARC socket can also be selected as an input on the soundbar
> itself, in which case it will play whatever sound the TV is generating, for
> sources plugged into the TV itself, or when using the TV built-in tuner, or
> smart facilities.
>
> According to the soundbar manual, by design it will go to sleep after a
> few minutes of silence on the currently selected input. This certainly
> seems to be the case when the analogue audio inputs are used.
>
> As I say, if MythTV is plugged into one of the three HDMI inputs and the
> TV plugged into HDMI ARC, after a few minutes of no audio output from
> MythTV, the soundbar will go to sleep, turning off both sound and picture.
>
> This seems to be design, and I would have to live with it, if it wasn't
> for the fact that other HDMI sources plugged into the soundbar don't seem
> to cause this behaviour, so it seems technically possible to be overridable
> by the source.
>
> For example, if my Roku box is plugged into one of the soundbar HDMI
> inputs but is paused or in its menus, the soundbar won't go to sleep.
> Similarly with my PS3.
>
> Interestingly, when the HDMI ARC socket is selected as the input on the
> soundbar, this also causes the soundbar to not sleep (like with the Roku
> and PS3) even if the TV is not outputting any sound, as long as the TV is
> actually switched on (this may depend on the TV, but seems to be the case
> with a Panasonic and a Samsung at least).
>
> So one workaround is that I can plug MythTV directly into one of the TV
> HDMI inputs, and the sound will still come out of the soundbar and it won't
> go to sleep.
>
> However, my TV has limited HDMI inputs and for other reasons I might
> prefer to connect it via the soundbar. And anyway, I am now intellectually
> intrigued how this could be solved.
>
> So, is there anything I can set in MythTV, or elsewhere in Linux, to stop
> this? Do you think the Roku or PS3 are sending "silent" audio output
> continuously to stop this happening, and if so, can I do the same on the PC?
>
> Note that this is not being caused by the PC power saving, as I can be
> actively scrolling through menus etc., and the soundbar will suddenly sleep
> - it seems to be related directly to the soundbar detecting no audio after
> a few minutes.
>
> Thanks in advance.
>
> John
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
>
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On Mon, 2016-05-16 at 14:41 +0100, John Veness wrote:
> On 16/05/2016 14:25, Hika van den Hoven wrote:
>
> > > I'd still rather find a software fix. A loop like "while [
> > > true ] ; do aplay -q silent.wav ; done" is something I could
> > > try. If it works, I would make the wav file a few seconds long,
> > > and add a "sleep 120" or similar in there, so that it's not
> > > using too much CPU. What I don't know is whether this will
> > > nicely mix with Myth's output.
> > >
> > > John
> > You could add in an api call to check if anything is already played on
> > the frontend.
> Thanks Hika. Can anyone give me a simple example on how to do that?
> Would it return True that something was currently playing, if in fact
> playback was paused? If so, that would be a problem.
>
> John

Assuming your sound bar can decode AC3..
Try setting mythtv audio output to upmix 5.1 with AC3 capability.
The IEC958 output (pass thru) over S/PDIF/Toslink/HDMI seems to keep the
link "clocked" when not actively playing.

Could just play a recording with AC3 audio stream & with mythtv audio
setting allowing pass thru & AC3 capable decoder (attached).



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On Mon, May 16, 2016 at 6:38 PM, HP-mini <blm-ubunet@slingshot.co.nz> wrote:

> Could just ....

just mix in the sounds of silence?

> The soundbar .... was ..... cheap

Sometimes one gets what one pays for. More advanced
soundbars are often more configurable(*), and some
support various audio sync (lip sync) adjustments.

That said, some TV's can be set to "game mode" to
reduce lag (apparently important to some). That tends
to disable some/all of the post processing, but those
are the trade offs one sometimes has to make.
[.btw, for at least some Samsung TV's, in addition to
the game mode, changing the input name to 'PC'
was reported to further reduce input lag].





(*) Although, as I understand it, some regional regs
have forced some manufacturers to default to various
power saving options that are not, always, best for
some use cases.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/16 19:53, Gary Buhrmaster wrote:
> On Mon, May 16, 2016 at 6:38 PM, HP-mini <blm-ubunet@slingshot.co.nz> wrote:
>
>> Could just ....
>
> just mix in the sounds of silence?
>
>> The soundbar .... was ..... cheap
>
> Sometimes one gets what one pays for. More advanced
> soundbars are often more configurable(*), and some
> support various audio sync (lip sync) adjustments.
>
> That said, some TV's can be set to "game mode" to
> reduce lag (apparently important to some). That tends
> to disable some/all of the post processing, but those
> are the trade offs one sometimes has to make.
> [.btw, for at least some Samsung TV's, in addition to
> the game mode, changing the input name to 'PC'
> was reported to further reduce input lag].
>
> (*) Although, as I understand it, some regional regs
> have forced some manufacturers to default to various
> power saving options that are not, always, best for
> some use cases.
>
The most important reason for choosing game mode (or equivalent) is that it removes any overscanning
by the TV: one pixel on the screen should equal one sent by the video card.

I still have no idea why digital TVs have overscan anyway, but many do and it can be complicated to
overcome. Game mode (or PC mode...) bypasses that problem.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 16/05/2016 13:43, John Veness wrote:
> I'd still rather find a software fix. A loop like "while [ true ] ; do
> aplay -q silent.wav ; done" is something I could try. If it works, I
> would make the wav file a few seconds long, and add a "sleep 120" or
> similar in there, so that it's not using too much CPU. What I don't
> know is whether this will nicely mix with Myth's output.

Thanks for everyone's help and advice so far.

Playing with it a bit last night I find that, contrary to what I said
previously, pausing playback in MythTV does *not* cause the soundbar to
sleep after three minutes. Only quitting playback and sitting or
fiddling in the menus will do so.

This makes me confident that there is definitely a software fix for the
unwanted behaviour I'm seeing. Presumably during paused playback, Myth
(or Linux, or ALSA or the sound driver) is sending a constant bitstream
of zeroes or equivalent to the HDMI audio output, which is enough to
keep the soundbar awake, but when in menus, nothing is sent at all,
causing it to sleep after three minutes.

The trick is how to send a similar empty bitstream while in menus.

So far I've been trying the aplay command, with no luck. If I do just
"aplay /usr/share/sounds/alsa/Noise.wav" the command looks like it does
something for a few seconds, but I hear no sound output.

If instead I do "aplay -L" to list the devices, then "aplay -D
dmix:CARD=HDMI,DEV=7 /usr/share/sounds/alsa/Noise.wav", which is the
same audio device I have selected in mythfrontend, the command exits
straight away, still no sound, and I get the error "aplay:
set_params:1239: Channels count not available".

All of this testing is while mythfrontend isn't running.

Anyone know how to use aplay, or another similar command, to output
something to HDMI audio?

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Mike Perkins <mikep@randomtraveller.org.uk> wrote:

> I still have no idea why digital TVs have overscan anyway, ...

My take on it is this ...
When the digital standard were being developed, CRTs still rules the game, and they "aren't pretty" with no overscan. So it made sense to carry on the tradition of sending a picture a bit bigger than needed so some of it can be cut off for clean edges.
In hindsight, it would have made sense for display devices to indicate not just their resolutions, but also their characteristics - and allowed for the source to send "more pixels" to devices suiting overscan.

I imagine I'm far from alone in seeing the complete lunacy of generating a nice crisp 1080 line image, only for the display device to degrade it by chopping 1/3 of it off and resampling (upscale) the remaining part. Mind you, in a world where people think a 1366x768 TV with only DVB-T tuner is "HD" thanks to marketing lies .....

SWMBO is quite happy with the quality of her old VHS cassettes !

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Quoting Simon Hobson <linux@thehobsons.co.uk>:
>
> SWMBO is quite happy with the quality of her old VHS cassettes !
>

Well, no-one really enjoys HD porn unless it is slightly soft focus.



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
Simon Hobson wrote:
> SWMBO is quite happy with the quality of her old VHS cassettes !

and anything less than 8hrs/cassette is a waste of tape, ammirite?-)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
On 17/05/2016 11:56, John Veness wrote:
> The trick is how to send a similar empty bitstream while in menus.
>
> So far I've been trying the aplay command, with no luck. If I do just
> "aplay /usr/share/sounds/alsa/Noise.wav" the command looks like it
> does something for a few seconds, but I hear no sound output.
>
> If instead I do "aplay -L" to list the devices, then "aplay -D
> dmix:CARD=HDMI,DEV=7 /usr/share/sounds/alsa/Noise.wav", which is the
> same audio device I have selected in mythfrontend, the command exits
> straight away, still no sound, and I get the error "aplay:
> set_params:1239: Channels count not available".
>
> All of this testing is while mythfrontend isn't running.

I've got a bit further with this. The "dmix" device is the one I've got
selected in mythfrontend, because all the others have their left and
right channels swapped for some reason. But I can't seem to get aplay to
work with the dmix device. If I do "aplay -D plughw:CARD=HDMI,DEV=7"
instead, I hear sound - possibly with left and right swapped but who
cares when I'll be outputting silence.

So I've got a loop like:

while [ true ] ; do aplay -q -D plughw:CARD=HDMI,DEV=7 silent.wav; sleep
150; done

This seems to work, in that it doesn't cause the soundbar to go to
sleep. I found that a two second sample of "silence" didn't seem to be
enough to keep the soundbar awake. Eight seconds is enough, but I
haven't tried anything in between. The "sleep 150" sleeps for two and a
half minutes, so it isn't making a silent "sound" all the time.

If Myth happens to be outputting sound at the time the loop comes around
(i.e. every 2.5 minutes), the aplay command just fails as it isn't able
to output any sound, but that's fine and it will try again in another
2.5 minutes.

More problematic is what happens if someone presses play on a recording
in the exact time when aplay happens to be outputting sound. In that
case, Myth will start the video, but the playback will be silent, with
an error message saying it couldn't open the sound device or similar.

With a, say, 5 second sample every 2.5 minutes, there's a roughly 3.33%
chance of this happening, or once in every 30 recordings played back,
which is often enough to be annoying, I think.

I am considering looking into MythTV System Event Handlers, to do
something like "pkill aplay" when playback starts, but haven't tried
that yet.

John

--
John Veness, MythTV user, UK, DVB-T
Re: HDMI keep alive, maybe via sending silent audio? [ In reply to ]
As a follow-up to this thread, I've mostly given up on this. The
occasional time when MythTV playback would start while "aplay" was
playing a few seconds of silence was annoying.

I tried to add a MythTV System Event Handler, to do "pkill aplay" when
playback starts, but that didn't seem to work. I didn't really look into
why. It may be that the pkill itself didn't work, or that it was taking
too long to pkill the process, and the sound device was still in use by
the time MythTV playback started. In any case, the whole thing seemed
clunky.

One more thing, I reported earlier that when I had an HDMI cable from my
HTPC to the soundbar, and another HDMI cable out from the soundbar into
the TV (so using the soundbar as an HDMI switcher as well as speakers),
I had to add 350ms of audio delay to MythTV, otherwise sound would come
out before the pictures. I have experimented some more and although that
is the case, any other HDMI source I've tried (Roku, PS3, Xbox 360) does
not have this problem. If I plug my HTPC directly into the TV I don't
have any problem either.

I can't work out why MythTV would act differently when played "through"
the soundbar like that. Anyone have any ideas? I'm using Intel graphics
if it makes a difference. I haven't done any more tests like using VLC,
or looked in frontend logs.

John

--
John Veness, MythTV user, UK, DVB-T