include/media/drv-intf/msp3400.h

Source file repositories/reference/linux-study-clean/include/media/drv-intf/msp3400.h

File Facts

System
Linux kernel
Corpus path
include/media/drv-intf/msp3400.h
Extension
.h
Size
7781 bytes
Lines
214
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

msp3400.h - definition for msp3400 inputs and outputs

    Copyright (C) 2006 Hans Verkuil (hverkuil@kernel.org)

*/

#ifndef _MSP3400_H_
#define _MSP3400_H_

/* msp3400 routing
   ===============

   The msp3400 has a complicated routing scheme with many possible
   combinations. The details are all in the datasheets but I will try
   to give a short description here.

   Inputs
   ======

   There are 1) tuner inputs, 2) I2S inputs, 3) SCART inputs. You will have
   to select which tuner input to use and which SCART input to use. The
   selected tuner input, the selected SCART input and all I2S inputs go to
   the DSP (the tuner input first goes through the demodulator).

   The DSP handles things like volume, bass/treble, balance, and some chips
   have support for surround sound. It has several outputs: MAIN, AUX, I2S
   and SCART1/2. Each output can select which DSP input to use. So the MAIN
   output can select the tuner input while at the same time the SCART1 output
   uses the I2S input.

   Outputs
   =======

   Most DSP outputs are also the outputs of the msp3400. However, the SCART
   outputs of the msp3400 can select which input to use: either the SCART1 or
   SCART2 output from the DSP, or the msp3400 SCART inputs, thus completely
   bypassing the DSP.

   Summary
   =======

   So to specify a complete routing scheme for the msp3400 you will have to
   specify in the 'input' arg of the s_routing function:

   1) which tuner input to use
   2) which SCART input to use
   3) which DSP input to use for each DSP output

   And in the 'output' arg of the s_routing function you specify:

   1) which SCART input to use for each SCART output

   Depending on how the msp is wired to the other components you can
   ignore or mute certain inputs or outputs.

   Also, depending on the msp version only a subset of the inputs or
   outputs may be present. At the end of this header some tables are
   added containing a list of what is available for each msp version.
 */

/* Inputs to the DSP unit: two independent selections have to be made:
   1) the tuner (SIF) input
   2) the SCART input
   Bits 0-2 are used for the SCART input select, bit 3 is used for the tuner
   input, bits 4-7 are reserved.
 */

/* SCART input to DSP selection */
#define MSP_IN_SCART1		0  /* Pin SC1_IN */
#define MSP_IN_SCART2		1  /* Pin SC2_IN */
#define MSP_IN_SCART3		2  /* Pin SC3_IN */
#define MSP_IN_SCART4		3  /* Pin SC4_IN */
#define MSP_IN_MONO		6  /* Pin MONO_IN */
#define MSP_IN_MUTE		7  /* Mute DSP input */
#define MSP_SCART_TO_DSP(in)	(in)
/* Tuner input to demodulator and DSP selection */
#define MSP_IN_TUNER1		0  /* Analog Sound IF input pin ANA_IN1 */
#define MSP_IN_TUNER2		1  /* Analog Sound IF input pin ANA_IN2 */
#define MSP_TUNER_TO_DSP(in)	((in) << 3)

/* The msp has up to 5 DSP outputs, each output can independently select
   a DSP input.

   The DSP outputs are: loudspeaker output (aka MAIN), headphones output
   (aka AUX), SCART1 DA output, SCART2 DA output and an I2S output.
   There also is a quasi-peak detector output, but that is not used by
   this driver and is set to the same input as the loudspeaker output.
   Not all outputs are supported by all msp models. Setting the input
   of an unsupported output will be ignored by the driver.

Annotation

Implementation Notes