The patch number 9954 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [email protected]

------

From: Mauro Carvalho Chehab  <[email protected]>
em28xx: update regiters on v4l2-dbg debug util


Some ac97 registers where presented as if they are em28xx ones. Also,
add mising em2874 registers.

The code were generated by the following command:

$ more em28xx-reg.h |perl -ne 'if 
(m/(EM2[A-Z0-9]..)_R.._([^\s]+)\s+(0x[0-9A-Fa-f].)/) { printf "\t{$3, $1_PREFIX 
\"$2\", 1},\n"; }' |grep -v EM2800_PREFIX|sort >/tmp/registers

Signed-off-by: Mauro Carvalho Chehab <[email protected]>


---

 v4l2-apps/util/v4l2-dbg-em28xx.h |   15 ++++++++++-----
 v4l2-apps/util/v4l2-dbg.cpp      |    6 ++++++
 2 files changed, 16 insertions(+), 5 deletions(-)

diff -r d6eb998a84bb -r be3eef47aced v4l2-apps/util/v4l2-dbg-em28xx.h
--- a/v4l2-apps/util/v4l2-dbg-em28xx.h  Mon Dec 22 14:18:27 2008 -0200
+++ b/v4l2-apps/util/v4l2-dbg-em28xx.h  Mon Dec 22 14:49:07 2008 -0200
@@ -20,10 +20,13 @@
 
 /* Register name prefix */
 #define EM2800_PREFIX "EM2800_"
+#define EM2874_PREFIX "EM2874_"
 #define EM2880_PREFIX "EM2880_"
 #define EM28XX_PREFIX "EM28XX_"
 
 static struct board_regs em28xx_regs[] = {
+       {0x00, EM28XX_PREFIX "CHIPCFG", 1},
+       {0x04, EM2880_PREFIX "GPO", 1},
        {0x08, EM28XX_PREFIX "GPIO", 1},
 
        {0x06, EM28XX_PREFIX "I2C_CLK", 1},
@@ -76,12 +79,14 @@ static struct board_regs em28xx_regs[] =
        {0x42, EM28XX_PREFIX "AC97ADDR", 1},
        {0x43, EM28XX_PREFIX "AC97BUSY", 1},
 
-       {0x02, EM28XX_PREFIX "MASTER_AC97", 1},
-       {0x10, EM28XX_PREFIX "LINE_IN_AC97", 1},
-       {0x14, EM28XX_PREFIX "VIDEO_AC97", 1},
+       {0x45, EM28XX_PREFIX "IR", 1},
+
+       {0x50, EM2874_PREFIX "IR_CONFIG", 1},
+       {0x51, EM2874_PREFIX "IR", 1},
+       {0x5f, EM2874_PREFIX "TS_ENABLE", 1},
+       {0x80, EM2874_PREFIX "GPIO", 1},
 };
 
 static struct board_regs em28xx_alt_regs[] = {
        {0x08, EM2800_PREFIX "AUDIOSRC", 1},
-       {0x04, EM2880_PREFIX "GPO", 1},
-};
\ No newline at end of file
+};
diff -r d6eb998a84bb -r be3eef47aced v4l2-apps/util/v4l2-dbg.cpp
--- a/v4l2-apps/util/v4l2-dbg.cpp       Mon Dec 22 14:18:27 2008 -0200
+++ b/v4l2-apps/util/v4l2-dbg.cpp       Mon Dec 22 14:49:07 2008 -0200
@@ -158,6 +158,7 @@ static void usage(void)
               "                     It can be one of:\n"
               "                         I2C driver ID (see --list-driverids)\n"
               "                         I2C 7-bit address\n"
+              "                         AC97: for ac97 anciliary mixer\n"
               "                         host<num>: host chip number <num>\n"
               "                         host (default): same as host0\n"
               "  -l, --list-registers[=min=<addr>[,max=<addr>]]\n"
@@ -448,6 +449,11 @@ int main(int argc, char **argv)
                                match_chip = strtoul(optarg + 4, NULL, 0);
                                break;
                        }
+                       if (!strcasecmp(optarg, "ac97")) {
+                               match_type = V4L2_CHIP_MATCH_AC97;
+                               match_chip = strtoul(optarg + 4, NULL, 0);
+                               break;
+                       }
                        match_type = V4L2_CHIP_MATCH_I2C_DRIVER;
                        match_chip = parse_chip(optarg);
                        if (!match_chip) {


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/be3eef47acede0a66d2bdef4a39f8ecb84210476

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to