[linux-dvb] [PATCH] Twinhan + clones : Correct polarization for the DST frontend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olaf Titz wrote:

>>+            state->tx_tuna[8] =~ 0x40;  //1
>>+            state->tx_tuna[8] |= 0x40;  // 0
>>    
>>
>
>I don't know anything about that device, but this code looks wrong to
>me. The "1" line sets the whole register and the "0" line a single
>bit. Shouldn't that rather be something like
>
>  
>
>>+            state->tx_tuna[8] &= ~0x40;  //1
>>    
>>
>
>If the wanted effect is really setting the whole register to ~0x40 vs.
>all ones and the other bits are not affected independently, that
>should be reformulated just for clarity:
>
>  
>
>>+            state->tx_tuna[8] = ~0x40;  //1
>>+            state->tx_tuna[8] = ~0x00;  // 0
>>    
>>
>
>(note where the blanks are...)
>
>Olaf
>
>
>_______________________________________________
>
>linux-dvb@xxxxxxxxxxx
>http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>  
>
(One of these days I'll figure out why Thunderbird is defaulting to 
reply-to-author rather than the list)

Thanks to Olaf and Edgar for pointing this out. Assuming it's correct
(again, it works for me), here's a revised patch:

Not sure if this still applies (I'm new here :) but just in case:

Signed-off-by: Allan Stirling <Dibblahdvb0042@xxxxxxxxxx>

Cheers,

Allan.

--- ./drivers/media/dvb/bt8xx/dst.c.orig    2005-06-21
07:31:05.190721000 +0100
+++ ./drivers/media/dvb/bt8xx/dst.c    2005-06-21 07:31:10.156051000 +0100
@@ -325,12 +325,12 @@ static int dst_set_polarization(struct d
     switch (state->voltage) {
         case SEC_VOLTAGE_13:    // vertical
             printk("%s: Polarization=[Vertical]\n", __FUNCTION__);
-            state->tx_tuna[8] |= 0x40;  //1
+            state->tx_tuna[8] &= ~0x40;  //0
             break;

         case SEC_VOLTAGE_18:    // horizontal
             printk("%s: Polarization=[Horizontal]\n", __FUNCTION__);
-            state->tx_tuna[8] =~ 0x40;  // 0
+            state->tx_tuna[8] |= 0x40;  //1
             break;

         case SEC_VOLTAGE_OFF:





[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux