mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
fix audio/video devices
Origin commit data
------------------
Branch: master
Commit: cb74eae85b
Author: TangoCash <eric@loxat.de>
Date: 2017-10-05 (Thu, 05 Oct 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -58,7 +58,7 @@ void cAudio::openDevice(void)
|
|||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
if ((fd = open(AUDIO_DEVICE, O_RDWR)) < 0)
|
if ((fd = open(AUDIO_DEVICE, O_RDWR | O_NONBLOCK)) < 0)
|
||||||
lt_info("openDevice: open failed (%m)\n");
|
lt_info("openDevice: open failed (%m)\n");
|
||||||
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||||
do_mute(true, false);
|
do_mute(true, false);
|
||||||
@@ -397,9 +397,7 @@ void cAudio::SetSRS(int /*iq_enable*/, int /*nmgr_enable*/, int /*iq_mode*/, int
|
|||||||
|
|
||||||
void cAudio::SetHdmiDD(bool enable)
|
void cAudio::SetHdmiDD(bool enable)
|
||||||
{
|
{
|
||||||
const char *opt[] = { "pcm", "spdif" };
|
lt_debug("%s\n", __FUNCTION__);
|
||||||
lt_debug("%s %d\n", __func__, enable);
|
|
||||||
proc_put("/proc/stb/hdmi/audio_source", opt[enable], strlen(opt[enable]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cAudio::SetSpdifDD(bool enable)
|
void cAudio::SetSpdifDD(bool enable)
|
||||||
@@ -422,9 +420,9 @@ void cAudio::EnableAnalogOut(bool enable)
|
|||||||
#define AUDIO_BYPASS_OFF 1
|
#define AUDIO_BYPASS_OFF 1
|
||||||
void cAudio::setBypassMode(bool disable)
|
void cAudio::setBypassMode(bool disable)
|
||||||
{
|
{
|
||||||
const char *opt[] = { "passthrough", "downmix" };
|
int mode = disable ? AUDIO_BYPASS_OFF : AUDIO_BYPASS_ON;
|
||||||
lt_debug("%s %d\n", __func__, disable);
|
if (ioctl(fd, AUDIO_SET_BYPASS_MODE, mode) < 0)
|
||||||
proc_put("/proc/stb/audio/ac3", opt[disable], strlen(opt[disable]));
|
lt_info("%s AUDIO_SET_BYPASS_MODE %d: %m\n", __func__, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cAudio::openMixers(void)
|
void cAudio::openMixers(void)
|
||||||
|
@@ -200,7 +200,7 @@ void cVideo::openDevice(void)
|
|||||||
if (fd != -1) /* already open */
|
if (fd != -1) /* already open */
|
||||||
return;
|
return;
|
||||||
retry:
|
retry:
|
||||||
if ((fd = open(VDEV[devnum], O_RDWR|O_CLOEXEC)) < 0)
|
if ((fd = open(VDEV[devnum], O_RDWR|O_CLOEXEC|O_NONBLOCK)) < 0)
|
||||||
{
|
{
|
||||||
if (errno == EBUSY)
|
if (errno == EBUSY)
|
||||||
{
|
{
|
||||||
@@ -359,6 +359,10 @@ int cVideo::GetVideoSystem()
|
|||||||
"1080p60", // VIDEO_STD_1080P60
|
"1080p60", // VIDEO_STD_1080P60
|
||||||
"1080p2397", // VIDEO_STD_1080P2397
|
"1080p2397", // VIDEO_STD_1080P2397
|
||||||
"1080p2997", // VIDEO_STD_1080P2997
|
"1080p2997", // VIDEO_STD_1080P2997
|
||||||
|
"2160p24", //VIDEO_STD_2160P24
|
||||||
|
"2160p25", // VIDEO_STD_2160P25
|
||||||
|
"2160p30", // VIDEO_STD_2160P30
|
||||||
|
"2160p50", // VIDEO_STD_2160P50
|
||||||
"720p50" // VIDEO_STD_AUTO
|
"720p50" // VIDEO_STD_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user