<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/sound/hda/hdac_controller.c, branch jd/orphan-parallel</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/sound/hda/hdac_controller.c?h=jd%2Forphan-parallel</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/sound/hda/hdac_controller.c?h=jd%2Forphan-parallel'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-08-19T15:37:06Z</updated>
<entry>
<title>ALSA: hda: avoid reset of sdo_limit</title>
<updated>2020-08-19T15:37:06Z</updated>
<author>
<name>Sameer Pujar</name>
<email>spujar@nvidia.com</email>
</author>
<published>2020-08-19T15:32:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b90b925fd52c75ee7531df739d850a1f7c58ef06'/>
<id>urn:sha1:b90b925fd52c75ee7531df739d850a1f7c58ef06</id>
<content type='text'>
By default 'sdo_limit' is initialized with a default value of '8'
as per spec. This is overridden in cases where a different value is
required. However this is getting reset when snd_hdac_bus_init_chip()
is called again, which happens during runtime PM cycle.

Avoid this reset by moving 'sdo_limit' setup to 'snd_hdac_bus_init()'
function which would be called only once.

Fixes: 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sameer Pujar &lt;spujar@nvidia.com&gt;
Link: https://lore.kernel.org/r/1597851130-6765-1-git-send-email-spujar@nvidia.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Unexport some local helper functions</title>
<updated>2020-05-16T06:29:49Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-05-16T06:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b9f2d35f05308813c4c887d5c530004f01e1829c'/>
<id>urn:sha1:b9f2d35f05308813c4c887d5c530004f01e1829c</id>
<content type='text'>
snd_hdac_bus_queue_event() and snd_hdac_bus_exec_verb() are used only
internally in HD-audio core.  Let's drop the exports and move the
declarations into local.h.

Link: https://lore.kernel.org/r/20200516062854.22141-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: add member to store ratio for stripe control</title>
<updated>2020-05-04T09:51:23Z</updated>
<author>
<name>Sameer Pujar</name>
<email>spujar@nvidia.com</email>
</author>
<published>2020-05-04T08:16:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=67ae482a59e951c346b5a55a756504bc58ce7cfa'/>
<id>urn:sha1:67ae482a59e951c346b5a55a756504bc58ce7cfa</id>
<content type='text'>
Stripe control programming is governed by following formula, which is
referenced from the HD Audio specification(Revision 1.0a).
  { ((num_channels * bits_per_sample) / number of SDOs) &gt;= 8 }

Currently above is implemented in snd_hdac_get_stream_stripe_ctl().
This patch introduces a structure member to store the default factor
of '8'. If any HW wants to use a different value, this member can be
easily updated.

Signed-off-by: Sameer Pujar &lt;spujar@nvidia.com&gt;
Link: https://lore.kernel.org/r/1588580176-2801-3-git-send-email-spujar@nvidia.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Update kernel-doc function parameter descriptions</title>
<updated>2020-01-14T06:40:37Z</updated>
<author>
<name>Keyon Jie</name>
<email>yang.jie@linux.intel.com</email>
</author>
<published>2020-01-13T20:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6e57188f20ecf33185b671cff1af305d8f3bb2fe'/>
<id>urn:sha1:6e57188f20ecf33185b671cff1af305d8f3bb2fe</id>
<content type='text'>
Make W=1 throws a lot of warnings, with multiple misalignments between
function params and their descriptions.

Signed-off-by: Keyon Jie &lt;yang.jie@linux.intel.com&gt;
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200113205638.27338-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Comment about snd_hdac_bus_update_rirb() and spinlock</title>
<updated>2019-12-14T17:56:06Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-12-13T16:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=651bbb9d5161ae7170bc19fec893b8bf05fc590f'/>
<id>urn:sha1:651bbb9d5161ae7170bc19fec893b8bf05fc590f</id>
<content type='text'>
The call of snd_hdac_bus_update_rirb() needs the bus-&gt;reg_lock
spinlock protection for concurrency.  Comment about it more
explicitly.

Link: https://lore.kernel.org/r/20191213163005.19116-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Unify get_response handling</title>
<updated>2019-12-13T13:36:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-12-12T19:11:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5f2cb361d798fb39adb79fab4e5235e307c70e9a'/>
<id>urn:sha1:5f2cb361d798fb39adb79fab4e5235e307c70e9a</id>
<content type='text'>
Now most of the get_response handling became quite similar between
HDA-core and legacy drivers, and the only differences are:

