Re: [PATCH v2 2/5] ALSA: hda: Add api to program stripe control bits

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

 




+    /* following is from HD audio spec */
+    for (sdo_line = max_sdo_lines; sdo_line > 0; sdo_line >>= 1) {
+        if (rate > 48000)
+            value = (channels * bits_per_sample *
+                    (rate / 48000)) / sdo_line;
+        else
+            value = channels * bits_per_sample / sdo_line;
(channels * bit_per_sample) / sdo_line as in the spec?

Though I have not used explicit braces, but as per operator precedence it will be treated the same way as it is mentioned in spec.
Let me know if you want this to be explicitly mentioned.

If you implement a spec it's better to either follow it verbatim or add a comment when you optimize parts away, that way reviewers understand your intent without having to refer to email archives. if you want to resend a v3 please add my tag for the series:

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

Thanks!


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux