ALSA: hda: avoid reset of sdo_limit
[sfrench/cifs-2.6.git] / sound / hda / hdac_bus.c
index 09ddab5f5caebebe39b4a5a8363fe7fde30a696d..9766f6af87430db6068b812c7308f2767d8ad30b 100644 (file)
@@ -46,6 +46,18 @@ int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,
        INIT_LIST_HEAD(&bus->hlink_list);
        init_waitqueue_head(&bus->rirb_wq);
        bus->irq = -1;
+
+       /*
+        * Default value of '8' is as per the HD audio specification (Rev 1.0a).
+        * Following relation is used to derive STRIPE control value.
+        *  For sample rate <= 48K:
+        *   { ((num_channels * bits_per_sample) / number of SDOs) >= 8 }
+        *  For sample rate > 48K:
+        *   { ((num_channels * bits_per_sample * rate/48000) /
+        *      number of SDOs) >= 8 }
+        */
+       bus->sdo_limit = 8;
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(snd_hdac_bus_init);