[media] tm6000: Rename active interface register
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 4 Aug 2011 07:14:07 +0000 (04:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 31 Aug 2011 20:17:14 +0000 (17:17 -0300)
The register ACTIVE_VIDEO_IF register should be named ACTIVE_IF since it
controls more than just the video interface.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-alsa.c
drivers/staging/tm6000/tm6000-core.c
drivers/staging/tm6000/tm6000-regs.h

index 8388243..cbe66ca 100644 (file)
@@ -80,7 +80,7 @@ static int _tm6000_start_audio_dma(struct snd_tm6000_card *chip)
        dprintk(1, "Starting audio DMA\n");
 
        /* Enables audio */
-       tm6000_set_reg_mask(core, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0x40, 0x40);
+       tm6000_set_reg_mask(core, TM6010_REQ07_RCC_ACTIVE_IF, 0x40, 0x40);
 
        tm6000_set_audio_bitrate(core, 48000);
 
@@ -97,7 +97,7 @@ static int _tm6000_stop_audio_dma(struct snd_tm6000_card *chip)
        dprintk(1, "Stopping audio DMA\n");
 
        /* Disables audio */
-       tm6000_set_reg_mask(core, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0x00, 0x40);
+       tm6000_set_reg_mask(core, TM6010_REQ07_RCC_ACTIVE_IF, 0x00, 0x40);
 
        return 0;
 }
index e14bd3d..2cd7bc4 100644 (file)
@@ -187,11 +187,11 @@ void tm6000_set_fourcc_format(struct tm6000_core *dev)
        if (dev->dev_type == TM6010) {
                int val;
 
-               val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0) & 0xfc;
+               val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_IF, 0) & 0xfc;
                if (dev->fourcc == V4L2_PIX_FMT_UYVY)
-                       tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val);
+                       tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_IF, val);
                else
-                       tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val | 1);
+                       tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_IF, val | 1);
        } else {
                if (dev->fourcc == V4L2_PIX_FMT_UYVY)
                        tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0);
@@ -268,7 +268,7 @@ int tm6000_init_analog_mode(struct tm6000_core *dev)
 
        if (dev->dev_type == TM6010) {
                /* Enable video and audio */
-               tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF,
+               tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_IF,
                                                        0x60, 0x60);
                /* Disable TS input */
                tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,
@@ -334,7 +334,7 @@ int tm6000_init_digital_mode(struct tm6000_core *dev)
 {
        if (dev->dev_type == TM6010) {
                /* Disable video and audio */
-               tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF,
+               tm6000_set_reg_mask(dev, TM6010_REQ07_RCC_ACTIVE_IF,
                                0x00, 0x60);
                /* Enable TS input */
                tm6000_set_reg_mask(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,
@@ -462,7 +462,7 @@ static struct reg_init tm6010_init_tab[] = {
        { TM6010_REQ07_RC4_HSTART0, 0xa0 },
        { TM6010_REQ07_RC6_HEND0, 0x40 },
        { TM6010_REQ07_RCA_VEND0, 0x31 },
-       { TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0xe1 },
+       { TM6010_REQ07_RCC_ACTIVE_IF, 0xe1 },
        { TM6010_REQ07_RE0_DVIDEO_SOURCE, 0x03 },
        { TM6010_REQ07_RFE_POWER_DOWN, 0x7f },
 
index 5375a83..6e4ef95 100644 (file)
@@ -270,7 +270,9 @@ enum {
 #define TM6010_REQ07_RCA_VEND0                         0x07, 0xca
 #define TM6010_REQ07_RCB_DELAY                         0x07, 0xcb
 /* ONLY for TM6010 */
-#define TM6010_REQ07_RCC_ACTIVE_VIDEO_IF               0x07, 0xcc
+#define TM6010_REQ07_RCC_ACTIVE_IF                     0x07, 0xcc
+#define TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE (1 << 5)
+#define TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE (1 << 6)
 #define TM6010_REQ07_RD0_USB_PERIPHERY_CONTROL         0x07, 0xd0
 #define TM6010_REQ07_RD1_ADDR_FOR_REQ1                 0x07, 0xd1
 #define TM6010_REQ07_RD2_ADDR_FOR_REQ2                 0x07, 0xd2