Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auzeuner DVB-T2 (Astrometa 2018) driver update #567

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
@kapitanf
Copy link

commented Jul 5, 2018

Hi Linus,
here is rtl28xxu.c rtl28xxu.h update with support cxd2837er demodulator for right function Astrometa 2018 dvb-t/t2/c stick. Works for me on linux kernel 4.17.2.

kapitanf added some commits Jul 5, 2018

@KernelPRBot

This comment has been minimized.

Copy link

commented Jul 5, 2018

Hi @kapitanf!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Who do I send my contribution to?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

@kapitanf

This comment has been minimized.

Copy link
Author

commented Jul 6, 2018

Very helpful, many Thanks.

Regards Filip

@negrumanuel

This comment has been minimized.

Copy link

commented Aug 23, 2018

Hi Filip,

Did you pursue this any further after receiving the message from the bot? I have an Astrometa stick that came with the Sony chip and I can't use it on my raspberry at the moment. I tried applying the patch you proposed but I'm a newbie at Linux so probably didn't do it right.

Thanks
Dan

mesemus pushed a commit to mesemus/linux that referenced this pull request Sep 22, 2018

@gtdorin

This comment has been minimized.

Copy link

commented Oct 8, 2018

hi, patch is ok, but when I reboot PC dvb-c tuner disappear, I have to remove from the USB port physical (bind and unbind USB not working) and then dvb-c tuner work again.
Any idea how to solve this?

@davaeron

This comment has been minimized.

Copy link

commented Oct 17, 2018

I have the same problem as @gtdorin

@cmiguelcabral

This comment has been minimized.

Copy link

commented Oct 31, 2018

hi, patch is ok, but when I reboot PC dvb-c tuner disappear, I have to remove from the USB port physical (bind and unbind USB not working) and then dvb-c tuner work again.
Any idea how to solve this?

Same here!

@debianxfce

This comment has been minimized.

Copy link

commented Nov 1, 2018

Thanks a lot for these patches. The DVB-T signal sensitivity is poor when only Rafael Micro r820t is used. With cxd2837er signal sensitivity is good as with A-Link DTU. You need to do this as root:
mv /dev/dvb/adapter0/frontend0 /dev/dvb/adapter0/frontend99 && mv /dev/dvb/adapter0/frontend1 /dev/dvb/adapter0/frontend0

cxd2837er is not enabled after reboot here too. I am a software developer and interested to fix these. I inspected the source code and got no idea where to start. I hope that these patches are merged to the mainline kernel, the driver functionality is good enough.

@eledhil

This comment has been minimized.

Copy link

commented Nov 1, 2018

Hi,
Thanks for this patch!
I use your patch on 4.18 kernel and it works, I use it as DVB-T2 receiver, but there are some issues.
I have 3 USB sticks https://linuxtv.org/wiki/index.php/Astrometa_DVB-T2
Visualy, one looks like 2014 revision and second one as 2017 revision (I have 2 of this type), but all of them are Sony CXD2837ER, according to dmesg it is the same HW. (HW from 2018 revision / Auzeuner)
One works perfectly with no issues, the second one stops working quite often, usualy after change channel (I use Kaffeine), then there is just black screen and I have to physically unplug and plug USB stick again, and then it works again. Sometimes it happens almost after each channel change, so it is very annoying.
I have 2 pieces of the problematic one and both have the same problem, so it is not bad HW.
I am not sure what is wrong, some bad timing? Probably not related to your patch at all.....

@debianxfce

This comment has been minimized.

Copy link

commented Nov 1, 2018

I found a patch that fixes Sony CXD2837ER warm boot:
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -540,7 +541,18 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)

