Bad image/sound quality with Medion MD 95700
Hi,
I tried a Medion MD 95700 with kernel 2.6.32 (for tests: 2.6.30.9) and have a very bad image and sound quality.
Right now I'm using 2.6.32 with V4L/DVB from SVN (v4l-dvb-4506e2d54126)
Here is an example: http://img200.imageshack.us/img200/3950/dvbtlinux.png
and another: http://img130.imageshack.us/img130/6278/dvbt2.png
The DVB-T stream seems to be good:
femon
FE: Conexant CX22702 DVB-T (DVBT)
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status SCVYL | signal 6565 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
(it's a bit bad right now, normally the signal is around 50%)
under windows XP the image and sound is perfect.
P.S. this is the output from mplayer after looking DVB-T for a few seconds:
mplayer "dvb://ProSieben(ProSiebenSat.1)"
MPlayer SVN-r29796-4.4.2 (C) 2000-2009 MPlayer Team
Spiele dvb://ProSieben(ProSiebenSat.1).dvb_tune Freq: 690000000
TS-Dateiformat erkannt!
VIDEO MPEG2(pid=511) AUDIO MPA(pid=512) NO SUBS (yet)! PROGRAM N. 0
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 15000.0 kbps (1875.0 kbyte/s)
==========================================================================
Öffne Videodecoder: [mpegpes] MPEG 1/2 Video passthrough
Konnte keinen passenden Farbraum finden - neuer Versuch mit '-vf scale'... Öffne Videofilter: [scale]
Der ausgewählte Videoausgabetreiber ist nicht kompatibel mit diesem Codec. Versuche den scale-Filter zu deiner Filterliste hinzuzufügen, z.B. mit -vf spp,scale an Stelle von -vf spp.
Initialisierung des Videodecoders fehlgeschlagen :(
Öffne Videodecoder: [ffmpeg] FFmpeg's libavcodec codec family Unsupported PixelFormat -1
Ausgewählter Videocodec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
==========================================================================
Öffne Audiodecoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000) Ausgewählter Audiocodec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starte Wiedergabe...
Film-Aspekt ist 1,78:1 - Vorskalierung zur Korrektur der Seitenverhältnisse.
VO: [xv] 720x576 => 1024x576 Planar YV12
[mpeg2video @ 0xc62be0]ac-tex damaged at 23 4
[mpeg2video @ 0xc62be0]ac-tex damaged at 14 9
[mpeg2video @ 0xc62be0]skipped MB in I frame at 40 10 [mpeg2video @ 0xc62be0]invalid mb type in I Frame at 29 15 [mpeg2video @ 0xc62be0]skipped MB in I frame at 32 19 [mpeg2video @ 0xc62be0]ac-tex damaged at 34 33
[mpeg2video @ 0xc62be0]Warning MVs not available
[mpeg2video @ 0xc62be0]concealing 319 DC, 319 AC, 319 MV errors [mpeg2video @ 0xc62be0]concealing 319 DC, 319 AC, 319 MV errors?% 0 0 [mpeg2video @ 0xc62be0]concealing 319 DC, 319 AC, 319 MV errors% 0 0
[mpeg2video @ 0xc62be0]mb incr damaged,008 3/ 3 ??% ??% ??,?% 0 0
[mpeg2video @ 0xc62be0]00 motion_type at 27 17
[mpeg2video @ 0xc62be0]Warning MVs not available
[mpeg2video @ 0xc62be0]concealing 98 DC, 98 AC, 98 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 34 54/ 4 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]Warning MVs not available
[mpeg2video @ 0xc62be0]concealing 90 DC, 90 AC, 90 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 35 95/ 5 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]concealing 90 DC, 90 AC, 90 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 36 86/ 6 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]invalid cbp at 25 13
[mpeg2video @ 0xc62be0]ac-tex damaged at 4 23
[mpeg2video @ 0xc62be0]concealing 157 DC, 157 AC, 157 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 8 8 7/ 7 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]concealing 90 DC, 90 AC, 90 MV errors [mpeg2video @ 0xc62be0]concealing 50 DC, 50 AC, 50 MV errors?,?% 0 0
Bindung für Taste 'c' nicht gefunden. ?% 0 0
[mpeg2video @ 0xc62be0]invalid mb type in P Frame at 4 16 [mpeg2video @ 0xc62be0]concealing 45 DC, 45 AC, 45 MV errors [mpeg2video @ 0xc62be0]invalid mb type in B Frame at 0 31% ??,?% 0 0 [mpeg2video @ 0xc62be0]concealing 225 DC, 225 AC, 225 MV errors [mpeg2video @ 0xc62be0]mb incr damaged,040 11/ 11 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]invalid cbp at 28 30
[mpeg2video @ 0xc62be0]concealing 203 DC, 203 AC, 203 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 24 72/ 12 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]skipped MB in I frame at 6 12
[mpeg2video @ 0xc62be0]skipped MB in I frame at 1 19
[mpeg2video @ 0xc62be0]skipped MB in I frame at 23 25 [mpeg2video @ 0xc62be0]concealing 186 DC, 186 AC, 186 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 14 22/ 13 ??% ??% ??,?% 0 0 [mpeg2video @ 0xc62be0]concealing 45 DC, 45 AC, 45 MV errors [mpeg2video @ 0xc62be0]concealing 258 DC, 258 AC, 258 MV errors% 0 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 12 24/ 15 25% 4% 13,0% 0 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 10 31
[mpeg2video @ 0xc62be0]concealing 270 DC, 270 AC, 270 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 40 13/ 16 25% 4% 12,2% 0 0 [mpeg2video @ 0xc62be0]00 motion_type at 43 17
[mpeg2video @ 0xc62be0]slice mismatch
[mpeg2video @ 0xc62be0]concealing 270 DC, 270 AC, 270 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 1 717/ 17 24% 3% 20,2% 0 0 [mpeg2video @ 0xc62be0]concealing 151 DC, 151 AC, 151 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 29 88/ 18 23% 3% 19,1% 0 0 [mpeg2video @ 0xc62be0]mb incr damaged
[mpeg2video @ 0xc62be0]concealing 135 DC, 135 AC, 135 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 23 17/ 19 23% 3% 18,0% 0 0 [mpeg2video @ 0xc62be0]concealing 136 DC, 136 AC, 136 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 21 23/ 20 23% 3% 17,1% 0 0 [mpeg2video @ 0xc62be0]concealing 119 DC, 119 AC, 119 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 22 01/ 21 22% 3% 25,5% 0 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 42 9
[mpeg2video @ 0xc62be0]ac-tex damaged at 31 10
[mpeg2video @ 0xc62be0]invalid mb type in P Frame at 35 12 [mpeg2video @ 0xc62be0]00 motion_type at 18 17
[mpeg2video @ 0xc62be0]00 motion_type at 1 22
[mpeg2video @ 0xc62be0]ac-tex damaged at 29 23
[mpeg2video @ 0xc62be0]ac-tex damaged at 38 31
[mpeg2video @ 0xc62be0]concealing 450 DC, 450 AC, 450 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 22 12/ 22 22% 2% 24,3% 0 0 [mpeg2video @ 0xc62be0]00 motion_type at 12 14
[mpeg2video @ 0xc62be0]00 motion_type at 29 22
[mpeg2video @ 0xc62be0]concealing 180 DC, 180 AC, 180 MV errors [mpeg2video @ 0xc62be0]00 motion_type at 16 73/ 23 22% 2% 23,3% 0 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 10 14
[mpeg2video @ 0xc62be0]concealing 132 DC, 132 AC, 132 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 17 84/ 24 22% 2% 37,0% 0 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 18 11
[mpeg2video @ 0xc62be0]ac-tex damaged at 16 13
[mpeg2video @ 0xc62be0]ac-tex damaged at 11 15
[mpeg2video @ 0xc62be0]invalid mb type in I Frame at 27 20 [mpeg2video @ 0xc62be0]skipped MB in I frame at 29 23 [mpeg2video @ 0xc62be0]invalid mb type in I Frame at 38 31 [mpeg2video @ 0xc62be0]concealing 421 DC, 421 AC, 421 MV errors [mpeg2video @ 0xc62be0]concealing 90 DC, 90 AC, 90 MV errors4,4% 1 0 [mpeg2video @ 0xc62be0]00 motion_type at 29 13/ 26 21% 2% 70,7% 2 0 [mpeg2video @ 0xc62be0]00 motion_type at 6 21
[mpeg2video @ 0xc62be0]concealing 180 DC, 180 AC, 180 MV errors [mpeg2video @ 0xc62be0]ac-tex damaged at 21 67/ 27 21% 2% 104,0% 3 0 [mpeg2video @ 0xc62be0]ac-tex damaged at 19 14
[mpeg2video @ 0xc62be0]ac-tex damaged at 1 25
[mpeg2video @ 0xc62be0]mb incr damaged
[mpeg2video @ 0xc62be0]concealing 251 DC, 251 AC, 251 MV errors A:20536,2 V:20535,2 A-V: 0,997 ct: -0,101 28/ 28 21% 2% 135,0% 4 0 Beenden... (Ende)
P.S. sry if sended twice, I don't know if the first mail was sended right.
Quoted 2 lines · TAXI
I tried a Medion MD 95700 with kernel 2.6.32 (for tests: 2.6.30.9) and have a very bad image and sound quality.
I have two of these boxes, and they work great -- but I've had to patch the kernel in different ways to have success.
One way for my production machine happily running 2.6.14 with patches, due to the fact that this kernel has a problem with isochronous data being passed through an external hub -- the 95700 has a built-in hub to allow its built-in USB port to co- exist with the datastream and the remote control.
The other way works for newer kernels, sort of, and looks for the data on a different alternate interface where it can be found (but it requires a kick in the pants to get it started), although it is possible to successfully use either the isochronous or the bulk datastream which the device delivers with these later modern kernels.
The other thing to note is that this device delivers a full unfiltered Transport Stream, which with the 13,27Mbit/sec typical bandwidth per channel used in your country (apart from some local exceptions of greater values), will require a USB2 interface.
I mention this because the last multi-gigahertz-CPU machine I got my grubby fingers on still had only a built-in USB1 chipset, although when you write:
Quoted 1 line
under windows XP the image and sound is perfect.
That leads me to believe you have a USB2 interface and can ignore this -- although if you're somehow failing to load the EHCI driver and falling back to the companion UHCI or EHCI USB1, it will be a problem. You may want to verify that -- I am thwarted by unco-operative hardware that prevents me from using numbered kernel revisions as you mention as opposed to my custom kernels direct from the `git' repository tuned to my hardware and usually with more patches and hacks than are reasonable.
Quoted 5 lines
[mpeg2video @ 0xc62be0]ac-tex damaged at 23 4 [mpeg2video @ 0xc62be0]ac-tex damaged at 14 9 [mpeg2video @ 0xc62be0]skipped MB in I frame at 40 10 [mpeg2video @ 0xc62be0]invalid mb type in I Frame at 29 15 [mpeg2video @ 0xc62be0]skipped MB in I frame at 32 19
This and the following errors can be caused by any number of reasons for a corrupt data stream -- inadequate bandwidth (use of USB1 where USB2 is required for a complete Transport Stream), improper antenna orientation, or, with certain kernel revisions, attempting to read an isochronous data stream as bulk or vice versa.
Ooops, I just rebooted after a crash before plugging in a more- than-one-button-mouse on this machine I never intended to make serious use of, so I can't paste the diffs, but...
around line 620 in my reference code, there is a line that sets the alternate interface to 6. This is expected to be bulk, but on my boxes is isoc.
You can change this to interface 0, on which my boxes delivers bulk data flawlessly.
I've attempted to add a test of what sort of data is present on this interface, and if it's not bulk, decides to read isoc data from this interface (6) instead. That also works, but somehow needs an extra kick such that the first time it fails, yet is fine after that. (I get occasional failures from other tuner cards that work fine immediately after, so I've worked around this in the scripts I use.)
Anyway, I've been meaning to clean up this patch, or the alternative patches, and submit them to be ignored, but when I have my machine operating fully again (yeahright), I can send you some of these alternative patches to try -- running successfully on 2.6.14 and 2.6.27-rc4.
Hope this is helpful in spite of its vagueness...
thanks
barry bouwsma
Quoted 4 lines · BOUWSMA Barry
The other thing to note is that this device delivers a full unfiltered Transport Stream, which with the 13,27Mbit/sec typical bandwidth per channel used in your country (apart from some local exceptions of greater values), will require a USB2 interface.
it is a USB2 interface:
[ 3.965425] usb 1-3.1: new high speed USB device using ehci_hcd and
address 6 (it's the USB hub in the box)
I also thought the USB chipset could be the problem and testet it with an extra USB2 card.
Quoted 6 lines
around line 620 in my reference code, there is a line that sets the alternate interface to 6. This is expected to be bulk, but on my boxes is isoc.
You can change this to interface 0, on which my boxes delivers bulk data flawlessly.
I think isoc would be okay on 2.6.32, so no need to change that, right?
Quoted 4 lines
but when
I have my machine operating fully again (yeahright), I can send you some of these alternative patches to try -- running successfully on 2.6.14 and 2.6.27-rc4.
That would be nice.
P.S. my english is not the best so I don't understand all you wrote but why don't you put the patches upstream?
Moin moin, TAXI...
Quoted 9 lines · TAXI
Quoted 4 lines · BOUWSMA Barry
The other thing to note is that this device delivers a full unfiltered Transport Stream, which with the 13,27Mbit/sec typical bandwidth per channel used in your country (apart from some local exceptions of greater values), will require a USB2 interface.
it is a USB2 interface:
[ 3.965425] usb 1-3.1: new high speed USB device using ehci_hcd andaddress 6 (it's the USB hub in the box)
Na gut -- so habe ich erwartet. Aber sicher ist sicher, vertrauen ist gut, usw.
Or in english, I expected that, but it is always good to be sure, as it is one of the problems or bottlenecks which I regularly experience.
Quoted 8 lines
Quoted 6 lines
around line 620 in my reference code, there is a line that sets the alternate interface to 6. This is expected to be bulk, but on my boxes is isoc.
You can change this to interface 0, on which my boxes delivers bulk data flawlessly.
I think isoc would be okay on 2.6.32, so no need to change that, right?
Das Problem ist, der Treiber erwartet BULK Datei, nicht ISOC, aber das Kistchen liefert ISOC (isochronous) Datei. Deswegen kommt es zu Probleme.
Or, the thing is, Linux is expecting to be seeing bulk data on this particular alternate interface (6). If the receiver is not delivering this, but is instead delivering isochronous data, it's not in the same format and isn't properly handled by the driver.
Changing it so that the driver reads from alternate interface 0 results in all my hacked versions being able to read the data properly. Even before reading isoc data through hubs was fixed sometime around or before 2.6.18-ish.
Quoted 9 lines
Quoted 4 lines
but when
I have my machine operating fully again (yeahright), I can send you some of these alternative patches to try -- running successfully on 2.6.14 and 2.6.27-rc4.That would be nice.
P.S. my english is not the best so I don't understand all you wrote but why don't you put the patches upstream?
Mein deutsch ist noch schlimmer, wie Du siehst :-) Verzeihung wegen meine Muttersprache -- gerne schreibe ich, falls moeglich, einfacher und verstaendlich.
Es gibt zwei moegliche Loesungen, entweder einen anderen Dateityp aus'm Endpunkt' zu lesen, oder aus ein anderem Endpunkt' lesen. Mein Kode ist leider nicht sauber. Es laeuft bei mir, aber koennte Probleme bei anderen verursachen. Ich kann keine Unterschiede zwischen bulk' und isoc' Datei auch mit 'nem 200MHz Server feststellen, und kann deswegen keine gute Wahl zwischen die beiden entscheiden. Ich bin auch mit meiner Loesung nicht ganz zufrieden.
Or, I hope you see from my dreadful sentences above that you need not be ashamed of your english, but I will be happy to re-phrase and try to clarify anything I have written.
My work-in-progress patches try to use the two possible solutions, without affecting anyone whose receivers work, but I have not found a clear reason to favour one solution over the other. The solution which I think stomps less on the existing code is not perfect (first tuning fails), and after getting my receivers to work with both possibilities, I have not tried to clean up the two solutions for submissions as possible patches.
Hast Du die 2.6.32 Quellkode? Kannst Du aus `patches' etwas schaffen, und dabei die beide Moeglichkeiten testen?
(Are you able to build a new kernel to test my patches to see if they solve your problem?)
barry bouwsma
('tschuldigung, wegen moi' Tastatur, Grammatik, Woerterschatz, und allgemein Bloedheit)
Quoted 5 lines · TAXI
Quoted 3 lines
I have my machine operating fully again (yeahright), I can send you some of these alternative patches to try -- running successfully on 2.6.14 and 2.6.27-rc4.
That would be nice.
Hintergrund (aber nicht so wightig)...
I have not had the chance to update my `git' kernel source since more than a month, and even then, it is on a disk which I cannot plug in at present. The latest source I have at hand which I've patched is 2.6.27-rc4. There may be some differences from the present code, so I am not sending a normal patch.
(Ich verwende aeltere Quellcode, deswegen musst Du per Hand etwas aendern)
THIS IS NOT A PATCH TO BE APPLIED BY EVERYONE. This is only to verify that you are seeing the same problem I have had.
As I do not have a simple patch, I will give you the simple changes to be made by hand. Either way should give you a working receiver, and both, but not together, should work.
Make a copy of the source file...
$ cd (your linux source) $ cd drivers/media/dvb/dvb-usb $ cp -pvi cxusb.c cxusb.c-DIST
Edit cxusb.c
find the functioncxusb_cx22702_frontend_attach
^^^^^^^
it should have the line
if (usb_set_interface(adap->dev->udev, 0, 6) < 0)
^^^or something very similar -- change this 6 to 0.
This will cause the driver to look at alternate interface 0 for bulk data.
Now rebuild the kernel or the dvb_usb_cxusb module, reboot or load the new module, and try it and see if it is better.
I will send a second alternative patch, to read isoc data from interface 6, in a separate message.
barry bouwsma
Quoted 2 lines · BOUWSMA Barry
Now rebuild the kernel or the
dvb_usb_cxusbmodule, reboot or load the new module, and try it and see if it is better.
Great job, it works!
Thank you so much :)
Should we try the isoc transfer now?
Quoted 8 lines · TAXI
Quoted 2 lines · BOUWSMA Barry
Now rebuild the kernel or the
dvb_usb_cxusbmodule, reboot or load the new module, and try it and see if it is better.Great job, it works!
Thank you so much :)
Should we try the isoc transfer now?
Yes.
I wish I could find a clean patch that I used in the past -- but it is hidden on a disk... somewhere... somewhere...
I may have to send an untested patch. Boy, I wish I could copy and paste with my mouse :-)
Here is some source code which I have from 2005, with the ISOC parameters that used to be used...
.generic_bulk_ctrl_endpoint = 0x01,
/* parameter for the MPEG2-data transfer */
.urb = {
.type = DVB_USB_ISOC,
.count = 5,
.endpoint = 0x02,
.u = {
.isoc = {
.framesperurb = 32,
.framesize = 940,
.interval = 5,
}
}
},
.num_device_descs = 1,
.devices = {
{ "Medion MD95700 (MDUSBTV-HYBRID)",The idea is to fit this into the cxusb_medion_properties that is probably near line 900 of your present source, plus or minus however many changes there have been in the past five kernel releases since my 2.6.27-rc4.
These are the lines which now look much like .type = USB_BULK, and so on.
THIS IS NOT A CHANGE WHICH NORMAL USERS SHOULD TRY TO MAKE. IT WILL ONLY WORK FOR THE ORIGINAL UN-MODDED MEDION 95700.
Of course, you will first want to
$ mv -iv cxusb.c cxusb.c-bulk-hack $ cp -pvi cxusb.c-DIST cxusb.c then make your changes to the unchanged original cxusb.c
In a later patch which I have intended to be compatible for all users, I have this set somewhere else, with lines similar to
+#else
+/* XXX try to switch to using ISOC instead of BULK */
+/* XXX debug */ err("attempting to use isoc transfers on alt6 ep");
+ props->adapter->stream.type = USB_ISOC;
+ props->adapter->stream.u.isoc.framesperurb = 32;
+ props->adapter->stream.u.isoc.framesize = 940;
+ props->adapter->stream.u.isoc.interval = 5;
+
+#endif /* XXX HACK */
But this patch is very messy, and I must clean it up before I can even think of posting it to the list...
I hope this can get you started, as I continue to search for a simple patch which does the above, but correctly.
batty bouwsma