mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +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-s160.html#p35879
Origin commit data
------------------
Branch: master
Commit: a54f114181
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-07-21 (Thu, 21 Jul 2022)
Origin message was:
------------------
- 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-s160.html#p35879
------------------
This commit was generated by Migit
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