mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
mips/arm: hwcaps pip_devs added
Origin commit data
------------------
Branch: master
Commit: 8e077f302a
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2021-10-02 (Sat, 02 Oct 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -31,6 +31,7 @@ typedef struct hw_caps
|
|||||||
int has_SCART_input;
|
int has_SCART_input;
|
||||||
int has_YUV_cinch;
|
int has_YUV_cinch;
|
||||||
int can_pip;
|
int can_pip;
|
||||||
|
int pip_devs;
|
||||||
int can_cpufreq;
|
int can_cpufreq;
|
||||||
int can_shutdown;
|
int can_shutdown;
|
||||||
int can_cec;
|
int can_cec;
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <linux/dvb/audio.h>
|
#include <linux/dvb/audio.h>
|
||||||
|
|
||||||
|
#include <hardware_caps.h>
|
||||||
#include <proc_tools.h>
|
#include <proc_tools.h>
|
||||||
|
|
||||||
#include "audio_lib.h"
|
#include "audio_lib.h"
|
||||||
@@ -50,7 +51,8 @@ static const char *ADEV[] =
|
|||||||
|
|
||||||
cAudio::cAudio(void *, void *, void *, unsigned int unit)
|
cAudio::cAudio(void *, void *, void *, unsigned int unit)
|
||||||
{
|
{
|
||||||
if (unit > 3)
|
hw_caps_t *hwcaps = get_hwcaps();
|
||||||
|
if (unit > (unsigned int) hwcaps->pip_devs)
|
||||||
{
|
{
|
||||||
hal_info("%s: unit %d out of range, setting to 0\n", __func__, unit);
|
hal_info("%s: unit %d out of range, setting to 0\n", __func__, unit);
|
||||||
devnum = 0;
|
devnum = 0;
|
||||||
|
@@ -28,8 +28,11 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
|
|
||||||
memset(&caps, 0, sizeof(hw_caps_t));
|
memset(&caps, 0, sizeof(hw_caps_t));
|
||||||
|
|
||||||
if (access("/dev/dvb/adapter0/video1", F_OK) != -1)
|
caps.pip_devs = 0;
|
||||||
caps.can_pip = 1;
|
if (access("/dev/dvb/adapter0/video1", F_OK) != -1) caps.pip_devs = 1;
|
||||||
|
if (access("/dev/dvb/adapter0/video2", F_OK) != -1) caps.pip_devs = 2;
|
||||||
|
if (access("/dev/dvb/adapter0/video3", F_OK) != -1) caps.pip_devs = 3;
|
||||||
|
if (caps.pip_devs > 0) caps.can_pip = 1;
|
||||||
|
|
||||||
#if BOXMODEL_VUSOLO4K
|
#if BOXMODEL_VUSOLO4K
|
||||||
caps.has_CI = 1;
|
caps.has_CI = 1;
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
#include "hal_debug.h"
|
#include "hal_debug.h"
|
||||||
#include "hdmi_cec.h"
|
#include "hdmi_cec.h"
|
||||||
|
|
||||||
|
#include <hardware_caps.h>
|
||||||
#include <proc_tools.h>
|
#include <proc_tools.h>
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
@@ -508,7 +509,8 @@ cVideo::cVideo(int, void *, void *, unsigned int unit)
|
|||||||
hue = -1;
|
hue = -1;
|
||||||
video_standby = 0;
|
video_standby = 0;
|
||||||
blank_mode = 0;
|
blank_mode = 0;
|
||||||
if (unit > 3)
|
hw_caps_t *hwcaps = get_hwcaps();
|
||||||
|
if (unit > (unsigned int) hwcaps->pip_devs)
|
||||||
{
|
{
|
||||||
hal_info("%s: unit %d out of range, setting to 0\n", __func__, unit);
|
hal_info("%s: unit %d out of range, setting to 0\n", __func__, unit);
|
||||||
devnum = 0;
|
devnum = 0;
|
||||||
|
@@ -28,8 +28,11 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
|
|
||||||
memset(&caps, 0, sizeof(hw_caps_t));
|
memset(&caps, 0, sizeof(hw_caps_t));
|
||||||
|
|
||||||
if (access("/dev/dvb/adapter0/video1", F_OK) != -1)
|
caps.pip_devs = 0;
|
||||||
caps.can_pip = 1;
|
if (access("/dev/dvb/adapter0/video1", F_OK) != -1) caps.pip_devs = 1;
|
||||||
|
if (access("/dev/dvb/adapter0/video2", F_OK) != -1) caps.pip_devs = 2;
|
||||||
|
if (access("/dev/dvb/adapter0/video3", F_OK) != -1) caps.pip_devs = 3;
|
||||||
|
if (caps.pip_devs > 0) caps.can_pip = 1;
|
||||||
|
|
||||||
#if BOXMODEL_VUDUO
|
#if BOXMODEL_VUDUO
|
||||||
caps.has_CI = 2;
|
caps.has_CI = 2;
|
||||||
|
Reference in New Issue
Block a user