Project

General

Profile

Xbox One DVB-T/T2/C tuner

Added by Stephen Neal about 10 years ago

Hi all

This looks like it could be very good value if Open Source drivers appear for it : http://www.xbox.com/en-GB/xbox-one/accessories/digital-tv-tuner#fbid=1ui_UaaGUzy GBP£25/EUR€30 for a DVB-T/T2/C USB tuner for use with the Microsoft Xbox One (but like the Sony Play TV presumably usable on any PC platform if Linux drivers appear)


Replies (420)

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

Olli Salonen wrote:

I'm actually working on building a driver that could be upstreamed towards Linux kernel. I can't see why multiple devices wouldn't work, but then again, I have only one device... Maybe it's time to order one more, they seem to be dirt cheap!

I think a lot of people on here would appreciate that!

RE: Xbox One DVB-T/T2/C tuner - Added by Andras Farago over 7 years ago

Here you go (dmesg):

=== TDA18250B open, result[0x101E3027].
[408931.767758] tda18250b_set_params delivery_system=1 modulation=5 frequency=786000000 bandwidth_hz=7935000 symbol_rate=6900000 inversion=1 stream_id=-1
[408931.767763] stdMode 2
[408931.767769] tmbslTDA18250A_SetStandardMode(0x%08X)
[408931.767773] iTDA18250A_CheckHwState(0x%08X)
[408931.767778] tmbslTDA18250A_SetRF(0x%08X)
[408931.767783] iTDA18250A_SetFreqDependantStandard(0x%08X)
[408931.768056] >0x60[0x1f] 0x000000
[408931.768315] >0x60[0x1f] 0x000006
[408931.768574] >0x60[0x5a] 0x000000
[408931.769049] >0x60[0x5a] 0x000000
[408931.769308] >0x60[0xc] 0x000006
[408931.769562] >0x60[0x13] 0x000068
[408931.769818] >0x60[0x14] 0x00006a
[408931.770070] >0x60[0x12] 0x000026
[408931.770319] >0x60[0x17] 0x00007c
[408931.770568] >0x60[0x20] 0x000004
[408931.770817] >0x60[0x16] 0x000002
[408931.771066] >0x60[0x16] 0x000003
[408931.771314] >0x60[0xf] 0x00000e
[408931.771319] iTDA18250A_CheckHwState(0x%08X)
[408931.771324] iTDA18250A_SetRF(0x%08X)
[408931.771328] iTDA18250A_SetRF_Freq(0x%08X)
[408931.771649] >0x60[0x27] 0x00000b
[408931.771654] >0x60[0x28] 0x0000fe
[408931.771659] >0x60[0x29] 0x000050
[408931.771664] iTDA18250A_SetNDivKDiv(0x%08X)
[408931.771926] >0x60[0xa] 0x000088
[408931.771931] iTDA18250A_SetMSM(0x%08X)
[408931.772229] >0x60[0x2a] 0x000001
[408931.772235] >0x60[0x2b] 0x000001
[408931.772661] <0x60[0x8] 0x00003b
[408931.809244] <0x60[0x8] 0x0000bb
[408931.809682] <0x60[0x34] 0x000018
[408931.810110] <0x60[0x34] 0x000018
[408931.810529] <0x60[0x4f] 0x00008d
[408931.810799] >0x60[0x4f] 0x00008d
[408931.811234] <0x60[0x4f] 0x00008d
[408931.811486] >0x60[0x4f] 0x00008d
[408931.811737] >0x60[0xa] 0x000088
[408931.811986] >0x60[0x46] 0x000008
[408931.812237] >0x60[0x39] 0x000000
[408931.812242] iTDA18250A_SetMSM(0x%08X)
[408931.812530] >0x60[0x2a] 0x000001
[408931.812535] >0x60[0x2b] 0x000001
[408931.812981] <0x60[0x8] 0x00003b
[408931.839202] <0x60[0x8] 0x0000bb
[408931.868791] iTDA18250A_OverrideICP(0x%08X)
[408931.869237] <0x60[0x34] 0x000018
[408931.869657] <0x60[0x34] 0x000018
[408931.869929] >0x60[0x46] 0x00000d
[408931.869935] iTDA18250A_OverrideWireless(0x%08X)
[408931.870360] <0x60[0x1e] 0x000004
[408931.870368] tmbslTDA18250A_GetPLLState(0x%08X)
[408931.870788] <0x60[0x5] 0x000001
[408931.871235] <0x60[0x8] 0x0000bb
[408931.871241] tmbslTDA18250A_GetIF(0x%08X)
[408931.871247] IF -> 4950000

