From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWsxT-0008Ko-GD for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 15:15:12 +0200 Message-ID: <48B00D6C.8080302@gmx.de> Date: Sat, 23 Aug 2008 15:15:24 +0200 From: Eberhard Kaltenhaeuser MIME-Version: 1.0 To: linux-dvb@linuxtv.org Subject: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0551216524==" Mime-version: 1.0 Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: This is a multi-part message in MIME format. --===============0551216524== Content-Type: multipart/alternative; boundary="------------070004030101040705020702" This is a multi-part message in MIME format. --------------070004030101040705020702 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore: Aug 10 16:00:43 linvdr user.info kernel: [ 13.464026] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 10 16:00:43 linvdr user.warn kernel: [ 13.472474] adapter has MAC addr = 00:d0:5c:23:72:54 Aug 10 16:00:43 linvdr user.warn kernel: [ 13.590880] budget: A frontend driver was not found for device 1131/7146 subsystem 13c2/1016 Tested with kernel 2.6.25.11 Previous kernel versions (i.e. 2.6.20.1) did not show this problem: Aug 10 16:14:12 linvdr user.info kernel: DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 10 16:14:12 linvdr user.warn kernel: adapter has MAC addr = 00:d0:5c:23:72:54 Aug 10 16:14:12 linvdr user.warn kernel: DVB: registering frontend 1 (Samsung S5H1420 DVB-S)... Regards -- --------------070004030101040705020702 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card anymore:
Aug 10 16:00:43 linvdr user.info kernel: [   13.464026] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S  PCI)
Aug 10 16:00:43 linvdr user.warn kernel: [   13.472474] adapter has MAC addr = 00:d0:5c:23:72:54
Aug 10 16:00:43 linvdr user.warn kernel: [   13.590880] budget: A frontend driver was not found for device 1131/7146 subsystem 13c2/1016
Tested with kernel 2.6.25.11