- the handling of extra-long polling delay for some codecs
- the debug message for the stalled communication

and both are worth to share in the common code.

This patch unifies the code into snd_hdac_bus_get_response(), and use
this from the legacy get_response callback.  It results in a good
amount of code reduction in the end.

Reviewed-by: Kai Vehmanen &lt;kai.vehmanen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20191212191101.19517-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Use waitqueue for RIRB in HDA-core helper, too</title>
<updated>2019-12-13T13:36:44Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-12-12T19:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=89698ed5cc76d8de6c2b51d132c06bf4cd930314'/>
<id>urn:sha1:89698ed5cc76d8de6c2b51d132c06bf4cd930314</id>
<content type='text'>
This patch implements the same logic that was done for the legacy
HD-audio controller driver by the commit 88452da92ba2 ("ALSA: hda: Use
standard waitqueue for RIRB wakeup") to the HDA-core helper code,
too.  This makes snd_hdac_bus_get_response() waiting for the response
with bus-&gt;rirb_wq instead of polling when bus-&gt;polling is false.
It'll save both CPU time and response latency.

Reviewed-by: Kai Vehmanen &lt;kai.vehmanen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20191212191101.19517-2-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Use standard waitqueue for RIRB wakeup</title>
<updated>2019-12-10T17:22:46Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-12-10T14:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=88452da92ba2b264a3922218c2cec13aac51c502'/>
<id>urn:sha1:88452da92ba2b264a3922218c2cec13aac51c502</id>
<content type='text'>
The HD-audio CORB/RIRB communication was programmed in a way that was
documented in the reference in decades ago, which is essentially a
polling in the waiter side.  It's working fine but costs CPU cycles on
some platforms that support only slow communications.  Also, for some
platforms that had unreliable communications, we put longer wait time
(2 ms), which accumulate quite long time if you execute many verbs in
a shot (e.g. at the initialization or resume phase).

This patch attempts to improve the situation by introducing the
standard waitqueue in the RIRB waiter side instead of polling.  The
test results on my machine show significant improvements.  The time
spent for "cat /proc/asound/card*/codec#*" were changed like:

* Intel SKL + Realtek codec
  before the patch:
   0.00user 0.04system 0:00.10elapsed 40.0%CPU
  after the patch:
   0.00user 0.01system 0:00.10elapsed 10.0%CPU

* Nvidia GP107GL + Nvidia HDMI codec
  before the patch:
   0.00user 0.00system 0:02.76elapsed 0.0%CPU
  after the patch:
   0.00user 0.00system 0:00.01elapsed 17.0%CPU

So, for Intel chips, the total time is same, while the total time is
greatly reduced (from 2.76 to 0.01s) for Nvidia chips.
The only negative data here is the increase of CPU time for Nvidia,
but this is the unavoidable cost for faster wakeups, supposedly.

Link: https://lore.kernel.org/r/20191210145727.22054-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Revert "ALSA: hda: Flush interrupts on disabling"</title>
<updated>2019-10-28T10:47:59Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-10-28T08:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1a7f60b9df614bb36d14dc0c0bc898a31b2b506f'/>
<id>urn:sha1:1a7f60b9df614bb36d14dc0c0bc898a31b2b506f</id>
<content type='text'>
This reverts commit caa8422d01e983782548648e125fd617cadcec3f.

It turned out that this commit caused a regression at shutdown /
reboot, as the synchronize_irq() calls seems blocking the whole
shutdown.  Also another part of the change about shuffling the call
order looks suspicious; the azx_stop_chip() call disables the CORB /
RIRB while the others may still need the CORB/RIRB update.

Since the original commit itself was a cargo-fix, let's revert the
whole patch.

Fixes: caa8422d01e9 ("ALSA: hda: Flush interrupts on disabling")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205333
BugLinK: https://bugs.freedesktop.org/show_bug.cgi?id=111174
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://lore.kernel.org/r/20191028081056.22010-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'topic/hda-bus-ops-cleanup' into for-next</title>
<updated>2019-08-08T20:35:44Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-08-08T20:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3a76a41ffbf94c49245f5050be97d389b7d28102'/>
<id>urn:sha1:3a76a41ffbf94c49245f5050be97d389b7d28102</id>
<content type='text'>
Pull HD-audio bus ops cleanups.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