To Olli: I can help you to test the driver, I have two tuners, and I have both DVB-C, and DVB-T network to test. Did you write a new driver for TDA18250 or you used this driver?

RE: Xbox One DVB-T/T2/C tuner - Added by Anonymous over 7 years ago

Olli Salonen wrote:

I'm actually working on building a driver that could be upstreamed towards Linux kernel. I can't see why multiple devices wouldn't work, but then again, I have only one device... Maybe it's time to order one more, they seem to be dirt cheap!

If you would like help, let me know with an address to VCS.

PS: maybe you received my msg on irc ;)

RE: Xbox One DVB-T/T2/C tuner - Added by Edward S over 7 years ago

A new clean rebuild of Andras's modified media_build and it's now working. I think it takes over 6 hours on a first generation Raspberry Pi but works well :)

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

I've got the driver ready and locking for DVB-T and DVB-T2 streams here at home, but do not have a DVB-C available. I'll clean it up a bit and post it on Github if someone wants to have a go.

Tux user, I didn't get any/your message on IRC?

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

More than happy to try for DVB-C.

RE: Xbox One DVB-T/T2/C tuner - Added by Josu Lazkano over 7 years ago

Olli Salonen wrote:

I've got the driver ready and locking for DVB-T and DVB-T2 streams here at home, but do not have a DVB-C available. I'll clean it up a bit and post it on Github if someone wants to have a go.

Tux user, I didn't get any/your message on IRC?

Hi Olli,

I just buy one of this devices.

When it arrive, I could share a raspberry pi SSH root device connected to DVB-C if you want.

Kind regards.

RE: Xbox One DVB-T/T2/C tuner - Added by Mark Clarkstone over 7 years ago

I've also now bought two of the tuners from Amazon & I'm more than happy to try them too!

Would love to know where I can get your driver from Olli!

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

Good evening gents,

The driver has now been pushed to Github. I'd be happy for all kinds of reports when it comes to the driver. It builds fine under kernel 4.12 using the latest media_build.

https://github.com/trsqr/media_tree/tree/xboxone

Something like this should work for the compilation:

git clone git://linuxtv.org/media_build.git
git clone --depth=1 https://github.com/trsqr/media_tree.git -b xboxone ./media
cd media_build
make dir DIR=../media
make distclean
make

In any case, after you have successfully installed the driver, I'd like to ask you to enable debugging. Don't modprobe the dvb-usb-dib0700 first, but instead:

sudo modprobe tda18250
sudo sh -c 'echo "file tda18250 +pfml" > /sys/kernel/debug/dynamic_debug/control'
sudo modprobe dvb-usb-dib0700

The tda18250 uses the "new" kernel dynamic debugging, so you can enable it by modifying the dynamic debug control file. Note that that only works if you have debugfs compiled into your setup, but most modern Linux distros do have it.

Have fun!

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

So far so good. Here's a hint for Tvheadend users watching DVB-T2 broadcasts. For some reason in the mux configuration I had PLP ID -1 which resulted in a failed scan. However, when I changed that number to 0, the muxes were fine. The PLP is handled by the demodulator (and I did not touch the demod driver at all), so I think this same thing exists with the other driver as well...

RE: Xbox One DVB-T/T2/C tuner - Added by Mark Clarkstone over 7 years ago

