Merge remote-tracking branch 'tangocash/master'

Origin commit data
------------------
Branch: master
Commit: 03ca73f8f5
Author: max_10 <max_10@gmx.de>
Date: 2017-10-07 (Sat, 07 Oct 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
max_10
2017-10-07 23:32:49 +02:00
3 changed files with 14 additions and 7 deletions

View File

@@ -21,7 +21,6 @@ libarmbox_la_SOURCES = \
dmx.cpp \
video.cpp \
audio.cpp \
audio_mixer.cpp \
init.cpp \
playback_gst.cpp \
pwrmngr.cpp \

View File

@@ -10,7 +10,7 @@
#include <proc_tools.h>
#include "audio_lib.h"
#include "audio_mixer.h"
//#include "audio_mixer.h"
#include "lt_debug.h"
#define AUDIO_DEVICE "/dev/dvb/adapter0/audio0"
@@ -27,9 +27,11 @@ cAudio::cAudio(void *, void *, void *)
clipfd = -1;
mixer_fd = -1;
/*
mixerAnalog = mixerHDMI = mixerSPDIF = NULL;
volumeAnalog = volumeHDMI = volumeSPDIF = 0;
mixersMuted = false;
mixersMuted = false
*/
openDevice();
Muted = false;
@@ -37,13 +39,13 @@ cAudio::cAudio(void *, void *, void *)
cAudio::~cAudio(void)
{
closeMixers();
//closeMixers();
closeDevice();
}
void cAudio::openDevice(void)
{
openMixers();
//openMixers();
if (fd < 0)
{
@@ -58,7 +60,7 @@ void cAudio::openDevice(void)
void cAudio::closeDevice(void)
{
closeMixers();
//closeMixers();
if (fd > -1) {
close(fd);
@@ -385,7 +387,9 @@ void cAudio::SetSRS(int /*iq_enable*/, int /*nmgr_enable*/, int /*iq_mode*/, int
void cAudio::SetHdmiDD(bool enable)
{
lt_debug("%s\n", __FUNCTION__);
const char *opt[] = { "downmix", "passthrough" };
lt_debug("%s %d\n", __func__, enable);
proc_put("/proc/stb/audio/ac3", opt[enable], strlen(opt[enable]));
}
void cAudio::SetSpdifDD(bool enable)
@@ -413,6 +417,7 @@ void cAudio::setBypassMode(bool disable)
lt_info("%s AUDIO_SET_BYPASS_MODE %d: %m\n", __func__, mode);
}
#if 0
void cAudio::openMixers(void)
{
if (!mixerAnalog)
@@ -464,3 +469,4 @@ void cAudio::muteMixers(bool m)
setMixerVolume("SPDIF", volumeSPDIF, false);
}
}
#endif

View File

@@ -100,10 +100,12 @@ class cAudio
void ScheduleMute(bool On);
void EnableAnalogOut(bool enable);
#if 0
void openMixers(void);
void closeMixers(void);
void setMixerVolume(const char *name, long value, bool remember = true);
void muteMixers(bool m = true);
#endif
};
#endif