Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517164 - net-wireless/rtl-sdr-0.5.3: add detach_kernel_driver use flag [patch]
Summary: net-wireless/rtl-sdr-0.5.3: add detach_kernel_driver use flag [patch]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Radio project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-07-15 15:02 UTC by Marios Andreopoulos
Modified: 2015-03-22 02:38 UTC (History)
2 users (show)

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


Attachments
detach_kernel_driver patch (rtl-sdr.patch,832 bytes, patch)
2014-07-15 15:03 UTC, Marios Andreopoulos
Details | Diff
detach_kernel_driver patch (rtl-sdr.patch,808 bytes, patch)
2014-07-15 15:14 UTC, Marios Andreopoulos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marios Andreopoulos 2014-07-15 15:02:24 UTC
rtl-sdr can't work while the kernel modules for your usb TV stick are loaded.

If one does not care about TV he can blacklist the appropriate kernel modules.
If one cares about TV he has to manually load and/or unload them anytime he wants to use TV or SDR.

rtl-sdr provides another option through a compile time flag. With the cmake option DETACH_KERNEL_DRIVER=ON, rtl-sdr binaries will automatically unload the kernel modules when run. When you terminate them they automatically reload the modules, although in my case this doesn't work but the fix is as easy as removing and re-inserting the TV dongle; much easier than having to unload or load modules manually.

I propose to add the use flag "detach_kernel_driver" to the rtl-sdr ebuild. I attach a patch that does that. I succesfully applied it and tested it with net-wireless/rtl-sdr-0.5.3 on an ~amd64 desktop system.


Reproducible: Always
Comment 1 Marios Andreopoulos 2014-07-15 15:03:21 UTC
Created attachment 380756 [details, diff]
detach_kernel_driver patch
Comment 2 Marios Andreopoulos 2014-07-15 15:14:30 UTC
Created attachment 380760 [details, diff]
detach_kernel_driver patch

Sorry, previous patch had an error. This works as expected.
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2015-03-22 02:38:52 UTC
Actually I just independently converted the ebuild to cmake and enabled that flag just like you were requesting.  Please test and enjoy :-)