Previous kernel versions (i.e. 2.6.20.1) did not show this problem:
Aug 10 16:14:12 linvdr user.info kernel: DVB: registering new adapter (TT-Budget/WinTV-NOVA-S  PCI)
Aug 10 16:14:12 linvdr user.warn kernel: adapter has MAC addr = 00:d0:5c:23:72:54
Aug 10 16:14:12 linvdr user.warn kernel: DVB: registering frontend 1 (Samsung S5H1420 DVB-S)...
Regards
--
Signatur_2
--------------070004030101040705020702-- --===============0551216524== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --===============0551216524==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWwoR-0006zq-Gm for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 19:22:08 +0200 From: Oliver Endriss To: linux-dvb@linuxtv.org Date: Sat, 23 Aug 2008 19:21:19 +0200 References: <48B00D6C.8080302@gmx.de> <200808231842.36465@orion.escape-edv.de> In-Reply-To: <200808231842.36465@orion.escape-edv.de> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200808231921.20076@orion.escape-edv.de> Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: linux-dvb@linuxtv.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Oliver Endriss wrote: > As there is a flag I2C_M_NOSTART in the I2C subsystem in recent kernels, > we could pass this flag to the I2C driver and add a workaround to the > i2c master_xfer function. Correction. I2C_M_NOSTART cannot be used. It removes a *start* condition, but we have to insert a *stop* condition... CU Oliver -- ---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWvN6-0001Fq-Hi for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:49:49 +0200 From: Oliver Endriss To: linux-dvb@linuxtv.org Date: Sat, 23 Aug 2008 17:48:54 +0200 References: <48B00D6C.8080302@gmx.de> <200808231711.36277@orion.escape-edv.de> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200808231748.54615@orion.escape-edv.de> Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: linux-dvb@linuxtv.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Patrick Boettcher wrote: > Hi, > > On Sat, 23 Aug 2008, Oliver Endriss wrote: > > Btw, I don't understand Patrick's workaround. > > The Flexcop i2c-interface is not very flexible. You cannot send just a > single write request with an independent read request following. Ah, ok. Maybe we should add some comments. > The same problematic applies for several USB-I2C requests as we have it in > dvb-usb at several places. > > In addition (see my other mail in that thread), sending two independent > i2c_transfers which actually belong together is not really safe. The current code in the else path will *never* work, because the tuner does not support repeated start conditions. The problem is not the I2C master (saa7146/flexcop) but the I2C slave (s5h1420). > (However > I understand that for most single-receiver boards it is no real problem, > as long as no one is using this i2c-adapter from user-space at the same > time.) True. CU Oliver -- ---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from znsun1.ifh.de ([141.34.1.16]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KWuvs-0007fg-KV for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:21:41 +0200 Received: from pub5.ifh.de (pub5.ifh.de [141.34.15.197]) by znsun1.ifh.de (8.12.11.20060614/8.12.11) with ESMTP id m7NFL3EK024271 for ; Sat, 23 Aug 2008 17:21:03 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by pub5.ifh.de (Postfix) with ESMTP id 5F1312A01D8 for ; Sat, 23 Aug 2008 17:21:03 +0200 (CEST) Date: Sat, 23 Aug 2008 17:21:03 +0200 (CEST) From: Patrick Boettcher To: linux-dvb@linuxtv.org In-Reply-To: <200808231711.36277@orion.escape-edv.de> Message-ID: References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> <200808231711.36277@orion.escape-edv.de> MIME-Version: 1.0 Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Hi, On Sat, 23 Aug 2008, Oliver Endriss wrote: > Btw, I don't understand Patrick's workaround. The Flexcop i2c-interface is not very flexible. You cannot send just a single write request with an independent read request following. The same problematic applies for several USB-I2C requests as we have it in dvb-usb at several places. In addition (see my other mail in that thread), sending two independent i2c_transfers which actually belong together is not really safe. (However I understand that for most single-receiver boards it is no real problem, as long as no one is using this i2c-adapter from user-space at the same time.) Patrick. -- Mail: patrick.boettcher@desy.de WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/ _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWwCy-0004je-NO for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 18:43:25 +0200 From: Oliver Endriss To: linux-dvb@linuxtv.org Date: Sat, 23 Aug 2008 18:42:36 +0200 References: <48B00D6C.8080302@gmx.de> <200808231748.54615@orion.escape-edv.de> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200808231842.36465@orion.escape-edv.de> Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: linux-dvb@linuxtv.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Patrick Boettcher wrote: > On Sat, 23 Aug 2008, Oliver Endriss wrote: > >> In addition (see my other mail in that thread), sending two independent > >> i2c_transfers which actually belong together is not really safe. > > > > The current code in the else path will *never* work, because the tuner > > does not support repeated start conditions. The problem is not the I2C > > master (saa7146/flexcop) but the I2C slave (s5h1420). > > Wouldn't it be more correct to have a flag signaling to the > i2c_tranfer-function that a repeated start is not wanted even though it is > two i2c-messages glued (which are interpreted today as a read with > repeated start). As there is a flag I2C_M_NOSTART in the I2C subsystem in recent kernels, we could pass this flag to the I2C driver and add a workaround to the i2c master_xfer function. I remember that we had the same discussion for the stv0297 driver a long time ago. I suggested to add a workaround to the saa7146 master_xfer routine, but Johannes stated that the frontend caused the problem, and so it should be fixed there... For the stv0297 I have an experimental patch which intercepts the master_xfer routine, but this is not very nice either. Usually there is no problem with the old approach, because i2c transfers are protected by the frontend mutex. But bad things may happen if someone accesses the i2c bus from user space. :-( I'll think about the I2C_M_NOSTART mod for the master_xfer routine, but I need some time to work it out. For now we should test whether the driver works again if we put the old code into the else path. Btw, b[1] = state->shadow[(reg - 1) & 0xff]; reads shadow[255] for reg == 0. So you should change u8 shadow[255]; to u8 shadow[256]; CU Oliver -- ---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from fg-out-1718.google.com ([72.14.220.155]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KWv17-0008Kl-4b for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:27:07 +0200 Received: by fg-out-1718.google.com with SMTP id e21so510964fga.25 for ; Sat, 23 Aug 2008 08:27:00 -0700 (PDT) Message-ID: <48B02C40.6010802@gmail.com> Date: Sat, 23 Aug 2008 17:26:56 +0200 MIME-Version: 1.0 To: linux-dvb@linuxtv.org References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> In-Reply-To: From: e9hack Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Hi, it seems another card is also not working after the flexcop changes (http://linuxtv.org/pipermail/linux-dvb/2008-June/026512.html). The CableStar uses also a crazy chip (stv0297), which doesn't understand repeated start conditions. -Hartmut _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from znsun1.ifh.de ([141.34.1.16]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KWvQs-0001pO-L5 for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:53:43 +0200 Received: from pub5.ifh.de (pub5.ifh.de [141.34.15.197]) by znsun1.ifh.de (8.12.11.20060614/8.12.11) with ESMTP id m7NFr5pY027331 for ; Sat, 23 Aug 2008 17:53:05 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by pub5.ifh.de (Postfix) with ESMTP id 175C42A01D8 for ; Sat, 23 Aug 2008 17:53:05 +0200 (CEST) Date: Sat, 23 Aug 2008 17:53:05 +0200 (CEST) From: Patrick Boettcher To: linux-dvb@linuxtv.org In-Reply-To: <200808231748.54615@orion.escape-edv.de> Message-ID: References: <48B00D6C.8080302@gmx.de> <200808231711.36277@orion.escape-edv.de> <200808231748.54615@orion.escape-edv.de> MIME-Version: 1.0 Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: On Sat, 23 Aug 2008, Oliver Endriss wrote: >> In addition (see my other mail in that thread), sending two independent >> i2c_transfers which actually belong together is not really safe. > > The current code in the else path will *never* work, because the tuner > does not support repeated start conditions. The problem is not the I2C > master (saa7146/flexcop) but the I2C slave (s5h1420). Wouldn't it be more correct to have a flag signaling to the i2c_tranfer-function that a repeated start is not wanted even though it is two i2c-messages glued (which are interpreted today as a read with repeated start). Patrick. -- Mail: patrick.boettcher@desy.de WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/ _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KXAhi-0005Up-L2 for linux-dvb@linuxtv.org; Sun, 24 Aug 2008 10:12:08 +0200 Message-ID: <48B117E3.4000805@gmx.de> Date: Sun, 24 Aug 2008 10:12:19 +0200 From: Eberhard Kaltenhaeuser MIME-Version: 1.0 To: linux-dvb@linuxtv.org References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> <200808231711.36277@orion.escape-edv.de> In-Reply-To: <200808231711.36277@orion.escape-edv.de> Cc: Patrick Boettcher Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1562140334==" Mime-version: 1.0 Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: This is a multi-part message in MIME format. --===============1562140334== Content-Type: multipart/alternative; boundary="------------010301090707060501080903" This is a multi-part message in MIME format. --------------010301090707060501080903 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi Oliver, the patch fixed the problem - here the relevant part of the log: Aug 24 09:40:07 vdrdev user.info kernel: [ 13.943338] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S PCI) Aug 24 09:40:07 vdrdev user.warn kernel: [ 13.966605] adapter has MAC addr = 00:d0:5c:23:72:54 Aug 24 09:40:07 vdrdev user.warn kernel: [ 14.064407] DVB: registering frontend 1 (Samsung S5H1420/PnpNetwork PN1010 DVB-S)... Thanx to all - also to Dr.Seltsam for compiling. Eberhard Oliver Endriss schrieb: > e9hack wrote: > >> Eberhard Kaltenhaeuser schrieb: >> >>> Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card >>> anymore: >>> >>> >> I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d >> from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. >> The i2c-read code was changed from: >> >> if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) >> return ret; >> >> if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) >> return ret; >> >> to: >> if (state->config->repeated_start_workaround) { >> ret = i2c_transfer(state->i2c, msg, 3); >> if (ret != 3) >> return ret; >> } else { >> ret = i2c_transfer(state->i2c, &msg[1], 2); >> if (ret != 2) >> return ret; >> } >> > > I think you are right. > > Btw, I don't understand Patrick's workaround. > > As the tuner does not support repeated start conditions, the solution > is to send two separate messages, as it was before. > > Does the attached patch fix the problem? > > CU > Oliver > > > ------------------------------------------------------------------------ > > _______________________________________________ > linux-dvb mailing list > linux-dvb@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb -- ___________________________________ | | | Eberhard Kaltenhaeuser | _ | (+49/0)9135 Tel:799955 Fax:725517 | _ / )| |( \ / / | mailto:ke2705@gmx.de | \ \ _( (_ | _ _ | _) )_ (((\ \>|_/ )___________________________( \_| Hi Oliver,

the patch fixed the problem - here the relevant part of the log:

Aug 24 09:40:07 vdrdev user.info kernel: [   13.943338] DVB: registering new adapter (TT-Budget/WinTV-NOVA-S  PCI)
Aug 24 09:40:07 vdrdev user.warn kernel: [   13.966605] adapter has MAC addr = 00:d0:5c:23:72:54
Aug 24 09:40:07 vdrdev user.warn kernel: [   14.064407] DVB: registering frontend 1 (Samsung S5H1420/PnpNetwork PN1010 DVB-S)...
Thanx to all - also to Dr.Seltsam for compiling.
Eberhard

Oliver Endriss schrieb:
e9hack wrote:
  
Eberhard Kaltenhaeuser schrieb:
    
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card 
anymore:

      
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d 
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. 
The i2c-read code was changed from:

	if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1)
		return ret;

	if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1)
		return ret;

to:
	if (state->config->repeated_start_workaround) {
		ret = i2c_transfer(state->i2c, msg, 3);
		if (ret != 3)
			return ret;
	} else {
		ret = i2c_transfer(state->i2c, &msg[1], 2);
		if (ret != 2)
			return ret;
	}
    

I think you are right.

Btw, I don't understand Patrick's workaround.

As the tuner does not support repeated start conditions, the solution
is to send two separate messages, as it was before.

Does the attached patch fix the problem?

CU
Oliver

  

_______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

--
Signatur_2          ___________________________________
        |                                   |
        |      Eberhard Kaltenhaeuser       |
      _ | (+49/0)9135 Tel:799955 Fax:725517 | _
     / )|                                   |( \
    / / |       mailto:ke2705@gmx.de        | \ \
  _( (_ |  _                             _  | _) )_
 (((\ \>|_/ )___________________________( \_|</ /)))
 (\ \  \_/ /                             \ \_/  / /)
  \       /                               \       /
   \    _/                                 \_    /
   /   /                                     \   \

--------------010301090707060501080903-- --===============1562140334== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --===============1562140334==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWun6-0006sl-Ey for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:12:37 +0200 From: Oliver Endriss To: linux-dvb@linuxtv.org Date: Sat, 23 Aug 2008 17:11:35 +0200 References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> In-Reply-To: <48B01765.8020104@gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_oiCsIhs3MZrYMNW" Message-Id: <200808231711.36277@orion.escape-edv.de> Cc: Patrick Boettcher Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: linux-dvb@linuxtv.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: --Boundary-00=_oiCsIhs3MZrYMNW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline e9hack wrote: > Eberhard Kaltenhaeuser schrieb: > > Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card > > anymore: > > > > I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d > from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. > The i2c-read code was changed from: > > if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) > return ret; > > if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) > return ret; > > to: > if (state->config->repeated_start_workaround) { > ret = i2c_transfer(state->i2c, msg, 3); > if (ret != 3) > return ret; > } else { > ret = i2c_transfer(state->i2c, &msg[1], 2); > if (ret != 2) > return ret; > } I think you are right. Btw, I don't understand Patrick's workaround. As the tuner does not support repeated start conditions, the solution is to send two separate messages, as it was before. Does the attached patch fix the problem? CU Oliver -- ---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- --Boundary-00=_oiCsIhs3MZrYMNW Content-Type: text/x-diff; charset="us-ascii"; name="s5h1420_repeated_start.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="s5h1420_repeated_start.diff" diff -r 1760a612cc98 linux/drivers/media/dvb/frontends/s5h1420.c --- a/linux/drivers/media/dvb/frontends/s5h1420.c Sun Aug 03 05:02:35 2008 +0200 +++ b/linux/drivers/media/dvb/frontends/s5h1420.c Sat Aug 23 17:07:01 2008 +0200 @@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420 if (ret != 3) return ret; } else { - ret = i2c_transfer(state->i2c, &msg[1], 2); - if (ret != 2) + ret = i2c_transfer(state->i2c, &msg[1], 1); + if (ret != 1) + return ret; + ret = i2c_transfer(state->i2c, &msg[2], 1); + if (ret != 1) return ret; } --Boundary-00=_oiCsIhs3MZrYMNW Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --Boundary-00=_oiCsIhs3MZrYMNW-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KX7pD-0007T5-Ab for linux-dvb@linuxtv.org; Sun, 24 Aug 2008 07:07:43 +0200 From: Oliver Endriss To: linux-dvb@linuxtv.org Date: Sun, 24 Aug 2008 06:56:43 +0200 References: <48B00D6C.8080302@gmx.de> <200808231842.36465@orion.escape-edv.de> In-Reply-To: <200808231842.36465@orion.escape-edv.de> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_NoOsI/P0WDbNKYj" Message-Id: <200808240656.45936@orion.escape-edv.de> Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: linux-dvb@linuxtv.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: --Boundary-00=_NoOsI/P0WDbNKYj Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Oliver Endriss wrote: > Patrick Boettcher wrote: > > On Sat, 23 Aug 2008, Oliver Endriss wrote: > > >> In addition (see my other mail in that thread), sending two independent > > >> i2c_transfers which actually belong together is not really safe. > > > > > > The current code in the else path will *never* work, because the tuner > > > does not support repeated start conditions. The problem is not the I2C > > > master (saa7146/flexcop) but the I2C slave (s5h1420). > > > > Wouldn't it be more correct to have a flag signaling to the > > i2c_tranfer-function that a repeated start is not wanted even though it is > > two i2c-messages glued (which are interpreted today as a read with > > repeated start). > > I remember that we had the same discussion for the stv0297 driver a long > time ago. See http://linuxtv.org/pipermail/linux-dvb/2007-May/018122.html for this interesting discussion. Obviously the i2c maintainers were not willing to add the I2C_M_STOP flag... > For the stv0297 I have an experimental patch which intercepts the > master_xfer routine, but this is not very nice either. See attachment. It will probably not apply to the current tree, but you should get the idea. Anyway, I don't want to add this crap to a frontend driver. It does not fix the userspace issues anyway. For now I suggest to use the good old double i2c_transfer() approach for the budget driver. Btw, I still do not understand how your repeated_start_workaround works. struct i2c_msg msg[] = { { .addr = state->config->demod_address, .flags = 0, .buf = b, .len = 2 }, { .addr = state->config->demod_address, .flags = 0, .buf = ®, .len = 1 }, { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b, .len = 1 }, }; What does the flexcop master_xfer send over the i2c bus when it receives these messages? CU Oliver -- ---------------------------------------------------------------- VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/ ---------------------------------------------------------------- --Boundary-00=_NoOsI/P0WDbNKYj Content-Type: text/x-diff; charset="us-ascii"; name="stv0297_restart_workaround.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stv0297_restart_workaround.diff" diff -r 8f9147c3bacd linux/drivers/media/dvb/frontends/stv0297.c --- a/linux/drivers/media/dvb/frontends/stv0297.c Wed Aug 01 12:14:44 2007 -0300 +++ b/linux/drivers/media/dvb/frontends/stv0297.c Wed Aug 01 23:02:17 2007 +0200 @@ -35,6 +35,10 @@ struct stv0297_state { const struct stv0297_config *config; struct dvb_frontend frontend; + /* workaround, chip does not support repeated start condition */ + struct i2c_algorithm i2c_algo_virt; + struct i2c_adapter i2c_adap_virt; + unsigned long last_ber; unsigned long base_freq; }; @@ -47,6 +51,29 @@ struct stv0297_state { #define STV0297_CLOCK_KHZ 28900 + +static int stv0297_master_xfer_virt (struct i2c_adapter *adap, struct i2c_msg *msgs, int num) +{ + struct stv0297_state *state = i2c_get_adapdata(adap); + struct i2c_adapter *i2c_phys = adap->algo_data; + int i, rc; + + if (num == 2 && + msgs[0].addr == state->config->demod_address && + msgs[1].addr == state->config->demod_address && + msgs[0].flags == 0 && msgs[1].flags == I2C_M_RD) { + /* device needs a STOP between the register and data */ + for (i = 0; i < num; i++) { + rc = i2c_transfer(i2c_phys, msgs+i, 1); + if (rc != 1) + return rc; + } + rc = num; + } else + rc = i2c_transfer(i2c_phys, msgs, num); + + return rc; +} static int stv0297_writereg(struct stv0297_state *state, u8 reg, u8 data) { @@ -72,21 +99,9 @@ static int stv0297_readreg(struct stv029 {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1} }; - // this device needs a STOP between the register and data - if (state->config->stop_during_read) { - if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } - if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } - } else { - if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } + if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); + return -1; } return b1[0]; @@ -107,26 +122,13 @@ static int stv0297_readregs(struct stv02 static int stv0297_readregs(struct stv0297_state *state, u8 reg1, u8 * b, u8 len) { int ret; - struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags = 0,.buf = - ®1,.len = 1}, - {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b,.len = len} - }; - - // this device needs a STOP between the register and data - if (state->config->stop_during_read) { - if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } - if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } - } else { - if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } + struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags = 0,.buf = ®1,.len = 1}, + {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b,.len = len} + }; + + if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); + return -1; } return 0; @@ -651,15 +653,30 @@ struct dvb_frontend *stv0297_attach(cons struct stv0297_state *state = NULL; /* allocate memory for the internal state */ - state = kmalloc(sizeof(struct stv0297_state), GFP_KERNEL); + state = kzalloc(sizeof(struct stv0297_state), GFP_KERNEL); if (state == NULL) goto error; /* setup the state */ state->config = config; - state->i2c = i2c; - state->last_ber = 0; - state->base_freq = 0; + if (state->config->stop_during_read) { + state->i2c_algo_virt.master_xfer = stv0297_master_xfer_virt; + state->i2c_algo_virt.functionality = i2c->algo->functionality; + + state->i2c_adap_virt.id = i2c->id; + state->i2c_adap_virt.class = i2c->class; + state->i2c_adap_virt.algo = &state->i2c_algo_virt; + state->i2c_adap_virt.algo_data = i2c; + state->i2c_adap_virt.timeout = i2c->timeout; + state->i2c_adap_virt.retries = i2c->retries; + state->i2c_adap_virt.dev.parent = i2c->dev.parent; + i2c_set_adapdata(&state->i2c_adap_virt, state); + + if (i2c_add_adapter(&state->i2c_adap_virt) < 0) + goto error; + state->i2c = &state->i2c_adap_virt; + } else + state->i2c = i2c; /* check if the demod is there */ if ((stv0297_readreg(state, 0x80) & 0x70) != 0x20) @@ -671,6 +688,8 @@ struct dvb_frontend *stv0297_attach(cons return &state->frontend; error: + if (state && state->config->stop_during_read && state->i2c) + i2c_del_adapter(state->i2c); kfree(state); return NULL; } --Boundary-00=_NoOsI/P0WDbNKYj Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --Boundary-00=_NoOsI/P0WDbNKYj-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KYjZc-0003a9-5a for linux-dvb@linuxtv.org; Thu, 28 Aug 2008 17:38:15 +0200 Message-ID: <48B6C8D7.8000904@gmx.de> Date: Thu, 28 Aug 2008 17:48:39 +0200 From: Eberhard Kaltenhaeuser MIME-Version: 1.0 To: linux-dvb@linuxtv.org References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> <200808231711.36277@orion.escape-edv.de> In-Reply-To: <200808231711.36277@orion.escape-edv.de> Content-Type: multipart/mixed; boundary="------------000104040803060304060202" Cc: Patrick Boettcher Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing Reply-To: ke2705@gmx.de List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: This is a multi-part message in MIME format. --------------000104040803060304060202 Content-Type: multipart/alternative; boundary="------------000701050706010702000604" --------------000701050706010702000604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, against my expectation, the Nova-S SE card does not work, although the card is recognized by the kernel. Frontend modul is loaded, but no signal can be received. So VDR exists (Emergency exit) when switching to this device (i.e. to record something) Any suggestions? Eberhard Oliver Endriss wrote: >e9hack wrote: > > >>Eberhard Kaltenhaeuser schrieb: >> >> >>>Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card >>>anymore: >>> >>> >>> >>I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d >>from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. >>The i2c-read code was changed from: >> >> if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) >> return ret; >> >> if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) >> return ret; >> >>to: >> if (state->config->repeated_start_workaround) { >> ret = i2c_transfer(state->i2c, msg, 3); >> if (ret != 3) >> return ret; >> } else { >> ret = i2c_transfer(state->i2c, &msg[1], 2); >> if (ret != 2) >> return ret; >> } >> >> > >I think you are right. > >Btw, I don't understand Patrick's workaround. > >As the tuner does not support repeated start conditions, the solution >is to send two separate messages, as it was before. > >Does the attached patch fix the problem? > >CU >Oliver > > > >------------------------------------------------------------------------ > >diff -r 1760a612cc98 linux/drivers/media/dvb/frontends/s5h1420.c >--- a/linux/drivers/media/dvb/frontends/s5h1420.c Sun Aug 03 05:02:35 2008 +0200 >+++ b/linux/drivers/media/dvb/frontends/s5h1420.c Sat Aug 23 17:07:01 2008 +0200 >@@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420 > if (ret != 3) > return ret; > } else { >- ret = i2c_transfer(state->i2c, &msg[1], 2); >- if (ret != 2) >+ ret = i2c_transfer(state->i2c, &msg[1], 1); >+ if (ret != 1) >+ return ret; >+ ret = i2c_transfer(state->i2c, &msg[2], 1); >+ if (ret != 1) > return ret; > } > > > >------------------------------------------------------------------------ > >_______________________________________________ >linux-dvb mailing list >linux-dvb@linuxtv.org >http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb > --------------000701050706010702000604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello,

against my expectation, the Nova-S SE card does not work, although the card is recognized by the kernel. Frontend modul is loaded, but no signal can be received. So VDR exists (Emergency exit) when switching to this device (i.e. to record something)

Any suggestions?
Eberhard

Oliver Endriss wrote:
e9hack wrote:
  
Eberhard Kaltenhaeuser schrieb:
    
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card 
anymore:

      
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d 
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. 
The i2c-read code was changed from:

	if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1)
		return ret;

	if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1)
		return ret;

to:
	if (state->config->repeated_start_workaround) {
		ret = i2c_transfer(state->i2c, msg, 3);
		if (ret != 3)
			return ret;
	} else {
		ret = i2c_transfer(state->i2c, &msg[1], 2);
		if (ret != 2)
			return ret;
	}
    

I think you are right.

Btw, I don't understand Patrick's workaround.

As the tuner does not support repeated start conditions, the solution
is to send two separate messages, as it was before.

Does the attached patch fix the problem?

CU
Oliver

  

diff -r 1760a612cc98 linux/drivers/media/dvb/frontends/s5h1420.c --- a/linux/drivers/media/dvb/frontends/s5h1420.c Sun Aug 03 05:02:35 2008 +0200 +++ b/linux/drivers/media/dvb/frontends/s5h1420.c Sat Aug 23 17:07:01 2008 +0200 @@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420 if (ret != 3) return ret; } else { - ret = i2c_transfer(state->i2c, &msg[1], 2); - if (ret != 2) + ret = i2c_transfer(state->i2c, &msg[1], 1); + if (ret != 1) + return ret; + ret = i2c_transfer(state->i2c, &msg[2], 1); + if (ret != 1) return ret; }

