diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-22 14:49:07 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-22 14:49:07 -0200 |
commit | 1d183a32a6fbcd8812f35d0eeca02347de4223bf (patch) | |
tree | d43f41b289dbe05b2166e79492dab9b1d9047452 | |
parent | 786d73eb9aad6efa7ddd89150d18a689d08f4e07 (diff) | |
download | mediapointer-dvb-s2-1d183a32a6fbcd8812f35d0eeca02347de4223bf.tar.gz mediapointer-dvb-s2-1d183a32a6fbcd8812f35d0eeca02347de4223bf.tar.bz2 |
em28xx: update regiters on v4l2-dbg debug util
From: Mauro Carvalho Chehab <mchehab@redhat.com>
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 <mchehab@redhat.com>
-rw-r--r-- | v4l2-apps/util/v4l2-dbg-em28xx.h | 15 | ||||
-rw-r--r-- | v4l2-apps/util/v4l2-dbg.cpp | 6 |
2 files changed, 16 insertions, 5 deletions
diff --git a/v4l2-apps/util/v4l2-dbg-em28xx.h b/v4l2-apps/util/v4l2-dbg-em28xx.h index 3a0413b70..ae83a3181 100644 --- a/v4l2-apps/util/v4l2-dbg-em28xx.h +++ b/v4l2-apps/util/v4l2-dbg-em28xx.h @@ -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 --git a/v4l2-apps/util/v4l2-dbg.cpp b/v4l2-apps/util/v4l2-dbg.cpp index dfeae8cea..e05be1f03 100644 --- a/v4l2-apps/util/v4l2-dbg.cpp +++ b/v4l2-apps/util/v4l2-dbg.cpp @@ -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) { |