summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110_hw.c
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2004-07-27 12:36:01 +0000
committerOliver Endriss <devnull@localhost>2004-07-27 12:36:01 +0000
commitb539cb9174fdb32e76306b242af7dc20416b7e9d (patch)
tree970da63897d73f4a76b3fc9f2da167ec68aec669 /linux/drivers/media/dvb/ttpci/av7110_hw.c
parent2a3e3f58e72cc7698a97a1a9071cbc93854e19da (diff)
downloadmediapointer-dvb-s2-b539cb9174fdb32e76306b242af7dc20416b7e9d.tar.gz
mediapointer-dvb-s2-b539cb9174fdb32e76306b242af7dc20416b7e9d.tar.bz2
dditional OSD window types:
applied patch by Jeremy Jones mr.lebowski (at) gmail.com with some modifications
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index ff7b0b99a..d39ec3608 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -720,7 +720,7 @@ static inline int DestroyOSDWindow(struct av7110 *av7110, u8 windownr)
}
static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr,
- enum av7110_window_display_type disptype,
+ osd_raw_window_t disptype,
u16 width, u16 height)
{
return av7110_fw_cmd(av7110, COMTYPE_OSD, WCreate, 4,
@@ -731,8 +731,8 @@ static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr,
static enum av7110_osd_palette_type bpp2pal[8] = {
Pal1Bit, Pal2Bit, 0, Pal4Bit, 0, 0, 0, Pal8Bit
};
-static enum av7110_window_display_type bpp2bit[8] = {
- BITMAP1, BITMAP2, 0, BITMAP4, 0, 0, 0, BITMAP8
+static osd_raw_window_t bpp2bit[8] = {
+ OSD_BITMAP1, OSD_BITMAP2, 0, OSD_BITMAP4, 0, 0, 0, OSD_BITMAP8
};
static inline int LoadBitmap(struct av7110 *av7110, u16 format,
@@ -761,13 +761,13 @@ static inline int LoadBitmap(struct av7110 *av7110, u16 format,
if (av7110->bmp_state == BMP_LOADING)
return -1;
av7110->bmp_state = BMP_LOADING;
- if (format == BITMAP8) {
+ if (format == OSD_BITMAP8) {
bpp=8; delta = 1;
- } else if (format == BITMAP4) {
+ } else if (format == OSD_BITMAP4) {
bpp=4; delta = 2;
- } else if (format == BITMAP2) {
+ } else if (format == OSD_BITMAP2) {
bpp=2; delta = 4;
- } else if (format == BITMAP1) {
+ } else if (format == OSD_BITMAP1) {
bpp=1; delta = 8;
} else {
av7110->bmp_state = BMP_NONE;
@@ -785,7 +785,7 @@ static inline int LoadBitmap(struct av7110 *av7110, u16 format,
return -1;
}
}
- if (format != BITMAP8) {
+ if (format != OSD_BITMAP8) {
for (i = 0; i < dx * dy / delta; i++) {
c = ((u8 *)av7110->bmpbuf)[1024 + i * delta + delta - 1];
for (d = delta - 2; d >= 0; d--) {
@@ -1030,6 +1030,23 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0);
SetColorBlend(av7110, av7110->osdwin);
return 0;
+ case OSD_OpenRaw:
+ if (dc->color < OSD_BITMAP1 || dc->color > OSD_CURSOR) {
+ return -EINVAL;
+ }
+ if (dc->color >= OSD_BITMAP1 && dc->color <= OSD_BITMAP8HR) {
+ av7110->osdbpp[av7110->osdwin] = (1 << (dc->color & 3)) - 1;
+ }
+ else {
+ av7110->osdbpp[av7110->osdwin] = 0;
+ }
+ CreateOSDWindow(av7110, av7110->osdwin, (osd_raw_window_t)dc->color,
+ dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1);
+ if (!dc->data) {
+ MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0);
+ SetColorBlend(av7110, av7110->osdwin);
+ }
+ return 0;
default:
return -EINVAL;
}