Olli Salonen wrote:

So far so good. Here's a hint for Tvheadend users watching DVB-T2 broadcasts. For some reason in the mux configuration I had PLP ID -1 which resulted in a failed scan. However, when I changed that number to 0, the muxes were fine. The PLP is handled by the demodulator (and I did not touch the demod driver at all), so I think this same thing exists with the other driver as well...

Can your driver be used with more than one of the tuners? I have two on the way!

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

I don't see why not, but then again, I've got only one tuner. :)

I submitted the PLP fix for both MN88472 and MN88473 to the linux-media mailing list already (https://www.mail-archive.com/[email protected]/msg116405.html). I'll wait for some test reports from you guys before doing the same for the TDA18250 and the Xbox tuner driver.

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

Olli - just tried to build

/home/ion/xboxolli/media_build/v4l/cec-pin.c:20:31: fatal error: linux/sched/types.h: No such file or directory
 #include <linux/sched/types.h>
                               ^
compilation terminated.
scripts/Makefile.build:294: recipe for target '/home/ion/xboxolli/media_build/v4l/cec-pin.o' failed
make[3]: *** [/home/ion/xboxolli/media_build/v4l/cec-pin.o] Error 1
Makefile:1524: recipe for target '_module_/home/ion/xboxolli/media_build/v4l' failed
make[2]: *** [_module_/home/ion/xboxolli/media_build/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.10.0-26-generic'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/home/ion/xboxolli/media_build/v4l'
Makefile:26: recipe for target 'all' failed
make: *** [all] Error 2

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

Anthony,

Which kernel is that and did you git clone the latest media_build? CEC was just added and there might be some issues there...

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

Olli Salonen wrote:

Anthony,

Which kernel is that and did you git clone the latest media_build? CEC was just added and there might be some issues there...

Kernel

Linux ION 4.10.0-26-generic #30-Ubuntu SMP Tue Jun 27 09:30:12 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I used your instructions above which included git cloning the latest media build.

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

I think there's a chance that you don't have the kernel headers installed. Media_build cannot work without them...

I just tried on a box running Ubuntu with kernel 4.8.0-56 and it compiled just fine. Did only copy-paste the commands from the post above.

What does the following command tell you?
dpkg -l | grep linux-headers

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

ion@ION:~/xboxolli/media_build$ dpkg -l | grep linux-headers
ii  linux-headers-4.10.0-19                    4.10.0-19.21                              all          Header files related to Linux kernel version 4.10.0
ii  linux-headers-4.10.0-19-generic            4.10.0-19.21                              amd64        Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii  linux-headers-4.10.0-24                    4.10.0-24.28                              all          Header files related to Linux kernel version 4.10.0
ii  linux-headers-4.10.0-24-generic            4.10.0-24.28                              amd64        Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii  linux-headers-4.10.0-26                    4.10.0-26.30                              all          Header files related to Linux kernel version 4.10.0
ii  linux-headers-4.10.0-26-generic            4.10.0-26.30                              amd64        Linux kernel headers for version 4.10.0 on 64 bit x86 SMP
ii  linux-headers-4.12.2-041202                4.12.2-041202.201707150832                all          Header files related to Linux kernel version 4.12.2
ii  linux-headers-4.12.2-041202-generic        4.12.2-041202.201707150832                amd64        Linux kernel headers for version 4.12.2 on 64 bit x86 SMP
ii  linux-headers-generic                      4.10.0.26.28                              amd64        Generic Linux kernel headers

I've just installed 4.12.2 so I'm going to give it a go on that.

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

Anthony Thomas wrote:

[...]

I've just installed 4.12.2 so I'm going to give it a go on that.

Not finished building yet but is has made it past the CEC drivers, so hopefully it will be ok.

RE: Xbox One DVB-T/T2/C tuner - Added by Anthony Thomas over 7 years ago

Olli - fantastic work.

After some initial testing I have just streamed 4 separate HD channels across 4 tuners!

I have a separate system running minisatip with the 4 tuners attached. That then feeds a TVH server on the network.

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

Thank you Anthony for testing this! Really happy to see that a) DVB-C works and b) multiple tuners in the same system works.

