All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC - unclear change in "[media] DiBxxxx: Codingstype updates"
@ 2016-10-08 13:57 Nicholas Mc Guire
  2016-10-10  6:31 ` Patrick Boettcher
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Mc Guire @ 2016-10-08 13:57 UTC (permalink / raw)
  To: Olivier Grenie; +Cc: linux-media, linux-kernel


Hi Olivier !

 in your commit 28fafca78797b ("[media] DiB0090: misc improvements")

 with commit message:
      This patch adds several performance improvements and prepares the
      usage of firmware-based devices.

 it seems you changed the logic of an if/else in dib0090_tune() in a way
 that I do not understand:

-                 lo6 |= (1 << 2) | 2;
-         else
-                 lo6 |= (1 << 2) | 1;
+                 lo6 |= (1 << 2) | 2;    //SigmaDelta and Dither
+         else {
+                 if (state->identity.in_soc)
+                         lo6 |= (1 << 2) | 2;    //SigmaDelta and Dither
+                 else
+                         lo6 |= (1 << 2) | 2;    //SigmaDelta and Dither
+         }

 resulting in the current code-base of:

       if (Rest > 0) {
               if (state->config->analog_output)
                       lo6 |= (1 << 2) | 2;
               else {
                       if (state->identity.in_soc)
                               lo6 |= (1 << 2) | 2;
                       else
                               lo6 |= (1 << 2) | 2;
               }
               Den = 255;
       }

 The problem now is that the if and the else(if/else) are
 all the same and thus the conditions have no effect. Further
 the origninal code actually had different if/else - so I 
 wonder if this is a cut&past bug here ?

 With no knowlege of the device providing a patch makes
 no sense as it would just be guessing - in any case this looks 
 wrong (or atleast should have a comment if it actually is correct)

 What am I missing ?

thx!
hofrat



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-16 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-08 13:57 RFC - unclear change in "[media] DiBxxxx: Codingstype updates" Nicholas Mc Guire
2016-10-10  6:31 ` Patrick Boettcher
2016-10-16 13:55   ` Nicholas Mc Guire

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.