Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355775 - No driver for dvb tuner rtl2832u
Summary: No driver for dvb tuner rtl2832u
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 00:08 UTC by Tiago Batista
Modified: 2011-03-17 10:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch that adds the rtl2832u driver (rtl2832u.patch.gz,107.24 KB, application/octet-stream)
2011-02-21 00:14 UTC, Tiago Batista
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Batista 2011-02-21 00:08:25 UTC
No driver is currently present (that I am aware of) that supports realtek 2832u driver.

This adds ap potential cadidate to get such cards working on a "works for mi basis"!


Reproducible: Always

Steps to Reproduce:
1. Buy the wrong dbb card
2. Plug it in
3. Try to watch tv......

Actual Results:  
The card is not recognized

Expected Results:  
A functioning driver and possiby some tv channel!!!

Unforutunately, The only driver I was able to find was http://media.ubuntuusers.de/forum/attachments/2103272/090730_RTL2832U_LINUX_Ver1.1.rar who's provinence I can not vouche for.

Yet, I tried to include it in the upcomming .38 kernel release. Attached is my first take at this.

At the moment my system is working almost fine with this card. I lost the suspend to ram state but I have not yet confirmed if it is a regression in the new kernel.

Anyone with a 64 bit system would like to try this? Anyone knows of a new version of the driver, or even who the original maintainer is?
Comment 1 Tiago Batista 2011-02-21 00:14:21 UTC
Created attachment 263231 [details]
patch that adds the rtl2832u driver

I now realize that this should have gone into the staging area... Sorry, for cluttering the main kernel tree!
Comment 2 Erik Dobak 2011-02-21 17:32:11 UTC
for which kernel is this? did try on 2.6.37 but getting error:

  CC [M]  drivers/media/dvb/dvb-core/dvb_ringbuffer.o 
  CC [M]  net/ipv6/addrlabel.o 
  CC [M]  drivers/media/dvb/dvb-core/dvb_math.o 
  LD [M]  drivers/media/dvb/dvb-core/dvb-core.o 
make[4]: *** No rule to make target `drivers/media/dvb/dvb-usb/demod_rtl2832.o', needed by `drivers/media/dvb/dvb-usb/dvb-usb.o'.  Stop.
make[3]: *** [drivers/media/dvb/dvb-usb] Error 2 
make[2]: *** [drivers/media/dvb] Error 2 
make[1]: *** [drivers/media] Error 2 
make: *** [drivers] Error 2 
Comment 3 Tiago Batista 2011-02-21 18:03:15 UTC
I run a git kernel... 2.6.38-rc3 at the moment, this patch worked against 44f2c5c841da1b1e0864d768197ab1497b5c2cc1

Nice one getting that problem, don't expect it soon as I usually only have the time to work on this during the weekend, but I'll look into it

Did the patch apply cleanly? Look especially at the Makefile... does it contain the lines

"dvb-usb-rtl2832u-objs = demod_rtl2832.o dvbt_demod_base.o dvbt_nim_base.o foundation.o math_mpi.o nim_rtl2832_mxl5007t.o nim_rtl2832_fc2580.o nim_rtl2832_mt2266.o rtl2832u.o rtl2832u_fe.o rtl2832u_io.o tuner_mxl5007t.o tuner_fc2580.o tuner_mt2266.o tuner_tua9001.o nim_rtl2832_tua9001.o
obj-$(CONFIG_DVB_USB_RTL2832U) += dvb-usb-rtl2832u.o"
Comment 4 Erik Dobak 2011-02-21 19:14:41 UTC
(In reply to comment #3)
> Nice one getting that problem, don't expect it soon as I usually only have the
> time to work on this during the weekend, but I'll look into it

sorry my fault i dont know how to use patch and did generate the files in /usr/src/linux

it did compile nice now but my card still is not detected i think i have to tweak some file with the usb ids.

did allready do it with dvb-usb-rtl2832u.mod.c but, still no device created.

modprobe dvb-usb-rtl2832u is ok
Comment 5 Erik Dobak 2011-02-22 15:17:09 UTC
now i found the right file for the usbids = rtl2832u.h

dont know the difference between USB_PID_RTD2832U_WARM and USB_PID_RTD2832U_2ND_WARM but did try with both to change the id so that my device is recognized:

usb 1-3: new high speed USB device using ehci_hcd and address 3
dvb-usb: found a 'RTL2832U DVB-T USB DEVICE' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (RTL2832U DVB-T USB DEVICE)
DVB: registering adapter 0 frontend 0 (Realtek RTL2832 DVB-T)...

but when trying to tune i get no results:

localhost# dvbscan -c
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
WARNING: filter timeout pid 0x0011
WARNING: filter timeout pid 0x0000
dumping lists (0 services)
Done.

or:

kaffeine(8675) DvbLinuxDevice::getSignal: ioctl FE_READ_SIGNAL_STRENGTH failed for "/dev/dvb/adapter0/frontend0" 
kaffeine(8675) DvbLinuxDevice::getSnr: ioctl FE_READ_SNR failed for "/dev/dvb/adapter0/frontend0" 
kaffeine(8675) DvbDevice::frontendEvent: tuning failed
Comment 6 Tiago Batista 2011-02-22 16:55:49 UTC
Is there no way of finding out the frequency for your country? Scanning did not work for me either (using vlc), but starting vlc with the specific comand line gets me all the tv channels for Portugal.

As an example, here, i use:
vlc dvb://frequency=842000000 --deinterlace 1

If you get it working, please post the device ID of your tuner here for future reference
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2011-02-22 19:13:47 UTC
Is that a kernel patch? What kernel version?
Comment 8 Tiago Batista 2011-02-23 10:17:04 UTC
This is against a git checkout, as I stated in comment #3. the checkout was a bit after 2.6.38-rc3 was released. Sorry it is marked as binary, but the patch was over 500k as it includes all the driver.

The code itself came from the link in the original report, plus a few modifications to remove the warnings. The files state a GPLv2 license, but I do not know who the original publisher is.

I posted this here especially for the ones that have bought the same hardware (as Eric) but were not able to get a working driver.

I already got the next weekend messed up, so I can't re-create this in the staging area where it should live, but it is on my TODO list.

I am still not sure if this patch introduces any regressions, in my case I suspect it broke suspend to ram, but I need to test it on a stable kernel to make sure.
Comment 9 Erik Dobak 2011-02-24 17:51:29 UTC
(In reply to comment #6)
> vlc dvb://frequency=842000000 --deinterlace 1
thank you.

in my case it would be vlc dvb://frequency=834000000 --deinterlace 1
but i am getting only this:


VLC media player 1.1.7 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x605120] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Blocked: call to setlocale(6, "")
Blocked: call to dlopen("/usr/lib64/kde4/plugins/gui_platform/libkde.so", 1)
Blocked: call to setlocale(6, "")
[0x6ae050] qt4 interface error: Unable to load extensions module
[0x6f2d90] dvb access warning: CAMInit: opening CAM device failed (No such file or directory)


further i installed w_scan which seems to work but does not find anything at all frequencies:

w_scan -c SK -M -t3
w_scan version 20101204 (compiled for DVB API 5.2)
using settings for SLOVAKIA
DVB aerial
DVB-T Europe
frontend_type DVB-T, channellist 4
output format mplayer
Info: using DVB adapter auto detection.
        /dev/dvb/adapter0/frontend0 -> DVB-T "Realtek RTL2832 DVB-T": good :-)
Using DVB-T frontend (adapter /dev/dvb/adapter0/frontend0)
-_-_-_-_ Getting frontend capabilities-_-_-_-_ 
Using DVB API 5.2
frontend Realtek RTL2832 DVB-T supports
INVERSION_AUTO
QAM_AUTO                                                                                                                                                                                                                                                    
TRANSMISSION_MODE_AUTO                                                                                                                                                                                                                                      
GUARD_INTERVAL_AUTO                                                                                                                                                                                                                                         
HIERARCHY_AUTO                                                                                                                                                                                                                                              
FEC_AUTO                                                                                                                                                                                                                                                    
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_                                                                                                                                                                                                              
Scanning 7MHz frequencies...                                                                                                                                                                                                                                
177500: (time: 00:00)

i will try now to repair vlc, when i have something new i will report.
Comment 10 Erik Dobak 2011-02-25 12:36:26 UTC
hi could you people post the usb ids and tell if its working or not?
mine 0458:707F is not working.

Comment 11 Tiago Batista 2011-03-05 18:47:03 UTC
EEK!

I finally fount the original source for the code I included in the patch, and it seems that this one is already outdated!!!

Look here:

http://wiki.zeratul.org/doku.php?id=linux:v4l:realtek:start

If I read this right, there is the possibility of an external build of the code, this means that an ebuild is likely a better solution than another kernel patch floating around...
Comment 12 Mike Pagano gentoo-dev 2011-03-17 10:44:48 UTC
We only include patches from the linux upstream development tree. You can either ask the creator of this patch to submit or work to submit yourself.