_______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
--------------000701050706010702000604-- --------------000104040803060304060202 Content-Type: text/x-vcard; charset=utf-8; name="ke2705.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ke2705.vcf" begin:vcard fn:Eberhard Kaltenhaeuser n:Kaltenhaeuser;Eberhard adr;dom:;;Obermembach 6;Hessdorf;;91093 email;internet:ke2705@gmx.de tel;fax:+49 9135 725517 tel;home:+49 9135 799955 tel;cell:+49 173 3760676 version:2.1 end:vcard --------------000104040803060304060202 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --------------000104040803060304060202-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1KWxfQ-0001hj-Ik for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 20:16:53 +0200 Message-ID: <48B05420.5010807@gmx.de> Date: Sat, 23 Aug 2008 20:17:04 +0200 From: Eberhard Kaltenhaeuser MIME-Version: 1.0 To: Patrick Boettcher References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> In-Reply-To: Cc: linux-dvb@linuxtv.org Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0727566892==" Mime-version: 1.0 Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: This is a multi-part message in MIME format. --===============0727566892== Content-Type: multipart/alternative; boundary="------------010301010207010902070201" This is a multi-part message in MIME format. --------------010301010207010902070201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Patrick, sorry, actually, i have no environment to compile drivers or kernels. Eberhard Patrick Boettcher schrieb: > Hi Hartmut and Eberhard, > > thanks for pointing that out, I almost overlooked the previous mail from > Eberhard. > > Eberhard, are you able to try patches and to compile your own drivers in > order to help finding the best solution. > > One option is to put back the original code in case the > repeated-start-workaround is not set. But this one looks not very > protected. I mean between the two i2c_transfer-calls something else could > happen. > > Is there no other mean to tell to the i2c-adapter to do a repeated start > within one i2c_transfer-call? > > Another option would be to try to set the "repeated_start_workaround" > option also for the Nova SE card. > > What do you think? > > Patrick. > > -- > Mail: patrick.boettcher@desy.de > WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/ > > > On Sat, 23 Aug 2008, e9hack wrote: > > >> Eberhard Kaltenhaeuser schrieb: >> >>> Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card >>> anymore: >>> >>> >> I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d >> from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. >> The i2c-read code was changed from: >> >> if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) >> return ret; >> >> if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) >> return ret; >> >> to: >> if (state->config->repeated_start_workaround) { >> ret = i2c_transfer(state->i2c, msg, 3); >> if (ret != 3) >> return ret; >> } else { >> ret = i2c_transfer(state->i2c, &msg[1], 2); >> if (ret != 2) >> return ret; >> } >> >> -Hartmut >> >> > > _______________________________________________ > linux-dvb mailing list > linux-dvb@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb > > -- ___________________________________ | | | Eberhard Kaltenhaeuser | _ | (+49/0)9135 Tel:799955 Fax:725517 | _ / )| |( \ / / | mailto:ke2705@gmx.de | \ \ _( (_ | _ _ | _) )_ (((\ \>|_/ )___________________________( \_| Hi Patrick,

