mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
- 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:
@@ -162,6 +162,9 @@ int cAudio::do_mute(bool enable, bool remember)
|
|||||||
sprintf(str, "%d", Muted);
|
sprintf(str, "%d", Muted);
|
||||||
proc_put("/proc/stb/audio/j1_mute", str, strlen(str));
|
proc_put("/proc/stb/audio/j1_mute", str, strlen(str));
|
||||||
|
|
||||||
|
if (fd < 1)
|
||||||
|
openDevice();
|
||||||
|
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
if (ioctl(fd, AUDIO_SET_MUTE, enable) < 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_left = left;
|
||||||
mixer.volume_right = right;
|
mixer.volume_right = right;
|
||||||
|
|
||||||
|
if (fd < 1)
|
||||||
|
openDevice();
|
||||||
|
|
||||||
if (fd > 0)
|
if (fd > 0)
|
||||||
{
|
{
|
||||||
if (ioctl(fd, AUDIO_SET_MIXER, &mixer) < 0)
|
if (ioctl(fd, AUDIO_SET_MIXER, &mixer) < 0)
|
||||||
|
Reference in New Issue
Block a user