mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
neutrino: first preliminary support for AZbox ME
this is very experimental and depends on more fixes in libstb-hal, but audio / video / OSD are basically working
This commit is contained in:
@@ -389,9 +389,9 @@ AC_SUBST(CATALOGS)
|
||||
|
||||
AC_DEFUN([TUXBOX_BOXTYPE],[
|
||||
AC_ARG_WITH(boxtype,
|
||||
[ --with-boxtype valid values: dbox2,tripledragon,dreambox,ipbox,coolstream,generic],
|
||||
[ --with-boxtype valid values: dbox2,tripledragon,dreambox,ipbox,coolstream,spark,azbox,generic],
|
||||
[case "${withval}" in
|
||||
dbox2|dreambox|ipbox|tripledragon|coolstream|spark|generic)
|
||||
dbox2|dreambox|ipbox|tripledragon|coolstream|spark|azbox|generic)
|
||||
BOXTYPE="$withval"
|
||||
;;
|
||||
dm*)
|
||||
@@ -431,6 +431,7 @@ AC_ARG_WITH(boxmodel,
|
||||
AC_SUBST(BOXTYPE)
|
||||
AC_SUBST(BOXMODEL)
|
||||
|
||||
AM_CONDITIONAL(BOXTYPE_AZBOX, test "$BOXTYPE" = "azbox")
|
||||
AM_CONDITIONAL(BOXTYPE_DBOX2, test "$BOXTYPE" = "dbox2")
|
||||
AM_CONDITIONAL(BOXTYPE_TRIPLE, test "$BOXTYPE" = "tripledragon")
|
||||
AM_CONDITIONAL(BOXTYPE_DREAMBOX, test "$BOXTYPE" = "dreambox")
|
||||
@@ -452,6 +453,8 @@ AM_CONDITIONAL(BOXMODEL_IP400,test "$BOXMODEL" = "ip400")
|
||||
|
||||
if test "$BOXTYPE" = "dbox2"; then
|
||||
AC_DEFINE(HAVE_DBOX_HARDWARE, 1, [building for a dbox2])
|
||||
elif test "$BOXTYPE" = "azbox"; then
|
||||
AC_DEFINE(HAVE_AZBOX_HARDWARE, 1, [building for an azbox])
|
||||
elif test "$BOXTYPE" = "tripledragon"; then
|
||||
AC_DEFINE(HAVE_TRIPLEDRAGON, 1, [building for a tripledragon])
|
||||
elif test "$BOXTYPE" = "dreambox"; then
|
||||
|
@@ -12,6 +12,8 @@
|
||||
* ported 2006 to Dreambox 7025 / 32Bit framebuffer *
|
||||
* by Seddi <seddi@i-have-a-dreambox.com> *
|
||||
* *
|
||||
* *
|
||||
* ported to Tripledragon, SPARK and AZbox 2010-2012 Stefan Seyfried *
|
||||
******************************************************************************/
|
||||
|
||||
#define TUXTXT_CFG_STANDALONE 0 // 1:plugin only 0:use library
|
||||
@@ -33,7 +35,7 @@
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifndef NEW_CST_KERNEL
|
||||
#include <linux/videodev.h>
|
||||
//#include <linux/videodev.h>
|
||||
#endif
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
@@ -91,6 +91,7 @@ neutrino_LDADD = \
|
||||
@LIBCS_LIBS@ \
|
||||
@AVFORMAT_LIBS@ \
|
||||
@AVUTIL_LIBS@ \
|
||||
@AVCODEC_LIBS@ \
|
||||
$(FLACLIBS) \
|
||||
$(VORBISLIBS) \
|
||||
-lungif \
|
||||
|
@@ -59,6 +59,10 @@ if BOXTYPE_SPARK
|
||||
libneutrino_driver_a_SOURCES += \
|
||||
spark_led.cpp
|
||||
endif
|
||||
if BOXTYPE_AZBOX
|
||||
libneutrino_driver_a_SOURCES += \
|
||||
spark_led.cpp
|
||||
endif
|
||||
if USE_STB_HAL
|
||||
INCLUDES += \
|
||||
-I$(STB_HAL_INC) \
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
2003 thegoodguy
|
||||
Copyright (C) 2007-2012 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -487,28 +488,52 @@ int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsign
|
||||
if (!available&&!active)
|
||||
return -1;
|
||||
|
||||
#if 0
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
#ifndef FBIO_BLIT
|
||||
#define FBIO_SET_MANUAL_BLIT _IOW('F', 0x21, __u8)
|
||||
#define FBIO_BLIT 0x22
|
||||
#endif
|
||||
// set manual blit
|
||||
unsigned char tmp = 1;
|
||||
if (ioctl(fd, FBIO_SET_MANUAL_BLIT, &tmp)<0)
|
||||
perror("FBIO_SET_MANUAL_BLIT");
|
||||
|
||||
const unsigned int nxRes = 1280;
|
||||
const unsigned int nyRes = 720;
|
||||
const unsigned int nbpp = 32;
|
||||
screeninfo.xres_virtual=screeninfo.xres=nxRes;
|
||||
screeninfo.yres_virtual=screeninfo.yres=nyRes;
|
||||
screeninfo.yres_virtual = (screeninfo.yres = nyRes) * 2;
|
||||
screeninfo.height=0;
|
||||
screeninfo.width=0;
|
||||
screeninfo.xoffset=screeninfo.yoffset=0;
|
||||
screeninfo.bits_per_pixel=nbpp;
|
||||
|
||||
if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) {
|
||||
perror("FBIOPUT_VSCREENINFO");
|
||||
}
|
||||
screeninfo.transp.offset = 24;
|
||||
screeninfo.transp.length = 8;
|
||||
screeninfo.red.offset = 16;
|
||||
screeninfo.red.length = 8;
|
||||
screeninfo.green.offset = 8;
|
||||
screeninfo.green.length = 8;
|
||||
screeninfo.blue.offset = 0;
|
||||
screeninfo.blue.length = 8;
|
||||
|
||||
if(1) {
|
||||
printf("SetMode: %dbits, red %d:%d green %d:%d blue %d:%d transp %d:%d\n",
|
||||
screeninfo.bits_per_pixel, screeninfo.red.length, screeninfo.red.offset, screeninfo.green.length, screeninfo.green.offset, screeninfo.blue.length, screeninfo.blue.offset, screeninfo.transp.length, screeninfo.transp.offset);
|
||||
if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) {
|
||||
// try single buffering
|
||||
screeninfo.yres_virtual = screeninfo.yres = nyRes;
|
||||
if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo) < 0)
|
||||
perror("FBIOPUT_VSCREENINFO");
|
||||
printf("FB: double buffering not available.\n");
|
||||
}
|
||||
else
|
||||
printf("FB: double buffering available!\n");
|
||||
|
||||
ioctl(fd, FBIOGET_VSCREENINFO, &screeninfo);
|
||||
|
||||
if ((screeninfo.xres!=nxRes) && (screeninfo.yres!=nyRes) && (screeninfo.bits_per_pixel!=nbpp))
|
||||
{
|
||||
printf("SetMode failed: wanted: %dx%dx%d, got %dx%dx%d\n",
|
||||
nxRes, nyRes, nbpp,
|
||||
screeninfo.xres, screeninfo.yres, screeninfo.bits_per_pixel);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -533,9 +558,11 @@ int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsign
|
||||
|
||||
//memset(getFrameBufferPointer(), 0, stride * yRes);
|
||||
paintBackground();
|
||||
#if HAVE_COOL_HARDWARE
|
||||
if (ioctl(fd, FBIOBLANK, FB_BLANK_UNBLANK) < 0) {
|
||||
printf("screen unblanking failed\n");
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1917,6 +1944,25 @@ void CFrameBuffer::displayRGB(unsigned char *rgbbuff, int x_size, int y_size, in
|
||||
cs_free_uncached(fbbuff);
|
||||
}
|
||||
|
||||
#ifdef HAVE_AZBOX_HARDWARE
|
||||
#ifndef FBIO_WAITFORVSYNC
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
|
||||
#endif
|
||||
|
||||
void CFrameBuffer::blit()
|
||||
{
|
||||
// blit
|
||||
if (ioctl(fd, FBIO_BLIT) < 0)
|
||||
perror("FBIO_BLIT");
|
||||
#if 0
|
||||
// sync bliter
|
||||
int c = 0;
|
||||
if( ioctl(fd, FBIO_WAITFORVSYNC, &c) < 0 )
|
||||
perror("FBIO_WAITFORVSYNC");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void CFrameBuffer::paintMuteIcon(bool paint, int ax, int ay, int dx, int dy, bool paintFrame)
|
||||
{
|
||||
if(paint) {
|
||||
|
@@ -4,6 +4,8 @@
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2007-2012 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -235,6 +237,9 @@ class CFrameBuffer
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
void mark(int x, int y, int dx, int dy);
|
||||
void blit(void);
|
||||
#elif HAVE_AZBOX_HARDWARE
|
||||
void mark(int, int, int, int) {};
|
||||
void blit(void);
|
||||
#else
|
||||
void mark(int, int, int, int) {};
|
||||
void blit(void) {};
|
||||
|
@@ -6,7 +6,7 @@
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
|
||||
Copyright (C) 2008-2012 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -79,7 +79,7 @@ typedef enum
|
||||
#include <configfile.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef HAVE_SPARK_HARDWARE
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
#include <lcddisplay/fontrenderer.h>
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class CLCD
|
||||
|
||||
|
||||
private:
|
||||
#ifndef HAVE_SPARK_HARDWARE
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
class FontsDef
|
||||
{
|
||||
public:
|
||||
|
@@ -47,7 +47,7 @@
|
||||
#include "driver/vfd.h"
|
||||
#include "driver/rfmod.h"
|
||||
#endif
|
||||
#if HAVE_TRIPLEDRAGON || HAVE_SPARK_HARDWARE
|
||||
#if HAVE_TRIPLEDRAGON || HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||
#include "driver/lcdd.h"
|
||||
#define CVFD CLCD
|
||||
#endif
|
||||
|
@@ -10,6 +10,8 @@
|
||||
Copyright (C) 2009 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
Copyright (C) 2010-2012 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -177,7 +179,7 @@ CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_O
|
||||
};
|
||||
#endif
|
||||
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE
|
||||
CMenuOptionChooser::keyval_ext VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE_OPTION_COUNT] =
|
||||
{
|
||||
{ VIDEO_STD_PAL, NONEXISTANT_LOCALE, "PAL" },
|
||||
|
@@ -4,6 +4,8 @@
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2007-2012 Stefan Seyfried
|
||||
|
||||
Kommentar:
|
||||
|
||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
||||
@@ -49,6 +51,9 @@
|
||||
#if HAVE_SPARK_HARDWARE
|
||||
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 9
|
||||
#endif
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
#define VIDEOMENU_VIDEOMODE_OPTION_COUNT 9
|
||||
#endif
|
||||
|
||||
struct SNeutrinoSettings
|
||||
{
|
||||
@@ -495,7 +500,7 @@ struct SNeutrinoSettings
|
||||
LCD_SHOW_VOLUME ,
|
||||
LCD_AUTODIMM ,
|
||||
LCD_DEEPSTANDBY_BRIGHTNESS,
|
||||
#if HAVE_TRIPLEDRAGON || HAVE_SPARK_HARDWARE
|
||||
#if HAVE_TRIPLEDRAGON || USE_STB_HAL
|
||||
LCD_EPGMODE ,
|
||||
#endif
|
||||
LCD_SETTING_COUNT
|
||||
|
@@ -4,6 +4,7 @@
|
||||
* zapit - d-box2 linux project
|
||||
*
|
||||
* (C) 2001, 2002 by Philipp Leusmann <faralla@berlios.de>
|
||||
* (C) 2007-2012 Stefan Seyfried
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1792,6 +1793,32 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
||||
videoDecoder->SetStreamType((VIDEO_FORMAT)thisChannel->type);
|
||||
// videoDecoder->SetSync(VIDEO_PLAY_MOTION);
|
||||
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
if (have_audio) {
|
||||
audioDemux->pesFilter(thisChannel->getAudioPid());
|
||||
}
|
||||
/* select audio output and start audio */
|
||||
if (have_audio) {
|
||||
SetAudioStreamType(thisChannel->getAudioChannel()->audioChannelType);
|
||||
audioDemux->Start();
|
||||
audioDecoder->Start();
|
||||
}
|
||||
if (have_video) {
|
||||
videoDemux->pesFilter(thisChannel->getVideoPid());
|
||||
}
|
||||
/* start video */
|
||||
if (have_video) {
|
||||
videoDemux->Start();
|
||||
videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid());
|
||||
}
|
||||
if (have_pcr) {
|
||||
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
||||
}
|
||||
if (have_pcr) {
|
||||
printf("[zapit] starting PCR 0x%X\n", thisChannel->getPcrPid());
|
||||
pcrDemux->Start();
|
||||
}
|
||||
#else
|
||||
if (have_pcr) {
|
||||
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
||||
}
|
||||
@@ -1829,6 +1856,7 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
||||
#ifdef USE_VBI
|
||||
if(have_teletext)
|
||||
videoDecoder->StartVBI(thisChannel->getTeletextPid());
|
||||
#endif
|
||||
#endif
|
||||
playing = true;
|
||||
|
||||
@@ -1850,9 +1878,15 @@ bool CZapit::StopPlayBack(bool send_pmt)
|
||||
if (playbackStopForced)
|
||||
return false;
|
||||
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
pcrDemux->Stop();
|
||||
audioDemux->Stop();
|
||||
videoDemux->Stop();
|
||||
#else
|
||||
videoDemux->Stop();
|
||||
audioDemux->Stop();
|
||||
pcrDemux->Stop();
|
||||
#endif
|
||||
audioDecoder->Stop();
|
||||
|
||||
/* hack. if standby, dont blank video -> for paused timeshift */
|
||||
|
Reference in New Issue
Block a user