<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 17/05/2016 11:56, John Veness wrote:<br>
    </div>
    <blockquote
      cite="mid:6089de4a-25d3-0164-f69f-2b146234b1ca@pelago.org.uk"
      type="cite"> The trick is how to send a similar empty bitstream
      while in menus.<br>
      <br>
      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.<br>
      <br>
      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".<br>
      <br>
      All of this testing is while mythfrontend isn't running.<br>
    </blockquote>
    <br>
    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.<br>
    <br>
    So I've got a loop like:<br>
    <br>
    while [ true ] ; do aplay -q -D
    plughw:CARD=HDMI,DEV=7 silent.wav; sleep 150; done<br>
    <br>
    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.<br>
    <br>
    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.<br>
    <br>
    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.<br>
    <br>
    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.<br>
    <br>
    I am considering looking into MythTV System Event Handlers, to do
    something like "pkill aplay" when playback starts, but haven't tried
    that yet.<br>
    <br>
    John<br>
    <pre class="moz-signature" cols="72">-- 
John Veness, MythTV user, UK, DVB-T</pre>
  </body>
</html>