RE: Xbox One DVB-T/T2/C tuner - Added by Low Gravity over 7 years ago

Hello,
running HTS Tvheadend 4.2.2-32 ~ LibreELEC Tvh-addon v8.1.111 on Linux LibreELEC 4.9.29 x86_64 and wanna know how to get the XBox TV Tuner up and running. May someone could post a little howto for noobs like me?:)

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

The only way to add drivers into LibreELEC (or OpenELEC) is to compile the whole LibreELEC again with a special patch that adds support for the tuner. I will create such a patch once I'm confident that the driver is working properly and I'm satisfied with it. Then I can compile an LE version with this patch included and place it somewhere for download.

So, please wait for a few days and watch this space. :)

RE: Xbox One DVB-T/T2/C tuner - Added by Christian Cooperhill over 7 years ago

Nvm, will try later tonight.

RE: Xbox One DVB-T/T2/C tuner - Added by Andras Farago over 7 years ago

Olli, same result here, drivers is working. System: Raspberry pi3, kernel version: 4.9.35-v7+. Two xbox tuners working simultaneously.
Three problems(?):
  1. Sometimes it shows 9dB for SNR (but I think it is the demodulator which measures the SNR),
  2. I have problem with two frequencies (121,5 and 128,5 MHz, both QAM256, symbol rate 6000) where the signal strength is good, but a lot of continuity and transport error, but the 114,5MHz and 135,5MHz mux is good.
  3. Not so good SNR values (for smooth playback HD channels 36dB SNR needed)

Is it possible to make the driver to get the signal strength and SNR datas from the tda18250?

To Anthony: Why do you use a Satip server and a tvheadend server? Just only a tvheadend server not enough? (Just asking, never used a satip server, yet.)

RE: Xbox One DVB-T/T2/C tuner - Added by Olli Salonen over 7 years ago

The TDA18250 tuner doesn't know anything about SNR, so it's not possible to get those figures out from there unfortunately.

Did you have the same issues with the signal strength using the other driver published in this discussion? If not, we could do a comparison (although this requires some work from your side). The tuner is basically operated by storing values into the 93 registers it has. Each register contains a single 8-bit unsigned integer (ie. value between 0 and 255).

Good news is, we can dump the register values. The driver in my media_tree already supports dumping of the register values if you have debugfs installed (most modern Linux distros do have). So, do the following first with "my" driver:

- make sure no driver is loaded (modprobe -r)
- modprobe tda18250
- sudo sh -c 'echo "file *tda18250* +pfml" > /sys/kernel/debug/dynamic_debug/control'
- modprobe dvb-usb-dib0700
- start the playback of a problematic stream
- sudo cat /sys/kernel/debug/regmap/1-0060/registers

Store the output. Also, take the kernel log output store that (dmesg).

Then we need to modify the "other" driver.

Around line 87 of the drivers/media/tuners/tda18250/tda18250b_i2c.c file you'll find something like this:

        static const struct regmap_config regmap_config = { .reg_bits = 8,
                        .val_bits = 8 };

However, this is missing the definition of max_register, which enables us to dump all regs. Modify this in the following way:

        static const struct regmap_config regmap_config = { .reg_bits = 8,
                        .val_bits = 8, .max_register = 0x5c };

Now you can compile and install the other driver. Then just start playing a stream (you don't need to do any enabling of any debugs, the regmap debug should be there by default). And do:

- sudo cat /sys/kernel/debug/regmap/1-0060/registers

Store the output.

Now attach the register dumps and the kernel log here and we can compare to see what is different.

On the other hand, if the same problem exists with both drivers, there's not much we can do without getting a reference USB dump (maybe from a real Xbox and USB sniffer)...

(76-100/420)