Message ID | 50BE65F0.8020303@googlemail.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1Tfzhf-0000NC-TY for patchwork@linuxtv.org; Tue, 04 Dec 2012 22:06:55 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for <patchwork@linuxtv.org> id 1Tfzhe-0000rJ-G6; Tue, 04 Dec 2012 22:06:55 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752316Ab2LDVGw (ORCPT <rfc822;patchwork@linuxtv.org>); Tue, 4 Dec 2012 16:06:52 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:34301 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839Ab2LDVGv (ORCPT <rfc822; linux-media@vger.kernel.org>); Tue, 4 Dec 2012 16:06:51 -0500 Received: by mail-bk0-f46.google.com with SMTP id q16so1853426bkw.19 for <linux-media@vger.kernel.org>; Tue, 04 Dec 2012 13:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=laTmuIP8aoJGGoEAHHyZf7WnDeLbv3V0L6qH+BbYQKI=; b=llwzup0n5hGYphAo0vrK7yxFd6ZCsOGDWP40keNJ4SH+MTw/r5Q2BRNGVSX60l6TAn hYUqYbaIFWbesZM9Dw52SBflg1o2hq9Larg6cOww/wvAf9nQ6no7xhIX7xaNVGkDtbAK TAjDUh9MSefTtKO0QSUEnRcIWwjXBDGxnkPpDoNoP3R/LA7xKZi7Nq4ZH9VlRc7gUQEz QS0ukbBuBAg0WDxw8CXlrnVkbm8tkfIMjxCHa2XZJZAJR9MnaVEBoXCdAEvy3BUJKw4D qrHq2xkHCx7/FcrTI7jzjyY/OOcSg2tjsqxPQx7q8kozfdFFTbZ6oU+MnNIfBc5UjSZn O+Sw== Received: by 10.204.147.135 with SMTP id l7mr4640084bkv.119.1354655210065; Tue, 04 Dec 2012 13:06:50 -0800 (PST) Received: from Athlon64X2-5000.site (ip-37-24-90-62.unitymediagroup.de. [37.24.90.62]) by mx.google.com with ESMTPS id l17sm2388025bkw.12.2012.12.04.13.06.47 (version=SSLv3 cipher=OTHER); Tue, 04 Dec 2012 13:06:48 -0800 (PST) Message-ID: <50BE65F0.8020303@googlemail.com> Date: Tue, 04 Dec 2012 22:06:56 +0100 From: =?ISO-8859-1?Q?Frank_Sch=E4fer?= <fschaefer.oss@googlemail.com> User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Matthew Gyurgyik <matthew@pyther.net> CC: Devin Heitmueller <dheitmueller@kernellabs.com>, Antti Palosaari <crope@iki.fi>, linux-media@vger.kernel.org Subject: Re: em28xx: msi Digivox ATSC board id [0db0:8810] References: <50B5779A.9090807@pyther.net> <50B67851.2010808@googlemail.com> <50B69037.3080205@pyther.net> <50B6967C.9070801@iki.fi> <50B6C2DF.4020509@pyther.net> <50B6C530.4010701@iki.fi> <50B7B768.5070008@googlemail.com> <50B80FBB.5030208@pyther.net> <50BB3F2C.5080107@googlemail.com> <50BB6451.7080601@iki.fi> <50BB8D72.8050803@googlemail.com> <50BCEC60.4040206@googlemail.com> <50BD5CC3.1030100@pyther.net> <CAGoCfiyNrHS9TpmOk8FKhzzViNCxazKqAOmG0S+DMRr3AQ8Gbg@mail.gmail.com> <50BD6310.8000808@pyther.net> <CAGoCfiwr88F3TW9Q_Pk7B_jTf=N9=Zn6rcERSJ4tV75sKyyRMw@mail.gmail.com> In-Reply-To: <CAGoCfiwr88F3TW9Q_Pk7B_jTf=N9=Zn6rcERSJ4tV75sKyyRMw@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------050608090201090901060606" Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.12.4.205716 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_6000_6999 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __BAT_BOUNDARY 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __MOZILLA_USER_AGENT 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0, __YOUTUBE_RCVD 0' |
Commit Message
Frank Schaefer
Dec. 4, 2012, 9:06 p.m. UTC
Am 04.12.2012 03:58, schrieb Devin Heitmueller: > On Mon, Dec 3, 2012 at 9:42 PM, Matthew Gyurgyik <matthew@pyther.net> wrote: >>> I would try running "lsusb -v" and send the output. Make sure that >>> it's not expecting to use bulk mode for DVB (which would require >>> driver changes to support). >>> >>> Devin >>> >> Here is the output of lsusb -v >> http://pyther.net/a/digivox_atsc/patch2/lsusb.txt > Hmmm, it's isoc, so that should be ok. Maybe the 3305 TS > configuration is mismatched (serial vs. parallel). I don't recall off > the top of my head, but I think em2875 is pretty much always in serial > mode, so check the lgdt3305 config block passed in the dvb_attach() > call and see if it's the same. I double-checked the log and it is indeed set to LGDT3305_MPEG_SERIAL, but LGDT3305_TPCLK_FALLING_EDGE is used instead of LGDT3305_TPCLK_RISING_EDGE. OTOH, the KWorld A340 bord sets this to LGDT3305_MPEG_PARALLEL... Matthew, could you please test V3 of the patch ? It is written against the media_tree staging/for_v3.8 (see http://git.linuxtv.org/media_tree.git). You could also already test the remote control key map (e.g. with evtest) Regards, Frank > > Devin >
Comments
On 12/04/2012 04:06 PM, Frank Schäfer wrote: > I double-checked the log and it is indeed set to LGDT3305_MPEG_SERIAL, > but LGDT3305_TPCLK_FALLING_EDGE is used instead of > LGDT3305_TPCLK_RISING_EDGE. > OTOH, the KWorld A340 bord sets this to LGDT3305_MPEG_PARALLEL... > > Matthew, could you please test V3 of the patch ? It is written against > the media_tree staging/for_v3.8 (see http://git.linuxtv.org/media_tree.git). > You could also already test the remote control key map (e.g. with evtest) > > Regards, > Frank Version 3 has the same behavior has v2. It seems I can tune a channel, but trying to watch it fails. There is no data being set to /dev/dvb/adapter0/dvr0 Tune channel > [root@tux ~]# azap -r -c /home/pyther/channels.conf "ION LIF" > [root@tux ~]# dvbdate > dvbdate: Unable to get time from multiplex. I got further on a channel scan but then encountered some errors (no channels detected): http://pyther.net/a/digivox_atsc/patch3/scan.txt http://pyther.net/a/digivox_atsc/patch3/dmesg_after_scan.txt dmesg: http://pyther.net/a/digivox_atsc/patch3/dmesg.txt azap: http://pyther.net/a/digivox_atsc/patch3/azap.txt dvbtraffic: http://pyther.net/a/digivox_atsc/patch3/dvbtraffic.txt Matthew -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/05/2012 05:41 AM, Matthew Gyurgyik wrote: > On 12/04/2012 04:06 PM, Frank Schäfer wrote: >> I double-checked the log and it is indeed set to LGDT3305_MPEG_SERIAL, >> but LGDT3305_TPCLK_FALLING_EDGE is used instead of >> LGDT3305_TPCLK_RISING_EDGE. >> OTOH, the KWorld A340 bord sets this to LGDT3305_MPEG_PARALLEL... >> >> Matthew, could you please test V3 of the patch ? It is written against >> the media_tree staging/for_v3.8 (see >> http://git.linuxtv.org/media_tree.git). >> You could also already test the remote control key map (e.g. with evtest) >> >> Regards, >> Frank > Version 3 has the same behavior has v2. It seems I can tune a channel, > but trying to watch it fails. There is no data being set to > /dev/dvb/adapter0/dvr0 > > Tune channel >> [root@tux ~]# azap -r -c /home/pyther/channels.conf "ION LIF" > >> [root@tux ~]# dvbdate >> dvbdate: Unable to get time from multiplex. > > I got further on a channel scan but then encountered some errors (no > channels detected): > > http://pyther.net/a/digivox_atsc/patch3/scan.txt > http://pyther.net/a/digivox_atsc/patch3/dmesg_after_scan.txt > > dmesg: http://pyther.net/a/digivox_atsc/patch3/dmesg.txt > azap: http://pyther.net/a/digivox_atsc/patch3/azap.txt > dvbtraffic: http://pyther.net/a/digivox_atsc/patch3/dvbtraffic.txt > > Matthew There is something really wrong. I am not at US expert but why the hell us-Cable-Standard-center-frequencies-QAM256 scans up to 999MHz whilst demodulator max is set 858? Either one is wrong. Also, demod seems to be HAS_LOCK about all the time. As that basic LOCK flag is simply false you cannot even thing if there is correct configuration on TS interface. If you start zapping that known channel and then unplug & plug antenna cable did you see still all the time HAS_LOCK? (it should disappear when antenna cable is unplugged). regards Antti
On 12/05/2012 07:35 AM, Antti Palosaari wrote: > > There is something really wrong. > > I am not at US expert but why the hell > us-Cable-Standard-center-frequencies-QAM256 scans up to 999MHz whilst > demodulator max is set 858? Either one is wrong. > > Also, demod seems to be HAS_LOCK about all the time. As that basic > LOCK flag is simply false you cannot even thing if there is correct > configuration on TS interface. If you start zapping that known channel > and then unplug & plug antenna cable did you see still all the time > HAS_LOCK? (it should disappear when antenna cable is unplugged). > > regards > Antti > When I disconnected the coax cable, the lock went away. When I reconnected FE_HAS_LOCK came back. http://pyther.net/a/digivox_atsc/patch3/azap_disconnect_coax.txt -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/05/2012 11:35 PM, Matthew Gyurgyik wrote: > On 12/05/2012 07:35 AM, Antti Palosaari wrote: >> >> There is something really wrong. >> >> I am not at US expert but why the hell >> us-Cable-Standard-center-frequencies-QAM256 scans up to 999MHz whilst >> demodulator max is set 858? Either one is wrong. >> >> Also, demod seems to be HAS_LOCK about all the time. As that basic >> LOCK flag is simply false you cannot even thing if there is correct >> configuration on TS interface. If you start zapping that known channel >> and then unplug & plug antenna cable did you see still all the time >> HAS_LOCK? (it should disappear when antenna cable is unplugged). >> >> regards >> Antti >> > When I disconnected the coax cable, the lock went away. When I > reconnected FE_HAS_LOCK came back. > > http://pyther.net/a/digivox_atsc/patch3/azap_disconnect_coax.txt OK, fine, I was then wrong. I have to say you have a lot of channels over there what I can see from scan result [1]. Those channels which says "tuning failed" are channels where is no transmission and those "filter timeout pid" means there is ta ransmission and demod locks. Here in Finland we have only ~4 MUX DVB-T and maybe other 4 for DVB-T2. It is then actually working quite well from the developer point of view (as demod loses lock when antenna is unplugged). It means tuner and demodular are working but interface (transport stream interface, TS IF) between demod and USB-bridge is still broken. I tried to look again your sniff if I can see what it does just before streaming starts, but unfortunately there is no any mention about those streaming packets (isoc packets where picture stream is going). Did you remove those yourself? [1] http://pyther.net/a/digivox_atsc/patch3/scan.txt regards Antti
On 12/05/2012 05:01 PM, Antti Palosaari wrote: > OK, fine, I was then wrong. I have to say you have a lot of channels > over there what I can see from scan result [1]. Those channels which > says "tuning failed" are channels where is no transmission and those > "filter timeout pid" means there is ta ransmission and demod locks. > Here in Finland we have only ~4 MUX DVB-T and maybe other 4 for DVB-T2. > > It is then actually working quite well from the developer point of > view (as demod loses lock when antenna is unplugged). It means tuner > and demodular are working but interface (transport stream interface, > TS IF) between demod and USB-bridge is still broken. > > I tried to look again your sniff if I can see what it does just before > streaming starts, but unfortunately there is no any mention about > those streaming packets (isoc packets where picture stream is going). > Did you remove those yourself? > No I did not remove the the streaming packets. However I did use the parse-usbsnoop.php script to generate parsed-usbsnoop.txt. The original snooping log is 354M (I'm assuming it has stream data in it). I have put the entire log on the server ~85MB bzipped: http://pyther.net/a/digivox_atsc/UsbSnoop.log.bz2 Let me know if you think I should do another snoop. Thanks, Matthew -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/06/2012 12:33 AM, Matthew Gyurgyik wrote: > On 12/05/2012 05:01 PM, Antti Palosaari wrote: >> OK, fine, I was then wrong. I have to say you have a lot of channels >> over there what I can see from scan result [1]. Those channels which >> says "tuning failed" are channels where is no transmission and those >> "filter timeout pid" means there is ta ransmission and demod locks. >> Here in Finland we have only ~4 MUX DVB-T and maybe other 4 for DVB-T2. >> >> It is then actually working quite well from the developer point of >> view (as demod loses lock when antenna is unplugged). It means tuner >> and demodular are working but interface (transport stream interface, >> TS IF) between demod and USB-bridge is still broken. >> >> I tried to look again your sniff if I can see what it does just before >> streaming starts, but unfortunately there is no any mention about >> those streaming packets (isoc packets where picture stream is going). >> Did you remove those yourself? >> > No I did not remove the the streaming packets. However I did use the > parse-usbsnoop.php script to generate parsed-usbsnoop.txt. The original > snooping log is 354M (I'm assuming it has stream data in it). > > I have put the entire log on the server ~85MB bzipped: > http://pyther.net/a/digivox_atsc/UsbSnoop.log.bz2 > > Let me know if you think I should do another snoop. It was good snoop. I didn't saw nothing very interesting. But, I think I found the reason. Just add that one line writing 0x42 to register 0x0d. IIRC I saw earlier it caused that kind of bug... +static struct em28xx_reg_seq msi_digivox_atsc[] = { + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ + {0x0d, 0xff, 0xff, 0}, + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ {0x0d, 0x42, 0xff, 0}, + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ + { -1, -1, -1, -1}, +}; regards Antti
On 12/05/2012 07:55 PM, Antti Palosaari wrote: > > It was good snoop. I didn't saw nothing very interesting. But, I think > I found the reason. Just add that one line writing 0x42 to register > 0x0d. IIRC I saw earlier it caused that kind of bug... > > +static struct em28xx_reg_seq msi_digivox_atsc[] = { > + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ > + {0x0d, 0xff, 0xff, 0}, > + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ > {0x0d, 0x42, 0xff, 0}, > + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ > + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ > + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ > + { -1, -1, -1, -1}, > +}; > > regards > Antti > > I added that line, recompiled, tried the new module. Unfortunately there was no improvement. I didn't see any differences in any of the output (dmesg, azap). Let me know if there is any info you want me to get. Matthew -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/04/2012 04:06 PM, Frank Schäfer wrote: > > I double-checked the log and it is indeed set to LGDT3305_MPEG_SERIAL, > but LGDT3305_TPCLK_FALLING_EDGE is used instead of > LGDT3305_TPCLK_RISING_EDGE. > OTOH, the KWorld A340 bord sets this to LGDT3305_MPEG_PARALLEL... > > Matthew, could you please test V3 of the patch ? It is written against > the media_tree staging/for_v3.8 (see http://git.linuxtv.org/media_tree.git). > You could also already test the remote control key map (e.g. with evtest) I tested the remote using evtest. However, no events are generated in evtest. I verified the remote works in windows. > Regards, > Frank > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 06.12.2012 03:16, schrieb Matthew Gyurgyik: > On 12/05/2012 07:55 PM, Antti Palosaari wrote: >> >> It was good snoop. I didn't saw nothing very interesting. But, I >> think I found the reason. Just add that one line writing 0x42 to >> register 0x0d. IIRC I saw earlier it caused that kind of bug... >> >> +static struct em28xx_reg_seq msi_digivox_atsc[] = { >> + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ >> + {0x0d, 0xff, 0xff, 0}, >> + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ >> {0x0d, 0x42, 0xff, 0}, >> + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ >> + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ >> + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ >> + { -1, -1, -1, -1}, >> +}; >> >> regards >> Antti >> >> > I added that line, recompiled, tried the new module. Unfortunately > there was no improvement. I didn't see any differences in any of the > output (dmesg, azap). Let me know if there is any info you want me to > get. > > Matthew Did you switch back to .mpeg_mode = LGDT3305_MPEG_SERIAL, .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before testing this ? You could also play with the other gpio settings. And the last idea (at the moment): + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { + .name = "MSI DIGIVOX ATSC", + .dvb_gpio = msi_digivox_atsc, + .has_dvb = 1, + .tuner_type = TUNER_ABSENT, + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess from looking at the picture */ + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | + EM28XX_I2C_CLK_WAIT_ENABLE | + EM28XX_I2C_FREQ_100_KHZ, + }, => change .xclk to 0x0f. We know that 12MHz is the right xclk setting, which means 0x07. But OTOH the Windows drivers seems to use 0x0f instead and we don't what 0x0f means... Hope this helps, Frank -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 06.12.2012 03:32, schrieb Matthew Gyurgyik: > On 12/04/2012 04:06 PM, Frank Schäfer wrote: >> >> I double-checked the log and it is indeed set to LGDT3305_MPEG_SERIAL, >> but LGDT3305_TPCLK_FALLING_EDGE is used instead of >> LGDT3305_TPCLK_RISING_EDGE. >> OTOH, the KWorld A340 bord sets this to LGDT3305_MPEG_PARALLEL... >> >> Matthew, could you please test V3 of the patch ? It is written against >> the media_tree staging/for_v3.8 (see >> http://git.linuxtv.org/media_tree.git). >> You could also already test the remote control key map (e.g. with >> evtest) > I tested the remote using evtest. However, no events are generated in > evtest. I verified the remote works in windows. Ok :( I'm not sure if it makes sense to test other maps at the moment. >> Regards, >> Frank >> > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 6, 2012 at 4:49 PM, Frank Schäfer <fschaefer.oss@googlemail.com> wrote: > > Am 06.12.2012 03:16, schrieb Matthew Gyurgyik: > > On 12/05/2012 07:55 PM, Antti Palosaari wrote: > >> > >> It was good snoop. I didn't saw nothing very interesting. But, I > >> think I found the reason. Just add that one line writing 0x42 to > >> register 0x0d. IIRC I saw earlier it caused that kind of bug... > >> > >> +static struct em28xx_reg_seq msi_digivox_atsc[] = { > >> + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ > >> + {0x0d, 0xff, 0xff, 0}, > >> + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ > >> {0x0d, 0x42, 0xff, 0}, > >> + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ > >> + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ > >> + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ > >> + { -1, -1, -1, -1}, > >> +}; > >> > >> regards > >> Antti > >> > >> > > I added that line, recompiled, tried the new module. Unfortunately > > there was no improvement. I didn't see any differences in any of the > > output (dmesg, azap). Let me know if there is any info you want me to > > get. > > > > Matthew > > Did you switch back to > > .mpeg_mode = LGDT3305_MPEG_SERIAL, > .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, > > in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before > testing this ? > > You could also play with the other gpio settings. > > And the last idea (at the moment): > > + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) > + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ > + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { > + .name = "MSI DIGIVOX ATSC", > + .dvb_gpio = msi_digivox_atsc, > + .has_dvb = 1, > + .tuner_type = TUNER_ABSENT, > + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess > from looking at the picture */ > + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ > + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | > + EM28XX_I2C_CLK_WAIT_ENABLE | > + EM28XX_I2C_FREQ_100_KHZ, > + }, > > => change .xclk to 0x0f. > We know that 12MHz is the right xclk setting, which means 0x07. But OTOH > the Windows drivers seems to use 0x0f instead and we don't what 0x0f > means... > > Hope this helps, > Frank I'm pretty sure the XCLK register isn't used at all on the em2874 (it's probably being set in the Windows driver because of some shared code with the older devices). Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 06.12.2012 22:57, schrieb Devin Heitmueller: > On Thu, Dec 6, 2012 at 4:49 PM, Frank Schäfer > <fschaefer.oss@googlemail.com> wrote: >> Am 06.12.2012 03:16, schrieb Matthew Gyurgyik: >>> On 12/05/2012 07:55 PM, Antti Palosaari wrote: >>>> It was good snoop. I didn't saw nothing very interesting. But, I >>>> think I found the reason. Just add that one line writing 0x42 to >>>> register 0x0d. IIRC I saw earlier it caused that kind of bug... >>>> >>>> +static struct em28xx_reg_seq msi_digivox_atsc[] = { >>>> + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ >>>> + {0x0d, 0xff, 0xff, 0}, >>>> + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ >>>> {0x0d, 0x42, 0xff, 0}, >>>> + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ >>>> + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ >>>> + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ >>>> + { -1, -1, -1, -1}, >>>> +}; >>>> >>>> regards >>>> Antti >>>> >>>> >>> I added that line, recompiled, tried the new module. Unfortunately >>> there was no improvement. I didn't see any differences in any of the >>> output (dmesg, azap). Let me know if there is any info you want me to >>> get. >>> >>> Matthew >> Did you switch back to >> >> .mpeg_mode = LGDT3305_MPEG_SERIAL, >> .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, >> >> in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before >> testing this ? >> >> You could also play with the other gpio settings. >> >> And the last idea (at the moment): >> >> + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) >> + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ >> + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { >> + .name = "MSI DIGIVOX ATSC", >> + .dvb_gpio = msi_digivox_atsc, >> + .has_dvb = 1, >> + .tuner_type = TUNER_ABSENT, >> + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess >> from looking at the picture */ >> + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ >> + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | >> + EM28XX_I2C_CLK_WAIT_ENABLE | >> + EM28XX_I2C_FREQ_100_KHZ, >> + }, >> >> => change .xclk to 0x0f. >> We know that 12MHz is the right xclk setting, which means 0x07. But OTOH >> the Windows drivers seems to use 0x0f instead and we don't what 0x0f >> means... >> >> Hope this helps, >> Frank > I'm pretty sure the XCLK register isn't used at all on the em2874 > (it's probably being set in the Windows driver because of some shared > code with the older devices). That's possible, because Matthews log doesn't show any access to this register. If it is not used, the question is if writing 0x07 to this register can cause any trouble... Frank > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 6, 2012 at 5:01 PM, Frank Schäfer <fschaefer.oss@googlemail.com> wrote: > That's possible, because Matthews log doesn't show any access to this > register. > If it is not used, the question is if writing 0x07 to this register can > cause any trouble... Historically speaking, on that family of devices registers that are no longer used get treated as scratch registers (meaning writing to them has no adverse effect). Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 06.12.2012 23:03, schrieb Devin Heitmueller: > On Thu, Dec 6, 2012 at 5:01 PM, Frank Schäfer > <fschaefer.oss@googlemail.com> wrote: >> That's possible, because Matthews log doesn't show any access to this >> register. >> If it is not used, the question is if writing 0x07 to this register can >> cause any trouble... > Historically speaking, on that family of devices registers that are no > longer used get treated as scratch registers (meaning writing to them > has no adverse effect). Wow, seems like chip manufactures CAN make sane hardware design decisions after all ! :D > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/06/2012 04:49 PM, Frank Schäfer wrote: > > Did you switch back to > > .mpeg_mode = LGDT3305_MPEG_SERIAL, > .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, > > in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before > testing this ? I did not, but switching back doesn't help. > You could also play with the other gpio settings. Can you give me some examples of what I might want to try. I don't really understand these gpio settings. > And the last idea (at the moment): > > + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) > + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ > + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { > + .name = "MSI DIGIVOX ATSC", > + .dvb_gpio = msi_digivox_atsc, > + .has_dvb = 1, > + .tuner_type = TUNER_ABSENT, > + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess > from looking at the picture */ > + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ > + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | > + EM28XX_I2C_CLK_WAIT_ENABLE | > + EM28XX_I2C_FREQ_100_KHZ, > + }, > > => change .xclk to 0x0f. > We know that 12MHz is the right xclk setting, which means 0x07. But OTOH > the Windows drivers seems to use 0x0f instead and we don't what 0x0f > means... Unfortunately, this didn't make a difference either. Here is my current sent of changes against upstream: http://pyther.net/a/digivox_atsc/diff-Dec-06-v1.patch > Hope this helps, > Frank > > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/06/2012 04:49 PM, Frank Schäfer wrote: > > > Did you switch back to > > .mpeg_mode = LGDT3305_MPEG_SERIAL, > .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, > > in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before > testing this ? > > You could also play with the other gpio settings. > > And the last idea (at the moment): > > + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) > + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ > + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { > + .name = "MSI DIGIVOX ATSC", > + .dvb_gpio = msi_digivox_atsc, > + .has_dvb = 1, > + .tuner_type = TUNER_ABSENT, > + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess > from looking at the picture */ > + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ > + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | > + EM28XX_I2C_CLK_WAIT_ENABLE | > + EM28XX_I2C_FREQ_100_KHZ, > + }, > > => change .xclk to 0x0f. > We know that 12MHz is the right xclk setting, which means 0x07. But OTOH > the Windows drivers seems to use 0x0f instead and we don't what 0x0f > means... > > Hope this helps, > Frank > I lied, it works! I must have forgotten to do run make modules_install or something! This patch accurately states my current code changes: http://pyther.net/a/digivox_atsc/diff-Dec-06-v1.patch I will do more testing and try more channels. Playing the stream with mplayer, the audio is clearly out-of-sync. But if I can the stream to a file, it doesn't seem out-of-sync but I will do more testing and report back. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/06/2012 05:58 PM, Matthew Gyurgyik wrote: > On 12/06/2012 04:49 PM, Frank Schäfer wrote: >> >> >> Did you switch back to >> >> .mpeg_mode = LGDT3305_MPEG_SERIAL, >> .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, >> >> in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before >> testing this ? >> >> You could also play with the other gpio settings. >> >> And the last idea (at the moment): >> >> + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) >> + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ >> + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { >> + .name = "MSI DIGIVOX ATSC", >> + .dvb_gpio = msi_digivox_atsc, >> + .has_dvb = 1, >> + .tuner_type = TUNER_ABSENT, >> + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess >> from looking at the picture */ >> + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ >> + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | >> + EM28XX_I2C_CLK_WAIT_ENABLE | >> + EM28XX_I2C_FREQ_100_KHZ, >> + }, >> >> => change .xclk to 0x0f. >> We know that 12MHz is the right xclk setting, which means 0x07. But OTOH >> the Windows drivers seems to use 0x0f instead and we don't what 0x0f >> means... >> >> Hope this helps, >> Frank >> > > I lied, it works! I must have forgotten to do run make modules_install > or something! This patch accurately states my current code changes: > http://pyther.net/a/digivox_atsc/diff-Dec-06-v1.patch > > I will do more testing and try more channels. Playing the stream with > mplayer, the audio is clearly out-of-sync. But if I can the stream to > a file, it doesn't seem out-of-sync but I will do more testing and > report back. I was able to do a bit of testing tonight and this is what I found. A channel scan was unsuccessful: http://pyther.net/a/digivox_atsc/dec06/scan.txt (no errors in dmesg) Changing channels by pressing "h" in "mplayer dvb://" caused mplayer to crash and this messages to be logged in dmesg http://pyther.net/a/digivox_atsc/dec06/dmesg_mplayer_switch_channels.txt Audio is out-of-sync in mplayer. Using cache helps, but over time the audio still goes out of sync. http://pyther.net/a/digivox_atsc/dec06/mplayer_audio_out_of_sync.txt Using azap to tune and using cat /dev/dvb/adapter0/dvr0 > test.mpg to generate a test.mpg mplayer plays the file fine without audio-sync issues, but VLC and Xine refuse to play it. (is this normal?) > tux:~ $ file test.mpg > test.mpg: data I have upload a ~30 second capture from the card: http://pyther.net/a/digivox_atsc/dec06/test.mpg (not sure if its helpful or not) I really appreciate the help so far. Things are looking promising. Thanks, Matthew -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 6, 2012 at 8:40 PM, Matthew Gyurgyik <matthew@pyther.net> wrote: > I was able to do a bit of testing tonight and this is what I found. > > A channel scan was unsuccessful: > http://pyther.net/a/digivox_atsc/dec06/scan.txt (no errors in dmesg) > > Changing channels by pressing "h" in "mplayer dvb://" caused mplayer to > crash and this messages to be logged in dmesg > http://pyther.net/a/digivox_atsc/dec06/dmesg_mplayer_switch_channels.txt This looks like a combination of a misconfiguration of GPIOs and mplayer not properly handling an exception condition. You should definitely bring this up with the mplayer developers since their app shouldn't crash under this circumstance. > Audio is out-of-sync in mplayer. Using cache helps, but over time the audio > still goes out of sync. > http://pyther.net/a/digivox_atsc/dec06/mplayer_audio_out_of_sync.txt This has nothing to do with the tuner. The tuner delivers the MPEG2 stream already compressed and synchronized. If you're playback is out-of-sync, it's probably your ALSA drivers, PulseAudio, or mplayer that is the culprit. > Using azap to tune and using cat /dev/dvb/adapter0/dvr0 > test.mpg to > generate a test.mpg > > mplayer plays the file fine without audio-sync issues, but VLC and Xine > refuse to play it. (is this normal?) What errors are VLC or Xine showing? Unless the stream is really corrupt VLC and Xine should play it fine. And if the stream were corrupt it wouldn't play with mplayer either? This sounds like bugs in VLC and Xine. There's definitely something going on in the tuner which is causing the channel scan to fail (and probably the tuning failure in mplayer). But all the stuff with actual playback causing segfaults, A/V sync issues, and failures to play back in certain applications are all userland problems that you would need to raise with the developers for those respective projects. Cheers, Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/06/2012 10:21 PM, Devin Heitmueller wrote: > On Thu, Dec 6, 2012 at 8:40 PM, Matthew Gyurgyik <matthew@pyther.net> wrote: >> I was able to do a bit of testing tonight and this is what I found. >> >> A channel scan was unsuccessful: >> http://pyther.net/a/digivox_atsc/dec06/scan.txt (no errors in dmesg) >> >> Changing channels by pressing "h" in "mplayer dvb://" caused mplayer to >> crash and this messages to be logged in dmesg >> http://pyther.net/a/digivox_atsc/dec06/dmesg_mplayer_switch_channels.txt > This looks like a combination of a misconfiguration of GPIOs and > mplayer not properly handling an exception condition. You should > definitely bring this up with the mplayer developers since their app > shouldn't crash under this circumstance. Sorry I misspoke. mplayer isn't crashing, however it can't read data from the tuner and thus closes. for completeness, mplayer output: http://pyther.net/a/digivox_atsc/dec06/mplayer_channel_switch.txt > >> Audio is out-of-sync in mplayer. Using cache helps, but over time the audio >> still goes out of sync. >> http://pyther.net/a/digivox_atsc/dec06/mplayer_audio_out_of_sync.txt > This has nothing to do with the tuner. The tuner delivers the MPEG2 > stream already compressed and synchronized. If you're playback is > out-of-sync, it's probably your ALSA drivers, PulseAudio, or mplayer > that is the culprit. Ok that make sense, I'd bank it being on mplayer and how it reads the stream. > >> Using azap to tune and using cat /dev/dvb/adapter0/dvr0 > test.mpg to >> generate a test.mpg >> >> mplayer plays the file fine without audio-sync issues, but VLC and Xine >> refuse to play it. (is this normal?) > What errors are VLC or Xine showing? Unless the stream is really > corrupt VLC and Xine should play it fine. And if the stream were > corrupt it wouldn't play with mplayer either? This sounds like bugs > in VLC and Xine. I would agree with. I got the chance to test another mpeg from my other tuner (that I know works well) and had the same issue. The vlc errors consist of similar messages such as those below: > [0x7f0200c015a8] ts demux warning: lost synchro > [0x7f0200c015a8] ts demux debug: skipping 187 bytes of garbage I had thought I was able to play previous captures in VLC. I was unable to test my other card (that I know works well) last night. Now I see this is not the case, and it separate issue. > There's definitely something going on in the tuner which is causing > the channel scan to fail (and probably the tuning failure in mplayer). > But all the stuff with actual playback causing segfaults, A/V sync > issues, and failures to play back in certain applications are all > userland problems that you would need to raise with the developers for > those respective projects. > > Cheers, > > Devin > > -- > Devin J. Heitmueller - Kernel Labs > http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 06.12.2012 23:58, schrieb Matthew Gyurgyik: > On 12/06/2012 04:49 PM, Frank Schäfer wrote: >> >> >> Did you switch back to >> >> .mpeg_mode = LGDT3305_MPEG_SERIAL, >> .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, >> >> in struct lgdt3305_config em2874_lgdt3305_dev (em28xx-dvb.c) before >> testing this ? >> >> You could also play with the other gpio settings. >> >> And the last idea (at the moment): >> >> + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) >> + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ >> + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { >> + .name = "MSI DIGIVOX ATSC", >> + .dvb_gpio = msi_digivox_atsc, >> + .has_dvb = 1, >> + .tuner_type = TUNER_ABSENT, >> + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess >> from looking at the picture */ >> + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ >> + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | >> + EM28XX_I2C_CLK_WAIT_ENABLE | >> + EM28XX_I2C_FREQ_100_KHZ, >> + }, >> >> => change .xclk to 0x0f. >> We know that 12MHz is the right xclk setting, which means 0x07. But OTOH >> the Windows drivers seems to use 0x0f instead and we don't what 0x0f >> means... >> >> Hope this helps, >> Frank >> > > I lied, it works! I must have forgotten to do run make modules_install > or something! This patch accurately states my current code changes: > http://pyther.net/a/digivox_atsc/diff-Dec-06-v1.patch Great, that's a big one step forward. Based on this (your) patch, could you please verify that ist was really the adding of {0x0d, 0x42, 0xff, 0}, to struct em28xx_reg_seq msi_digivox_atsc ? The tests before this change were all made with a wrong combination of configuration values for the LGDT3305... Regards, Frank -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/08/2012 08:52 AM, Frank Schäfer wrote: >> I lied, it works! I must have forgotten to do run make modules_install >> or something! This patch accurately states my current code changes: >> http://pyther.net/a/digivox_atsc/diff-Dec-06-v1.patch > Great, that's a big one step forward. > > Based on this (your) patch, could you please verify that ist was really > the adding of > > {0x0d, 0x42, 0xff, 0}, > > to struct em28xx_reg_seq msi_digivox_atsc ? The tests before this change > were all made with a wrong combination of configuration values for the > LGDT3305... I have commented that line out and from some basic testing, it doesn't appear to change anything. I can still tune and watch a channel, scan still fails. Thanks, Matthew -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From 7f7aa989a339f9510db53662042c39551b40b0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= <fschaefer.oss@googlemail.com> Date: Tue, 4 Dec 2012 22:03:47 +0100 Subject: [PATCH] Experimental patch for the 'MSI DIGIVOX ATSC' V3 --- drivers/media/usb/em28xx/em28xx-cards.c | 30 ++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx-dvb.c | 38 +++++++++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx.h | 1 + 3 Dateien geändert, 69 Zeilen hinzugefügt(+) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 619bffb..ec3b29b 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -393,6 +393,21 @@ static struct em28xx_reg_seq pctv_520e[] = { { -1, -1, -1, -1}, }; +/* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) + * GPIO_0 - ??? (related to eeprom reading ?) + * GPIO_6 - ??? (TDA18271C2 or/and LGDT3305 reset ?) + * GPIO_7 - ??? (wakeup or stream enable ?) + */ +static struct em28xx_reg_seq msi_digivox_atsc[] = { + {EM2874_R80_GPIO, 0xff, 0xff, 50}, /* GPIO_0=1 */ + {0x0d, 0xff, 0xff, 0}, + {EM2874_R80_GPIO, 0xfe, 0xff, 0}, /* GPIO_0=0 */ + {EM2874_R80_GPIO, 0xbe, 0xff, 135}, /* GPIO_6=0 */ + {EM2874_R80_GPIO, 0xfe, 0xff, 135}, /* GPIO_6=1 */ + {EM2874_R80_GPIO, 0x7e, 0xff, 20}, /* GPIO_7=0 */ + { -1, -1, -1, -1}, +}; + /* * Board definitions */ @@ -1988,6 +2003,19 @@ struct em28xx_board em28xx_boards[] = { EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, }, + /* 0db0:8810 MSI DIGIVOX ATSC (HU345-Q) + * Empia EM2874B + TDA18271HDC2 + LGDT3305 */ + [EM2874_BOARD_MSI_DIGIVOX_ATSC] = { + .name = "MSI DIGIVOX ATSC", + .dvb_gpio = msi_digivox_atsc, + .has_dvb = 1, + .tuner_type = TUNER_ABSENT, + .ir_codes = RC_MAP_MSI_DIGIVOX_III, /* just a guess from looking at the picture */ + .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* TODO */ + .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | + EM28XX_I2C_CLK_WAIT_ENABLE | + EM28XX_I2C_FREQ_100_KHZ, + }, }; const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); @@ -2145,6 +2173,8 @@ struct usb_device_id em28xx_id_table[] = { .driver_info = EM2884_BOARD_PCTV_510E }, { USB_DEVICE(0x2013, 0x0251), .driver_info = EM2884_BOARD_PCTV_520E }, + { USB_DEVICE(0x0db0, 0x8810), + .driver_info = EM2874_BOARD_MSI_DIGIVOX_ATSC }, { }, }; MODULE_DEVICE_TABLE(usb, em28xx_id_table); diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 63f2e70..b4855c8 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c @@ -263,6 +263,18 @@ static struct lgdt3305_config em2870_lgdt3304_dev = { .qam_if_khz = 4000, }; +static struct lgdt3305_config em2874_lgdt3305_dev = { + .i2c_addr = 0x0e, + .demod_chip = LGDT3305, + .spectral_inversion = 1, + .rf_agc_loop = 0, + .mpeg_mode = LGDT3305_MPEG_PARALLEL, + .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, + .tpvalid_polarity = LGDT3305_TP_VALID_HIGH, + .vsb_if_khz = 3250, /* not confirmed with a USB log */ + .qam_if_khz = 4000, +}; + static struct s921_config sharp_isdbt = { .demod_address = 0x30 >> 1 }; @@ -713,6 +725,14 @@ static struct tda18271_config em28xx_cxd2820r_tda18271_config = { .gate = TDA18271_GATE_DIGITAL, }; +static struct tda18271_config em28xx_lgdt3305_tda18271_config = { + .std_map = &kworld_a340_std_map, /* TODO / EXPERIMENTAL */ + .gate = TDA18271_GATE_DIGITAL, + .output_opt = TDA18271_OUTPUT_LT_OFF, +/* .rf_cal_on_startup = 1, */ /* needed ??? */ +/* .delay_cal = 1, */ /* needed ??? */ +}; + static const struct tda10071_config em28xx_tda10071_config = { .i2c_address = 0x55, /* (0xaa >> 1) */ .i2c_wr_max = 64, @@ -1235,6 +1255,24 @@ static int em28xx_dvb_init(struct em28xx *dev) goto out_free; } break; + case EM2874_BOARD_MSI_DIGIVOX_ATSC: + dvb->fe[0] = dvb_attach(lgdt3305_attach, + &em2874_lgdt3305_dev, + &dev->i2c_adap); + if (dvb->fe[0]) { + /* FE 0 attach tuner */ + if (!dvb_attach(tda18271_attach, + dvb->fe[0], + 0x60, + &dev->i2c_adap, + &em28xx_lgdt3305_tda18271_config)) { + + dvb_frontend_detach(dvb->fe[0]); + result = -EINVAL; + goto out_free; + } + } + break; default: em28xx_errdev("/2: The frontend of your DVB/ATSC card" " isn't supported yet\n"); diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index 86e90d8..3102ff3 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -129,6 +129,7 @@ #define EM2884_BOARD_PCTV_510E 85 #define EM2884_BOARD_PCTV_520E 86 #define EM2884_BOARD_TERRATEC_HTC_USB_XS 87 +#define EM2874_BOARD_MSI_DIGIVOX_ATSC 88 /* Limits minimum and default number of buffers */ #define EM28XX_MIN_BUF 4 -- 1.7.10.4