sorry, actually, i have no environment to compile drivers or kernels.

Eberhard


Patrick Boettcher schrieb:
Hi Hartmut and Eberhard,

thanks for pointing that out, I almost overlooked the previous mail from 
Eberhard.

Eberhard, are you able to try patches and to compile your own drivers in 
order to help finding the best solution.

One option is to put back the original code in case the 
repeated-start-workaround is not set. But this one looks not very 
protected. I mean between the two i2c_transfer-calls something else could 
happen.

Is there no other mean to tell to the i2c-adapter to do a repeated start 
within one i2c_transfer-call?

Another option would be to try to set the "repeated_start_workaround" 
option also for the Nova SE card.

What do you think?

Patrick.

--
   Mail: patrick.boettcher@desy.de
   WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/


On Sat, 23 Aug 2008, e9hack wrote:

  
Eberhard Kaltenhaeuser schrieb:
    
Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card
anymore:

      
I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d
from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions.
The i2c-read code was changed from:

	if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1)
		return ret;

	if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1)
		return ret;

to:
	if (state->config->repeated_start_workaround) {
		ret = i2c_transfer(state->i2c, msg, 3);
		if (ret != 3)
			return ret;
	} else {
		ret = i2c_transfer(state->i2c, &msg[1], 2);
		if (ret != 2)
			return ret;
	}

