- libarmbox/audio: re-open fd; thx to dni

see: https://www.neutrino-images.de/board/iptv-webtv-und-streaming-f39/epg-und-logos-fuer-webtv-sender-t801-s120.html#p35738

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2022-07-21 20:48:08 +02:00
committed by Thilo Graf
parent d289dc0597
commit 1b60622d75

View File

@@ -162,6 +162,9 @@ int cAudio::do_mute(bool enable, bool remember)
sprintf(str, "%d", Muted);
proc_put("/proc/stb/audio/j1_mute", str, strlen(str));
if (fd < 1)
openDevice();
if (fd > 0)
{
if (ioctl(fd, AUDIO_SET_MUTE, enable) < 0)
@@ -204,6 +207,9 @@ int cAudio::setVolume(unsigned int left, unsigned int right)
mixer.volume_left = left;
mixer.volume_right = right;
if (fd < 1)
openDevice();
if (fd > 0)
{
if (ioctl(fd, AUDIO_SET_MIXER, &mixer) < 0)