1f29dbc25Smrg/* Copyright (c) 2005 Advanced Micro Devices, Inc. 2f29dbc25Smrg * 3f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a copy 4f29dbc25Smrg * of this software and associated documentation files (the "Software"), to 5f29dbc25Smrg * deal in the Software without restriction, including without limitation the 6f29dbc25Smrg * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7f29dbc25Smrg * sell copies of the Software, and to permit persons to whom the Software is 8f29dbc25Smrg * furnished to do so, subject to the following conditions: 9f29dbc25Smrg * 10f29dbc25Smrg * The above copyright notice and this permission notice shall be included in 11f29dbc25Smrg * all copies or substantial portions of the Software. 12f29dbc25Smrg * 13f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19f29dbc25Smrg * IN THE SOFTWARE. 20f29dbc25Smrg * 21f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its 22f29dbc25Smrg * contributors may be used to endorse or promote products derived from this 23f29dbc25Smrg * software without specific prior written permission. 24f29dbc25Smrg * */ 25f29dbc25Smrg 26f29dbc25Smrg/* 27f29dbc25Smrg * This file contains routines to control the video decoder. 28f29dbc25Smrg * 29f29dbc25Smrg * gfx_set_decoder_defaults 30f29dbc25Smrg * gfx_set_decoder_analog_input 31f29dbc25Smrg * gfx_set_decoder_brightness 32f29dbc25Smrg * gfx_set_decoder_contrast 33f29dbc25Smrg * gfx_set_decoder_luminance_filter 34f29dbc25Smrg * gfx_set_decoder_hue 35f29dbc25Smrg * gfx_set_decoder_saturation 36f29dbc25Smrg * gfx_set_decoder_input_offset 37f29dbc25Smrg * gfx_set_decoder_input_size 38f29dbc25Smrg * gfx_set_decoder_output_size 39f29dbc25Smrg * gfx_set_decoder_scale 40f29dbc25Smrg * gfx_set_decoder_TV_standard 41f29dbc25Smrg * gfx_set_decoder_vbi_enable 42f29dbc25Smrg * gfx_set_decoder_vbi_format 43f29dbc25Smrg * gfx_set_decoder_vbi_upscale 44f29dbc25Smrg * gfx_decoder_software_reset 45f29dbc25Smrg * gfx_decoder_detect_macrovision 46f29dbc25Smrg * gfx_decoder_detect_video 47f29dbc25Smrg * 48f29dbc25Smrg * And the following routines if GFX_READ_ROUTINES is set: 49f29dbc25Smrg * 50f29dbc25Smrg * gfx_get_decoder_brightness 51f29dbc25Smrg * gfx_get_decoder_contrast 52f29dbc25Smrg * gfx_get_decoder_hue 53f29dbc25Smrg * gfx_get_decoder_saturation 54f29dbc25Smrg * gfx_get_decoder_input_offset 55f29dbc25Smrg * gfx_get_decoder_input_size 56f29dbc25Smrg * gfx_get_decoder_output_size 57f29dbc25Smrg * gfx_get_decoder_vbi_format 58f29dbc25Smrg */ 59f29dbc25Smrg 60f29dbc25Smrg/* INCLUDE SUPPORT FOR PHILIPS SAA7114 DECODER, IF SPECIFIED */ 61f29dbc25Smrg 62f29dbc25Smrg#if GFX_DECODER_SAA7114 63f29dbc25Smrg#include "saa7114.c" 64f29dbc25Smrg#endif 65f29dbc25Smrg 66f29dbc25Smrg/* WRAPPERS IF DYNAMIC SELECTION */ 67f29dbc25Smrg/* Extra layer to call various decoders. Currently only the Pillips */ 68f29dbc25Smrg/* decoder is supported, but still organized to easily expand later. */ 69f29dbc25Smrg 70f29dbc25Smrg#if GFX_DECODER_DYNAMIC 71f29dbc25Smrg 72f29dbc25Smrg/*---------------------------------------------------------------------------- 73f29dbc25Smrg * gfx_set_decoder_defaults 74f29dbc25Smrg *---------------------------------------------------------------------------- 75f29dbc25Smrg */ 76f29dbc25Smrgint 77f29dbc25Smrggfx_set_decoder_defaults(void) 78f29dbc25Smrg{ 79f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 80f29dbc25Smrg 81f29dbc25Smrg#if GFX_DECODER_SAA7114 82f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 83f29dbc25Smrg status = saa7114_set_decoder_defaults(); 84f29dbc25Smrg#endif 85f29dbc25Smrg return (status); 86f29dbc25Smrg} 87f29dbc25Smrg 88f29dbc25Smrg/*---------------------------------------------------------------------------- 89f29dbc25Smrg * gfx_set_decoder_analog_input 90f29dbc25Smrg *---------------------------------------------------------------------------- 91f29dbc25Smrg */ 92f29dbc25Smrgint 93f29dbc25Smrggfx_set_decoder_analog_input(unsigned char input) 94f29dbc25Smrg{ 95f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 96f29dbc25Smrg 97f29dbc25Smrg#if GFX_DECODER_SAA7114 98f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 99f29dbc25Smrg status = saa7114_set_decoder_analog_input(input); 100f29dbc25Smrg#endif 101f29dbc25Smrg return (status); 102f29dbc25Smrg} 103f29dbc25Smrg 104f29dbc25Smrg/*---------------------------------------------------------------------------- 105f29dbc25Smrg * gfx_set_decoder_brightness 106f29dbc25Smrg *---------------------------------------------------------------------------- 107f29dbc25Smrg */ 108f29dbc25Smrgint 109f29dbc25Smrggfx_set_decoder_brightness(unsigned char brightness) 110f29dbc25Smrg{ 111f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 112f29dbc25Smrg 113f29dbc25Smrg#if GFX_DECODER_SAA7114 114f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 115f29dbc25Smrg status = saa7114_set_decoder_brightness(brightness); 116f29dbc25Smrg#endif 117f29dbc25Smrg return (status); 118f29dbc25Smrg} 119f29dbc25Smrg 120f29dbc25Smrg/*---------------------------------------------------------------------------- 121f29dbc25Smrg * gfx_set_decoder_contrast 122f29dbc25Smrg *---------------------------------------------------------------------------- 123f29dbc25Smrg */ 124f29dbc25Smrgint 125f29dbc25Smrggfx_set_decoder_contrast(unsigned char contrast) 126f29dbc25Smrg{ 127f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 128f29dbc25Smrg 129f29dbc25Smrg#if GFX_DECODER_SAA7114 130f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 131f29dbc25Smrg status = saa7114_set_decoder_contrast(contrast); 132f29dbc25Smrg#endif 133f29dbc25Smrg return (status); 134f29dbc25Smrg} 135f29dbc25Smrg 136f29dbc25Smrg/*---------------------------------------------------------------------------- 137f29dbc25Smrg * gfx_set_decoder_hue 138f29dbc25Smrg *---------------------------------------------------------------------------- 139f29dbc25Smrg */ 140f29dbc25Smrgint 141f29dbc25Smrggfx_set_decoder_hue(char hue) 142f29dbc25Smrg{ 143f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 144f29dbc25Smrg 145f29dbc25Smrg#if GFX_DECODER_SAA7114 146f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 147f29dbc25Smrg status = saa7114_set_decoder_hue(hue); 148f29dbc25Smrg#endif 149f29dbc25Smrg return (status); 150f29dbc25Smrg} 151f29dbc25Smrg 152f29dbc25Smrg/*---------------------------------------------------------------------------- 153f29dbc25Smrg * gfx_set_decoder_saturation 154f29dbc25Smrg *---------------------------------------------------------------------------- 155f29dbc25Smrg */ 156f29dbc25Smrgint 157f29dbc25Smrggfx_set_decoder_saturation(unsigned char saturation) 158f29dbc25Smrg{ 159f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 160f29dbc25Smrg 161f29dbc25Smrg#if GFX_DECODER_SAA7114 162f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 163f29dbc25Smrg status = saa7114_set_decoder_saturation(saturation); 164f29dbc25Smrg#endif 165f29dbc25Smrg return (status); 166f29dbc25Smrg} 167f29dbc25Smrg 168f29dbc25Smrg/*---------------------------------------------------------------------------- 169f29dbc25Smrg * gfx_set_decoder_input_offset 170f29dbc25Smrg *---------------------------------------------------------------------------- 171f29dbc25Smrg */ 172f29dbc25Smrgint 173f29dbc25Smrggfx_set_decoder_input_offset(unsigned short x, unsigned short y) 174f29dbc25Smrg{ 175f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 176f29dbc25Smrg 177f29dbc25Smrg#if GFX_DECODER_SAA7114 178f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 179f29dbc25Smrg status = saa7114_set_decoder_input_offset(x, y); 180f29dbc25Smrg#endif 181f29dbc25Smrg return (status); 182f29dbc25Smrg} 183f29dbc25Smrg 184f29dbc25Smrg/*---------------------------------------------------------------------------- 185f29dbc25Smrg * gfx_set_decoder_input_size 186f29dbc25Smrg *---------------------------------------------------------------------------- 187f29dbc25Smrg */ 188f29dbc25Smrgint 189f29dbc25Smrggfx_set_decoder_input_size(unsigned short width, unsigned short height) 190f29dbc25Smrg{ 191f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 192f29dbc25Smrg 193f29dbc25Smrg#if GFX_DECODER_SAA7114 194f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 195f29dbc25Smrg status = saa7114_set_decoder_input_size(width, height); 196f29dbc25Smrg#endif 197f29dbc25Smrg return (status); 198f29dbc25Smrg} 199f29dbc25Smrg 200f29dbc25Smrg/*---------------------------------------------------------------------------- 201f29dbc25Smrg * gfx_set_decoder_output_size 202f29dbc25Smrg *---------------------------------------------------------------------------- 203f29dbc25Smrg */ 204f29dbc25Smrgint 205f29dbc25Smrggfx_set_decoder_output_size(unsigned short width, unsigned short height) 206f29dbc25Smrg{ 207f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 208f29dbc25Smrg 209f29dbc25Smrg#if GFX_DECODER_SAA7114 210f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 211f29dbc25Smrg status = saa7114_set_decoder_output_size(width, height); 212f29dbc25Smrg#endif 213f29dbc25Smrg return (status); 214f29dbc25Smrg} 215f29dbc25Smrg 216f29dbc25Smrg/*---------------------------------------------------------------------------- 217f29dbc25Smrg * gfx_set_decoder_scale 218f29dbc25Smrg *---------------------------------------------------------------------------- 219f29dbc25Smrg */ 220f29dbc25Smrgint 221f29dbc25Smrggfx_set_decoder_scale(unsigned short srcw, unsigned short srch, 22204007ebaSmrg unsigned short dstw, unsigned short dsth) 223f29dbc25Smrg{ 224f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 225f29dbc25Smrg 226f29dbc25Smrg#if GFX_DECODER_SAA7114 227f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 228f29dbc25Smrg status = saa7114_set_decoder_scale(srcw, srch, dstw, dsth); 229f29dbc25Smrg#endif 230f29dbc25Smrg return (status); 231f29dbc25Smrg} 232f29dbc25Smrg 233f29dbc25Smrg/*---------------------------------------------------------------------------- 234f29dbc25Smrg * gfx_set_decoder_vbi_format 235f29dbc25Smrg *---------------------------------------------------------------------------- 236f29dbc25Smrg */ 237f29dbc25Smrgint 238f29dbc25Smrggfx_set_decoder_vbi_format(int start, int end, int format) 239f29dbc25Smrg{ 240f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 241f29dbc25Smrg 242f29dbc25Smrg#if GFX_DECODER_SAA7114 243f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 244f29dbc25Smrg status = saa7114_set_decoder_vbi_format(start, end, format); 245f29dbc25Smrg#endif 246f29dbc25Smrg return (status); 247f29dbc25Smrg} 248f29dbc25Smrg 249f29dbc25Smrg/*---------------------------------------------------------------------------- 250f29dbc25Smrg * gfx_set_decoder_vbi_enable 251f29dbc25Smrg *---------------------------------------------------------------------------- 252f29dbc25Smrg */ 253f29dbc25Smrgint 254f29dbc25Smrggfx_set_decoder_vbi_enable(int enable) 255f29dbc25Smrg{ 256f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 257f29dbc25Smrg 258f29dbc25Smrg#if GFX_DECODER_SAA7114 259f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 260f29dbc25Smrg status = saa7114_set_decoder_vbi_enable(enable); 261f29dbc25Smrg#endif 262f29dbc25Smrg return (status); 263f29dbc25Smrg} 264f29dbc25Smrg 265f29dbc25Smrg/*---------------------------------------------------------------------------- 266f29dbc25Smrg * gfx_set_decoder_vbi_upscale 267f29dbc25Smrg *---------------------------------------------------------------------------- 268f29dbc25Smrg */ 269f29dbc25Smrgint 270f29dbc25Smrggfx_set_decoder_vbi_upscale(void) 271f29dbc25Smrg{ 272f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 273f29dbc25Smrg 274f29dbc25Smrg#if GFX_DECODER_SAA7114 275f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 276f29dbc25Smrg status = saa7114_set_decoder_vbi_upscale(); 277f29dbc25Smrg#endif 278f29dbc25Smrg return (status); 279f29dbc25Smrg} 280f29dbc25Smrg 281f29dbc25Smrg/*---------------------------------------------------------------------------- 282f29dbc25Smrg * gfx_set_decoder_TV_standard 283f29dbc25Smrg *---------------------------------------------------------------------------- 284f29dbc25Smrg */ 285f29dbc25Smrgint 286f29dbc25Smrggfx_set_decoder_TV_standard(TVStandardType TVStandard) 287f29dbc25Smrg{ 288f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 289f29dbc25Smrg 290f29dbc25Smrg#if GFX_DECODER_SAA7114 291f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 292f29dbc25Smrg status = saa7114_set_decoder_TV_standard(TVStandard); 293f29dbc25Smrg#endif 294f29dbc25Smrg return (status); 295f29dbc25Smrg} 296f29dbc25Smrg 297f29dbc25Smrg/*---------------------------------------------------------------------------- 298f29dbc25Smrg * gfx_set_decoder_luminance_filter 299f29dbc25Smrg *---------------------------------------------------------------------------- 300f29dbc25Smrg */ 301f29dbc25Smrgint 302f29dbc25Smrggfx_set_decoder_luminance_filter(unsigned char lufi) 303f29dbc25Smrg{ 304f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 305f29dbc25Smrg 306f29dbc25Smrg#if GFX_DECODER_SAA7114 307f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 308f29dbc25Smrg status = saa7114_set_decoder_luminance_filter(lufi); 309f29dbc25Smrg#endif 310f29dbc25Smrg return (status); 311f29dbc25Smrg} 312f29dbc25Smrg 313f29dbc25Smrg/*---------------------------------------------------------------------------- 314f29dbc25Smrg * gfx_decoder_software_reset 315f29dbc25Smrg *---------------------------------------------------------------------------- 316f29dbc25Smrg */ 317f29dbc25Smrgint 318f29dbc25Smrggfx_decoder_software_reset(void) 319f29dbc25Smrg{ 320f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 321f29dbc25Smrg 322f29dbc25Smrg#if GFX_DECODER_SAA7114 323f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 324f29dbc25Smrg status = saa7114_decoder_software_reset(); 325f29dbc25Smrg#endif 326f29dbc25Smrg return (status); 327f29dbc25Smrg} 328f29dbc25Smrg 329f29dbc25Smrg/*---------------------------------------------------------------------------- 330f29dbc25Smrg * gfx_decoder_detect_macrovision 331f29dbc25Smrg *---------------------------------------------------------------------------- 332f29dbc25Smrg */ 333f29dbc25Smrgint 334f29dbc25Smrggfx_decoder_detect_macrovision(void) 335f29dbc25Smrg{ 336f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 337f29dbc25Smrg 338f29dbc25Smrg#if GFX_DECODER_SAA7114 339f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 340f29dbc25Smrg status = saa7114_decoder_detect_macrovision(); 341f29dbc25Smrg#endif 342f29dbc25Smrg return (status); 343f29dbc25Smrg} 344f29dbc25Smrg 345f29dbc25Smrg/*---------------------------------------------------------------------------- 346f29dbc25Smrg * gfx_decoder_detect_video 347f29dbc25Smrg *---------------------------------------------------------------------------- 348f29dbc25Smrg */ 349f29dbc25Smrgint 350f29dbc25Smrggfx_decoder_detect_video(void) 351f29dbc25Smrg{ 352f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 353f29dbc25Smrg 354f29dbc25Smrg#if GFX_DECODER_SAA7114 355f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 356f29dbc25Smrg status = saa7114_decoder_detect_video(); 357f29dbc25Smrg#endif 358f29dbc25Smrg return (status); 359f29dbc25Smrg} 360f29dbc25Smrg 361f29dbc25Smrg/*************************************************************/ 362f29dbc25Smrg/* READ ROUTINES | INCLUDED FOR DIAGNOSTIC PURPOSES ONLY */ 363f29dbc25Smrg/*************************************************************/ 364f29dbc25Smrg 365f29dbc25Smrg#if GFX_READ_ROUTINES 366f29dbc25Smrg 367f29dbc25Smrg/*---------------------------------------------------------------------------- 368f29dbc25Smrg * gfx_get_decoder_brightness 369f29dbc25Smrg *---------------------------------------------------------------------------- 370f29dbc25Smrg */ 371f29dbc25Smrgunsigned char 372f29dbc25Smrggfx_get_decoder_brightness(void) 373f29dbc25Smrg{ 374f29dbc25Smrg unsigned char brightness = 0; 375f29dbc25Smrg 376f29dbc25Smrg#if GFX_DECODER_SAA7114 377f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 378f29dbc25Smrg brightness = saa7114_get_decoder_brightness(); 379f29dbc25Smrg#endif 380f29dbc25Smrg return (brightness); 381f29dbc25Smrg} 382f29dbc25Smrg 383f29dbc25Smrg/*---------------------------------------------------------------------------- 384f29dbc25Smrg * gfx_get_decoder_contrast 385f29dbc25Smrg *---------------------------------------------------------------------------- 386f29dbc25Smrg */ 387f29dbc25Smrgunsigned char 388f29dbc25Smrggfx_get_decoder_contrast(void) 389f29dbc25Smrg{ 390f29dbc25Smrg unsigned char contrast = 0; 391f29dbc25Smrg 392f29dbc25Smrg#if GFX_DECODER_SAA7114 393f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 394f29dbc25Smrg contrast = saa7114_get_decoder_contrast(); 395f29dbc25Smrg#endif 396f29dbc25Smrg return (contrast); 397f29dbc25Smrg} 398f29dbc25Smrg 399f29dbc25Smrg/*---------------------------------------------------------------------------- 400f29dbc25Smrg * gfx_get_decoder_hue 401f29dbc25Smrg *---------------------------------------------------------------------------- 402f29dbc25Smrg */ 403f29dbc25Smrgchar 404f29dbc25Smrggfx_get_decoder_hue(void) 405f29dbc25Smrg{ 406f29dbc25Smrg unsigned char hue = 0; 407f29dbc25Smrg 408f29dbc25Smrg#if GFX_DECODER_SAA7114 409f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 410f29dbc25Smrg hue = saa7114_get_decoder_hue(); 411f29dbc25Smrg#endif 41204007ebaSmrg return ((char) hue); 413f29dbc25Smrg} 414f29dbc25Smrg 415f29dbc25Smrg/*---------------------------------------------------------------------------- 416f29dbc25Smrg * gfx_get_decoder_saturation 417f29dbc25Smrg *---------------------------------------------------------------------------- 418f29dbc25Smrg */ 419f29dbc25Smrgunsigned char 420f29dbc25Smrggfx_get_decoder_saturation(void) 421f29dbc25Smrg{ 422f29dbc25Smrg unsigned char saturation = 0; 423f29dbc25Smrg 424f29dbc25Smrg#if GFX_DECODER_SAA7114 425f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 426f29dbc25Smrg saturation = saa7114_get_decoder_saturation(); 427f29dbc25Smrg#endif 428f29dbc25Smrg return (saturation); 429f29dbc25Smrg} 430f29dbc25Smrg 431f29dbc25Smrg/*---------------------------------------------------------------------------- 432f29dbc25Smrg * gfx_get_decoder_input_offset 433f29dbc25Smrg *---------------------------------------------------------------------------- 434f29dbc25Smrg */ 435f29dbc25Smrgunsigned long 436f29dbc25Smrggfx_get_decoder_input_offset() 437f29dbc25Smrg{ 438f29dbc25Smrg unsigned long offset = 0; 439f29dbc25Smrg 440f29dbc25Smrg#if GFX_DECODER_SAA7114 441f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 442f29dbc25Smrg offset = saa7114_get_decoder_input_offset(); 443f29dbc25Smrg#endif 444f29dbc25Smrg return (offset); 445f29dbc25Smrg} 446f29dbc25Smrg 447f29dbc25Smrg/*---------------------------------------------------------------------------- 448f29dbc25Smrg * gfx_get_decoder_input_size 449f29dbc25Smrg *---------------------------------------------------------------------------- 450f29dbc25Smrg */ 451f29dbc25Smrgunsigned long 452f29dbc25Smrggfx_get_decoder_input_size() 453f29dbc25Smrg{ 454f29dbc25Smrg unsigned long size = 0; 455f29dbc25Smrg 456f29dbc25Smrg#if GFX_DECODER_SAA7114 457f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 458f29dbc25Smrg size = saa7114_get_decoder_input_size(); 459f29dbc25Smrg#endif 460f29dbc25Smrg return (size); 461f29dbc25Smrg} 462f29dbc25Smrg 463f29dbc25Smrg/*---------------------------------------------------------------------------- 464f29dbc25Smrg * gfx_get_decoder_output_size 465f29dbc25Smrg *---------------------------------------------------------------------------- 466f29dbc25Smrg */ 467f29dbc25Smrgunsigned long 468f29dbc25Smrggfx_get_decoder_output_size() 469f29dbc25Smrg{ 470f29dbc25Smrg unsigned long size = 0; 471f29dbc25Smrg 472f29dbc25Smrg#if GFX_DECODER_SAA7114 473f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 474f29dbc25Smrg size = saa7114_get_decoder_output_size(); 475f29dbc25Smrg#endif 476f29dbc25Smrg return (size); 477f29dbc25Smrg} 478f29dbc25Smrg 479f29dbc25Smrg/*---------------------------------------------------------------------------- 480f29dbc25Smrg * gfx_get_decoder_vbi_format 481f29dbc25Smrg *---------------------------------------------------------------------------- 482f29dbc25Smrg */ 483f29dbc25Smrgint 484f29dbc25Smrggfx_get_decoder_vbi_format(int line) 485f29dbc25Smrg{ 486f29dbc25Smrg int format = 0; 487f29dbc25Smrg 488f29dbc25Smrg#if GFX_DECODER_SAA7114 489f29dbc25Smrg if (gfx_decoder_type == GFX_DECODER_SAA7114) 490f29dbc25Smrg format = saa7114_get_decoder_vbi_format(line); 491f29dbc25Smrg#endif 492f29dbc25Smrg return (format); 493f29dbc25Smrg} 494f29dbc25Smrg 49504007ebaSmrg#endif /* GFX_READ_ROUTINES */ 496f29dbc25Smrg 49704007ebaSmrg#endif /* GFX_DECODER_DYNAMIC */ 498f29dbc25Smrg 499f29dbc25Smrg/* END OF FILE */ 500