mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
audio: change change DD over hdmi options to:
off, auto (old ON, if supported by device) and force
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2135 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 84afbc9a66
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-03-02 (Fri, 02 Mar 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -114,6 +114,8 @@ audiomenu.avsync_am Audio master
|
||||
audiomenu.clockrec
|
||||
audiomenu.dolbydigital Prefer Dolby Digital
|
||||
audiomenu.hdmi_dd Encoded DD on HDMI
|
||||
audiomenu.hdmi_dd_auto auto
|
||||
audiomenu.hdmi_dd_force force
|
||||
audiomenu.monoleft mono left
|
||||
audiomenu.monoright mono right
|
||||
audiomenu.pref_lang Prefered language
|
||||
|
@@ -5,6 +5,7 @@
|
||||
/* */
|
||||
/* (C) 2008 CoolStream International */
|
||||
/* */
|
||||
/* $Id:: $ */
|
||||
/*******************************************************************************/
|
||||
#ifndef __AUDIO_CS_H_
|
||||
#define __AUDIO_CS_H_
|
||||
@@ -37,6 +38,36 @@ typedef enum {
|
||||
AUDIO_FMT_ADVANCED = AUDIO_FMT_MLP
|
||||
} AUDIO_FORMAT;
|
||||
|
||||
typedef enum {
|
||||
HDMI_ENCODED_OFF,
|
||||
HDMI_ENCODED_AUTO,
|
||||
HDMI_ENCODED_FORCED
|
||||
} HDMI_ENCODED_MODE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HDMI_AUDIO_FMT_LPCM = 0x1,
|
||||
HDMI_AUDIO_FMT_AC3 ,
|
||||
HDMI_AUDIO_FMT_MPEG1 ,
|
||||
HDMI_AUDIO_FMT_MP3 ,
|
||||
HDMI_AUDIO_FMT_MPEG2 ,
|
||||
HDMI_AUDIO_FMT_AAC ,
|
||||
HDMI_AUDIO_FMT_DTS ,
|
||||
HDMI_AUDIO_FMT_ATRAC
|
||||
} HDMI_AUDIO_FORMAT;
|
||||
|
||||
#define CS_MAX_AUDIO_FORMATS 10
|
||||
|
||||
typedef struct cs_audio_format {
|
||||
HDMI_AUDIO_FORMAT format;
|
||||
unsigned int max_channels;
|
||||
} cs_audio_format_t;
|
||||
|
||||
typedef struct cs_audio_caps {
|
||||
unsigned char count;
|
||||
cs_audio_format_t formats[CS_MAX_AUDIO_FORMATS];
|
||||
} cs_audio_caps_t;
|
||||
|
||||
class cAudio {
|
||||
private:
|
||||
CS_AUDIO_PDATA *privateData;
|
||||
@@ -57,7 +88,7 @@ private:
|
||||
int volume;
|
||||
|
||||
bool clip_started;
|
||||
bool hdmiDD;
|
||||
HDMI_ENCODED_MODE hdmiDD;
|
||||
bool spdifDD;
|
||||
bool hasMuteScheduled;
|
||||
bool analogOut;
|
||||
@@ -110,10 +141,12 @@ public:
|
||||
void getAudioInfo(int &Type, int &Layer, int &Freq, int &Bitrate, int &Mode);
|
||||
void SetSRS(int iq_enable, int nmgr_enable, int iq_mode, int iq_level);
|
||||
bool IsHdmiDDSupported(void);
|
||||
void SetHdmiDD(bool Enable);
|
||||
void SetHdmiDD(HDMI_ENCODED_MODE type);
|
||||
void SetSpdifDD(bool Enable);
|
||||
void ScheduleMute(bool On);
|
||||
void EnableAnalogOut(bool Enable);
|
||||
bool GetHdmiAudioCaps(cs_audio_caps_t &caps);
|
||||
bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format);
|
||||
};
|
||||
|
||||
#endif //__AUDIO_CS_H_
|
||||
|
@@ -103,6 +103,14 @@ const CMenuOptionChooser::keyval AUDIOMENU_AVSYNC_OPTIONS[AUDIOMENU_AVSYNC_OPTIO
|
||||
{ 2, LOCALE_AUDIOMENU_AVSYNC_AM }
|
||||
};
|
||||
|
||||
#define AUDIOMENU_HDMI_DD_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval AUDIOMENU_HDMI_DD_OPTIONS[AUDIOMENU_HDMI_DD_OPTION_COUNT] =
|
||||
{
|
||||
{ HDMI_ENCODED_OFF, LOCALE_OPTIONS_OFF },
|
||||
{ HDMI_ENCODED_AUTO, LOCALE_AUDIOMENU_HDMI_DD_AUTO },
|
||||
{ HDMI_ENCODED_FORCED, LOCALE_AUDIOMENU_HDMI_DD_FORCE }
|
||||
};
|
||||
|
||||
// #define AUDIOMENU_CLOCKREC_OPTION_COUNT 2
|
||||
// const CMenuOptionChooser::keyval AUDIOMENU_CLOCKREC_OPTIONS[AUDIOMENU_CLOCKREC_OPTION_COUNT] =
|
||||
// {
|
||||
@@ -125,7 +133,7 @@ int CAudioSetup::showAudioSetup()
|
||||
CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier);
|
||||
|
||||
//dd via hdmi
|
||||
CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier);
|
||||
CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, AUDIOMENU_HDMI_DD_OPTIONS, AUDIOMENU_HDMI_DD_OPTION_COUNT, true, audioSetupNotifier);
|
||||
|
||||
//dd via spdif
|
||||
CMenuOptionChooser * as_oj_dd_spdif = new CMenuOptionChooser(LOCALE_AUDIOMENU_SPDIF_DD, &g_settings.spdif_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier);
|
||||
|
@@ -1661,7 +1661,7 @@ int CNeutrinoApp::run(int argc, char **argv)
|
||||
|
||||
audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume);
|
||||
audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume);
|
||||
audioDecoder->SetHdmiDD(g_settings.hdmi_dd ? true : false);
|
||||
audioDecoder->SetHdmiDD((HDMI_ENCODED_MODE)g_settings.hdmi_dd);
|
||||
audioDecoder->SetSpdifDD(g_settings.spdif_dd ? true : false);
|
||||
audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false);
|
||||
|
||||
|
@@ -141,6 +141,8 @@ typedef enum
|
||||
LOCALE_AUDIOMENU_CLOCKREC,
|
||||
LOCALE_AUDIOMENU_DOLBYDIGITAL,
|
||||
LOCALE_AUDIOMENU_HDMI_DD,
|
||||
LOCALE_AUDIOMENU_HDMI_DD_AUTO,
|
||||
LOCALE_AUDIOMENU_HDMI_DD_FORCE,
|
||||
LOCALE_AUDIOMENU_MONOLEFT,
|
||||
LOCALE_AUDIOMENU_MONORIGHT,
|
||||
LOCALE_AUDIOMENU_PREF_LANG,
|
||||
|
@@ -141,6 +141,8 @@ const char * locale_real_names[] =
|
||||
"audiomenu.clockrec",
|
||||
"audiomenu.dolbydigital",
|
||||
"audiomenu.hdmi_dd",
|
||||
"audiomenu.hdmi_dd_auto",
|
||||
"audiomenu.hdmi_dd_force",
|
||||
"audiomenu.monoleft",
|
||||
"audiomenu.monoright",
|
||||
"audiomenu.pref_lang",
|
||||
|
@@ -419,7 +419,7 @@ bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void
|
||||
} else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOG_OUT)) {
|
||||
audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false);
|
||||
} else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_HDMI_DD)) {
|
||||
audioDecoder->SetHdmiDD(g_settings.hdmi_dd ? true : false);
|
||||
audioDecoder->SetHdmiDD((HDMI_ENCODED_MODE) g_settings.hdmi_dd);
|
||||
} else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_SPDIF_DD)) {
|
||||
audioDecoder->SetSpdifDD(g_settings.spdif_dd ? true : false);
|
||||
} else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_AVSYNC)) {
|
||||
|
Reference in New Issue
Block a user