From dad33d0aee437a9cfa988f4df684ddae060164c2 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 12 Jun 2020 22:27:03 +0200 Subject: [PATCH] rework VUPLUS defines Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/99de5b6be06bf9038cd98e4eba183be9cbafa4de Author: vanhofen Date: 2020-06-12 (Fri, 12 Jun 2020) Origin message was: ------------------ - rework VUPLUS defines ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 30 +++++++++++++++++++++--------- common/ca_ci.cpp | 2 +- include/ca_ci.h | 2 +- libarmbox/audio.cpp | 4 ++-- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 6e80562..e1475f2 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -305,26 +305,38 @@ fi # all vuplus BOXMODELs case "$BOXMODEL" in vusolo4k|vuduo4k|vuultimo4k|vuuno4k|vuuno4kse|vuzero4k|vuduo) - AC_DEFINE(BOXMODEL_VUPLUS, 1, [vuplus]) - vuplus=true + AC_DEFINE(BOXMODEL_VUPLUS_ALL, 1, [vuplus_all]) + vuplus_all=true ;; *) - vuplus=false + vuplus_all=false ;; esac -AM_CONDITIONAL(BOXMODEL_VUPLUS, test "$vuplus" = "true") +AM_CONDITIONAL(BOXMODEL_VUPLUS_ALL, test "$vuplus_all" = "true") -# all vuplus4k BOXMODELs +# all vuplus arm BOXMODELs case "$BOXMODEL" in vusolo4k|vuduo4k|vuultimo4k|vuuno4k|vuuno4kse|vuzero4k) - AC_DEFINE(BOXMODEL_VUPLUS4K, 1, [vuplus4k]) - vuplus4k=true + AC_DEFINE(BOXMODEL_VUPLUS_ARM, 1, [vuplus_arm]) + vuplus_arm=true ;; *) - vuplus4k=false + vuplus_arm=false ;; esac -AM_CONDITIONAL(BOXMODEL_VUPLUS4K, test "$vuplus4k" = "true") +AM_CONDITIONAL(BOXMODEL_VUPLUS_ARM, test "$vuplus_arm" = "true") + +# all vuplus mips BOXMODELs +case "$BOXMODEL" in + vuduo) + AC_DEFINE(BOXMODEL_VUPLUS_MIPS, 1, [vuplus_mips]) + vuplus_mips=true + ;; + *) + vuplus_mips=false + ;; +esac +AM_CONDITIONAL(BOXMODEL_VUPLUS_MIPS, test "$vuplus_mips" = "true") ]) dnl backward compatiblity diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index 7c17252..3571c88 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -1944,7 +1944,7 @@ void cCA::SetTSClock(u32 Speed, int slot) } } -#if BOXMODEL_VUPLUS +#if BOXMODEL_VUPLUS_ALL void cCA::SetCIDelay(int Delay) { char buf[64]; diff --git a/include/ca_ci.h b/include/ca_ci.h index 155aea9..1d43e6c 100644 --- a/include/ca_ci.h +++ b/include/ca_ci.h @@ -329,7 +329,7 @@ public: /// sh4 unused void SetTSClock(u32 Speed, int slot = 0); -#if BOXMODEL_VUPLUS +#if BOXMODEL_VUPLUS_ALL /// dvb wait delay for ci response void SetCIDelay(int Delay); /// relevant pids routing diff --git a/libarmbox/audio.cpp b/libarmbox/audio.cpp index 91408ce..835dc14 100644 --- a/libarmbox/audio.cpp +++ b/libarmbox/audio.cpp @@ -96,7 +96,7 @@ int map_volume(const int volume) vol = 63 - vol * 63 / 100; // now range is 63..0, where 0 is loudest -#if BOXMODEL_VUPLUS4K +#if BOXMODEL_VUPLUS_ALL if (vol == 63) vol = 255; #endif @@ -343,7 +343,7 @@ int cAudio::StopClip() hal_info("%s: clipfd not yet opened\n", __FUNCTION__); return -1; } -#if BOXMODEL_VUPLUS4K +#if BOXMODEL_VUPLUS_ARM ioctl(clipfd, SNDCTL_DSP_RESET); #endif close(clipfd);