/* probe slave demod */
if (dev->tuner == TUNER_RTL2832_R828D) {

- /* power on MN88472 demod on GPIO0 /
+ /
power off slave demod on GPIO0 to reset CXD2837ER /
+ ret = rtl28xxu_wr_reg_mask(d, SYS_GPIO_OUT_VAL, 0x00, 0x01);
+ if (ret)
+ goto err;
+
+ ret = rtl28xxu_wr_reg_mask(d, SYS_GPIO_OUT_EN, 0x00, 0x01);
+ if (ret)
+ goto err;
+
+ msleep(50);
+
+ /
power on slave demod on GPIO0 */

@aililefei

This comment has been minimized.

Copy link

commented Nov 1, 2018

@debianxfce

This comment has been minimized.

Copy link

commented Nov 1, 2018

.

I am not sure what is wrong, some bad timing? Probably not related to your patch at all.....

Set cxd2837er to frontend0 as in my previous post. Use VLC.

@debianxfce
Copy link

left a comment

Add this code to the rtl2832u_read_config function to fix PC reboot bug.
/* probe slave demod /
if (dev->tuner == TUNER_RTL2832_R828D) {
/
power off slave demod on GPIO0 to reset CXD2837ER */
ret = rtl28xxu_wr_reg_mask(d, SYS_GPIO_OUT_VAL, 0x00, 0x01);
if (ret)
goto err;

	ret = rtl28xxu_wr_reg_mask(d, SYS_GPIO_OUT_EN, 0x00, 0x01);
	if (ret)
		goto err;

	msleep(50);
@gtdorin

This comment has been minimized.

Copy link

commented Nov 29, 2018

did someone checked this patch?

@seanyoung

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2018

@kapitanf in order to accept this patch in the kernel we need a signed off tag. See

https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html?highlight=signed%20off#sign-your-work-the-developer-s-certificate-of-origin

Also, this PR was submitted to linux-media. I wrote a review here:

https://patchwork.linuxtv.org/patch/52778/

@gtdorin

This comment has been minimized.

Copy link

commented Dec 4, 2018

With this patch the device starts correctly after reboot:

patch.txt

@dffr

This comment has been minimized.

Copy link

commented Dec 13, 2018

Hi,
Someone help me apply this patch to raspbian?

Thank You

@debianxfce

This comment has been minimized.

Copy link

commented Dec 23, 2018

I did send this patch for the Linux media maintainer weeks ago and nothing has happened. Works with 4.20 kernels.
https://github.com/debianxfce/astrometa/blob/master/rtl28xxu.patch

@seanyoung

This comment has been minimized.

Copy link
Contributor

commented Dec 24, 2018

A similar patch has now been accepted into the media tree which should make its way into 4.21.

https://git.linuxtv.org/media_tree.git/commit/?id=d695eb5b3b963230652db29eae341a9706c593f4

@debianxfce

This comment has been minimized.

Copy link

commented Dec 30, 2018

It has a wrong/incompatible value for struct rtl28xxu_req req_cxd2837er = {0x68d8, CMD_I2C_RD, 1, buf};
In this repository is the correct value, 0x68d8.
I did send e-mail to: mchehab+samsung@kernel.org

There is other problems too, that patch did not work after changing the value to 0x68d8

@debianxfce

This comment has been minimized.

Copy link

commented Jan 7, 2019

The astrometa patch in the kernel 5.0-rc1 actually works. No need for patching in future kernels anymore.

@ValZapod

This comment has been minimized.

Copy link

commented Jan 11, 2019

wrong value for struct

struct rtl28xxu_req req_cxd2837er = {0xfdd8, CMD_I2C_RD, 1, buf};
0xfd is a register to check the id of internal demodulator.
Also id of cxd2837 is 0xb1, not 0x03
So... if (ret == 0 && buf[0] == 0x03) { must be if (ret == 0 && buf[0] == 0xb1) {
And there must not be flag CXD2841ER_NO_WAIT_LOCK there will be problems with PLP.
There is no need in rtl28xxu_frontend_detach.
All of this is right in 5.0-rc1.

@rukie78

This comment has been minimized.

Copy link

commented Feb 12, 2019

Hello to all.I am verry noobie with linux and i have a verry big problem.After i install tvheadend i can't install driver for Astrometa DVB-C (chipset Sony CXD2837ER).In my Ubuntu VERSION_ID="18.10"
with kernel 4.18.0-10-generic i see only chipset Realtek RTL 2832 DVBT-0. Someone can help me with this step by step .THX so much!

@ValZapod

This comment has been minimized.

Copy link

commented Feb 12, 2019

@rukie78 FYI, patch to support this sony demodulater will be only in 5.0 kernel.

@rukie78

This comment has been minimized.

Copy link

commented Feb 13, 2019

In my old ubuntu version with a smaller kernel version was working, but with this tutorial "How_to_Obtain,_Build_and_Install_V4L" .The tutorial is verry good but is need to much time to compile kernel.
I don't know how can i use that 3 files of "kapitanf" and i think is very useful if somebody make an explicit tutorial for noobs like me.Regards to all!

@ValZapod

This comment has been minimized.

Copy link

commented Feb 13, 2019

@rukie78 It is not a very good idea to use patch from kapitanf; there are mistakes in his code as I said before in this thread. You shoud use commit d695eb5
instead.

@giorgijag

This comment has been minimized.

Copy link

commented Feb 14, 2019

@ValZapod
You mean, on my astrometa dvb-t2 which is Sony CXD2837ER, there is no use tro apply this patch? will not work on Kernel 4?

When will 5.0 kernel be published?

@ValZapod

This comment has been minimized.

Copy link

commented Feb 14, 2019

@giorgijag You should apply patch from commit d695eb5.This one have mistakes. I suppose it will work on 4.19 if you put this commit on top and rebuild the kernel. 5.0 is already published (in Release candidate 6), so mainline will be published in 2 or 3 weeks, I suppose.

@ValZapod

This comment has been minimized.

Copy link

commented Feb 14, 2019

@giorgijag

This comment has been minimized.

Copy link

commented Feb 14, 2019

@giorgijag You should apply patch from commit d695eb5.This one have mistakes. I suppose it will work on 4.19 if you put this commit on top and rebuild the kernel. 5.0 is already published (in Release candidate 6), so mainline will be published in 2 or 3 weeks, I suppose.

@ValZapod
Dear Valerii,

  1. I upgraded kernel from 4.15 to 4.19. is OK
  2. I downloaded patch file from [d695eb5] in tmp folder, added .patch extension to link and saved as "dvb.patch" file. When i apply have error:
    /tmp$ git apply dvb.patch
    error: drivers/media/usb/dvb-usb-v2/Kconfig: No such file or directory
    error: drivers/media/usb/dvb-usb-v2/rtl28xxu.c: No such file or directory
    error: drivers/media/usb/dvb-usb-v2/rtl28xxu.h: No such file or directory
@rukie78

This comment has been minimized.

Copy link

commented Feb 14, 2019

ValZapod have right.I upgrade my kernel at 5.0 from that link and is working now.Tvheadend final version i think have a problem at EPG module id.You must put the right freg, baud rate and constelation.Thx to all for support!

@ValZapod

This comment has been minimized.

Copy link

commented Feb 15, 2019

@giorgijag You can't apply SOURCE code patch to binary files, of course. I think you should wait untill 5.0 kernel will be published or maybe @rukie78 can post his commands from history))

@giorgijag

This comment has been minimized.

Copy link

commented Feb 15, 2019

@ValZapod Thank you.

@rukie78 could you help to provide step-by-step commands how it worked for you? thanks.

@rukie78

This comment has been minimized.

Copy link

commented Feb 17, 2019

Here is step by step.If give errors at step "make" search the error on google.Posible error appear because flex,nemo is not installed.
https://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

@giorgijag

This comment has been minimized.

Copy link

commented Feb 18, 2019

@rukie78
Thank you. I upgraded to 5.0 Kernel and it worked.

@bademux bademux referenced this pull request Feb 24, 2019

Open

HanfTek crash #25

@tcmaps

This comment has been minimized.

Copy link

commented Mar 26, 2019

sorry for beeing out of the loop since a while, but is qam256 working now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.