[pvrusb2] Terratec Grabster AV400
Sven Barth
svenmauren at vr-web.de
Fri May 15 13:48:32 CDT 2009
Hello again!
I managed to wrap the cs5345 (at least I hope that I did so... I just
copied the cs53l32a and replaced everything...) and included it
everywhere the cs53l32a is included. I also added the cs5435 to the
av400 in devattr.c. The driver still compiles and works as before, but
that's it...
I need some help from you:
- Where or how can I check the i2c address of the cs5345 (I copied \x11
from cs53l32a for now)?
dmesg prints this:
cs5345 2-0011: chip found @ 0x22 (pvrusb2_a)
pvrusb2: Attached sub-driver cs5345
- How do I disable the audio routing of the cx2584x? Or is that what I
hear the cs5345 initialized with default values? If so, how can I check
if I can control the chip now? Changing the audio bitrate?
Btw: what does this message in dmesg mean: cx25840 2-0044: 0x0000 is not
a valid video input!
It occurs after loading the firmware.
Greetings,
Sven
PS: I attached my changes.
-------------- next part --------------
diff -aur pvrusb2-mci-20090509-orig/driver/Kbuild pvrusb2-mci-20090509/driver/Kbuild
--- pvrusb2-mci-20090509-orig/driver/Kbuild 2009-03-09 07:07:51.000000000 +0100
+++ pvrusb2-mci-20090509/driver/Kbuild 2009-05-15 20:55:49.000000000 +0200
@@ -27,6 +27,7 @@
pvrusb2-io.o \
pvrusb2-ioread.o \
pvrusb2-cs53l32a.o \
+ pvrusb2-cs5345.o \
pvrusb2-cx2584x-old.o \
pvrusb2-cx2584x-v4l.o \
pvrusb2-wm8775.o \
Nur in pvrusb2-mci-20090509/driver/: modules.order.
Nur in pvrusb2-mci-20090509/driver/: pvrusb2-cs5345.c.
Nur in pvrusb2-mci-20090509/driver/: pvrusb2-cs5345.h.
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-cx2584x-v4l.c pvrusb2-mci-20090509/driver/pvrusb2-cx2584x-v4l.c
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-cx2584x-v4l.c 2009-05-09 22:57:51.000000000 +0200
+++ pvrusb2-mci-20090509/driver/pvrusb2-cx2584x-v4l.c 2009-05-15 22:32:56.000000000 +0200
@@ -106,11 +106,11 @@
static const struct routing_scheme_item routing_schemeav400[] = {
[PVR2_CVAL_INPUT_COMPOSITE] = {
.vid = CX25840_COMPOSITE1,
- .aud = CX25840_AUDIO_SERIAL,
+ .aud = -1, //CX25840_AUDIO_SERIAL,
},
[PVR2_CVAL_INPUT_SVIDEO] = {
.vid = (CX25840_SVIDEO_LUMA3|CX25840_SVIDEO_CHROMA4),
- .aud = CX25840_AUDIO_SERIAL,
+ .aud = -1, //CX25840_AUDIO_SERIAL,
},
};
#endif
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-devattr.c pvrusb2-mci-20090509/driver/pvrusb2-devattr.c
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-devattr.c 2009-05-09 23:01:29.000000000 +0200
+++ pvrusb2-mci-20090509/driver/pvrusb2-devattr.c 2009-05-15 20:52:19.000000000 +0200
@@ -166,6 +166,7 @@
static const struct pvr2_device_client_desc pvr2_cli_av400[] = {
{ .module_id = PVR2_CLIENT_ID_CX25840 },
+ { .module_id = PVR2_CLIENT_ID_CS5345 },
};
static const struct pvr2_device_desc pvr2_device_av400 = {
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-devattr.h pvrusb2-mci-20090509/driver/pvrusb2-devattr.h
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-devattr.h 2009-05-09 22:46:01.000000000 +0200
+++ pvrusb2-mci-20090509/driver/pvrusb2-devattr.h 2009-05-15 20:35:10.000000000 +0200
@@ -43,6 +43,7 @@
#define PVR2_CLIENT_ID_CS53L32A 5
#define PVR2_CLIENT_ID_WM8775 6
#define PVR2_CLIENT_ID_DEMOD 7
+#define PVR2_CLIENT_ID_CS5345 8
struct pvr2_device_client_desc {
/* One ovr PVR2_CLIENT_ID_xxxx */
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-hdw.c pvrusb2-mci-20090509/driver/pvrusb2-hdw.c
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-hdw.c 2009-05-02 05:14:42.000000000 +0200
+++ pvrusb2-mci-20090509/driver/pvrusb2-hdw.c 2009-05-15 20:47:33.000000000 +0200
@@ -50,6 +50,9 @@
#ifdef PVR2_ENABLE_CS53L32A
#include "pvrusb2-cs53l32a.h"
#endif
+#ifdef PVR2_ENABLE_CS5345
+#include "pvrusb2-cs5345.h"
+#endif
#include "pvrusb2-audio.h"
#endif
#include "compat.h"
@@ -152,6 +155,9 @@
#ifdef PVR2_ENABLE_CS53L32A
[PVR2_CLIENT_ID_CS53L32A] = pvr2_cs53l32a_subdev_update,
#endif
+#ifdef PVR2_ENABLE_CS5345
+ [PVR2_CLIENT_ID_CS5345] = pvr2_cs5345_subdev_update,
+#endif
};
#endif
@@ -163,6 +169,7 @@
[PVR2_CLIENT_ID_DEMOD] = "tuner",
[PVR2_CLIENT_ID_CS53L32A] = "cs53l32a",
[PVR2_CLIENT_ID_WM8775] = "wm8775",
+ [PVR2_CLIENT_ID_CS5345] = "cs5345",
};
#ifdef PVR2_ENABLE_V4L2SUBDEV
@@ -175,6 +182,7 @@
[PVR2_CLIENT_ID_WM8775] = "\x1b",
[PVR2_CLIENT_ID_CX25840] = "\x44",
[PVR2_CLIENT_ID_CS53L32A] = "\x11",
+ [PVR2_CLIENT_ID_CS5345] = "\x11",
};
#endif
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-i2c-chips-all.c pvrusb2-mci-20090509/driver/pvrusb2-i2c-chips-all.c
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-i2c-chips-all.c 2009-03-15 21:49:05.000000000 +0100
+++ pvrusb2-mci-20090509/driver/pvrusb2-i2c-chips-all.c 2009-05-15 20:49:15.000000000 +0200
@@ -40,6 +40,9 @@
#ifdef PVR2_ENABLE_CS53L32A
#include "pvrusb2-cs53l32a.h"
#endif
+#ifdef PVR2_ENABLE_CS5345
+#include "pvrusb2-cs5345.h"
+#endif
#ifdef PVR2_ENABLE_OLD_I2COPS
@@ -151,6 +154,15 @@
}
#endif
#endif
+#ifdef PVR2_ENABLE_CS5345
+#ifdef I2C_DRIVERID_CS5345
+ if (id == I2C_DRIVERID_CS5345) {
+ if (pvr2_i2c_cs5345_setup(hdw,cp)) {
+ return;
+ }
+ }
+#endif
+#endif
#ifdef I2C_DRIVERID_SAA711X
if (id == I2C_DRIVERID_SAA711X) {
#ifdef PVR2_ENABLE_SAA711X
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-i2c-chips-v4l2.c pvrusb2-mci-20090509/driver/pvrusb2-i2c-chips-v4l2.c
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-i2c-chips-v4l2.c 2009-03-15 21:49:05.000000000 +0100
+++ pvrusb2-mci-20090509/driver/pvrusb2-i2c-chips-v4l2.c 2009-05-15 20:50:11.000000000 +0200
@@ -36,6 +36,9 @@
#ifdef PVR2_ENABLE_CS53L32A
#include "pvrusb2-cs53l32a.h"
#endif
+#ifdef PVR2_ENABLE_CS5345
+#include "pvrusb2-cs5345.h"
+#endif
#include "compat.h"
#ifdef PVR2_ENABLE_OLD_I2COPS
@@ -113,6 +116,15 @@
}
#endif
#endif
+#ifdef PVR2_ENABLE_CS5345
+#ifdef I2C_DRIVERID_CS5345
+ if (id == I2C_DRIVERID_CS5345) {
+ if (pvr2_i2c_cs5345_setup(hdw,cp)) {
+ return;
+ }
+ }
+#endif
+#endif
#ifdef PVR2_ENABLE_SAA711X
if (id == I2C_DRIVERID_SAA711X) {
if (pvr2_i2c_decoder_v4l_setup(hdw,cp)) {
diff -aur pvrusb2-mci-20090509-orig/driver/pvrusb2-options.h pvrusb2-mci-20090509/driver/pvrusb2-options.h
--- pvrusb2-mci-20090509-orig/driver/pvrusb2-options.h 2009-05-09 22:57:51.000000000 +0200
+++ pvrusb2-mci-20090509/driver/pvrusb2-options.h 2009-05-15 20:58:37.000000000 +0200
@@ -439,6 +439,7 @@
|| defined(PVR2_ENABLE_V4LCVS)
#define PVR2_ENABLE_NEW_ROUTING
#define PVR2_ENABLE_CS53L32A
+#define PVR2_ENABLE_CS5345
#else
#define PVR2_ENABLE_CX25840_FWSEND_HACK
#define ENABLE_PVRUSB2_AUDIO_OLD
More information about the pvrusb2
mailing list