-Hartmut

    

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

  

--
Signatur_2          ___________________________________
        |                                   |
        |      Eberhard Kaltenhaeuser       |
      _ | (+49/0)9135 Tel:799955 Fax:725517 | _
     / )|                                   |( \
    / / |       mailto:ke2705@gmx.de        | \ \
  _( (_ |  _                             _  | _) )_
 (((\ \>|_/ )___________________________( \_|</ /)))
 (\ \  \_/ /                             \ \_/  / /)
  \       /                               \       /
   \    _/                                 \_    /
   /   /                                     \   \

--------------010301010207010902070201-- --===============0727566892== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb --===============0727566892==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from fk-out-0910.google.com ([209.85.128.190]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KWtd1-0002as-Jo for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 15:58:08 +0200 Received: by fk-out-0910.google.com with SMTP id f40so566854fka.1 for ; Sat, 23 Aug 2008 06:58:03 -0700 (PDT) Message-ID: <48B01765.8020104@gmail.com> Date: Sat, 23 Aug 2008 15:57:57 +0200 MIME-Version: 1.0 To: linux-dvb@linuxtv.org References: <48B00D6C.8080302@gmx.de> In-Reply-To: <48B00D6C.8080302@gmx.de> From: e9hack Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Eberhard Kaltenhaeuser schrieb: > Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card > anymore: > I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. The i2c-read code was changed from: if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) return ret; if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) return ret; to: if (state->config->repeated_start_workaround) { ret = i2c_transfer(state->i2c, msg, 3); if (ret != 3) return ret; } else { ret = i2c_transfer(state->i2c, &msg[1], 2); if (ret != 2) return ret; } -Hartmut _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from znsun1.ifh.de ([141.34.1.16]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KWukq-0006NG-J3 for linux-dvb@linuxtv.org; Sat, 23 Aug 2008 17:10:17 +0200 Date: Sat, 23 Aug 2008 17:09:37 +0200 (CEST) From: Patrick Boettcher To: e9hack In-Reply-To: <48B01765.8020104@gmail.com> Message-ID: References: <48B00D6C.8080302@gmx.de> <48B01765.8020104@gmail.com> MIME-Version: 1.0 Cc: linux-dvb@linuxtv.org Subject: Re: [linux-dvb] Support of Nova S SE DVB card missing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linux-dvb-bounces@linuxtv.org Errors-To: linux-dvb-bounces+mchehab=infradead.org@linuxtv.org List-ID: Hi Hartmut and Eberhard, thanks for pointing that out, I almost overlooked the previous mail from Eberhard. Eberhard, are you able to try patches and to compile your own drivers in order to help finding the best solution. One option is to put back the original code in case the repeated-start-workaround is not set. But this one looks not very protected. I mean between the two i2c_transfer-calls something else could happen. Is there no other mean to tell to the i2c-adapter to do a repeated start within one i2c_transfer-call? Another option would be to try to set the "repeated_start_workaround" option also for the Nova SE card. What do you think? Patrick. -- Mail: patrick.boettcher@desy.de WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/ On Sat, 23 Aug 2008, e9hack wrote: > Eberhard Kaltenhaeuser schrieb: >> Actual kernel does not support the Hauppauge WinTV Nova S SE PCI card >> anymore: >> > > I think it is a problem of this changeset http://linuxtv.org/hg/v4l-dvb/rev/358d281e6a3d > from Patrick Boettcher. The S5H1420 isn't able to understand repeated start conditions. > The i2c-read code was changed from: > > if ((ret = i2c_transfer (state->i2c, &msg1, 1)) != 1) > return ret; > > if ((ret = i2c_transfer (state->i2c, &msg2, 1)) != 1) > return ret; > > to: > if (state->config->repeated_start_workaround) { > ret = i2c_transfer(state->i2c, msg, 3); > if (ret != 3) > return ret; > } else { > ret = i2c_transfer(state->i2c, &msg[1], 2); > if (ret != 2) > return ret; > } > > -Hartmut > _______________________________________________ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb