<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/sound/hda/hdac_controller.c, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/sound/hda/hdac_controller.c?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/sound/hda/hdac_controller.c?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-01-14T06:40:37Z</updated>
<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>
<entry>
<title>ALSA: hda: Remove page allocation redirection</title>
<updated>2019-08-08T14:34:49Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-08-07T18:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=619a1f195f93276dc8c6e33fe057e007adc9c288'/>
<id>urn:sha1:619a1f195f93276dc8c6e33fe057e007adc9c288</id>
<content type='text'>
The HD-audio core allocates and releases pages via driver's specific
dma_alloc_pages and dma_free_pages ops defined in bus-&gt;io_ops.  This
was because some platforms require the uncached pages and the handling
of page flags had to be done locally in the driver code.

Since the recent change in ALSA core memory allocator, we can simply
pass SNDRV_DMA_TYPE_DEV_UC for the uncached pages, and the only
difference became about this type to be passed to the core allocator.
That is, it's good time for cleaning up the mess.

This patch changes the allocation code in HD-audio core to call the
core allocator directly so that we get rid of dma_alloc_pages and
dma_free_pages io_ops.  If a driver needs the uncached pages, it has
to set bus-&gt;dma_type right after the bus initialization.

This is merely a code refactoring and shouldn't bring any behavior
changes.

Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: hda: Flush interrupts on disabling</title>
<updated>2019-07-22T07:18:02Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-07-20T11:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=caa8422d01e983782548648e125fd617cadcec3f'/>
<id>urn:sha1:caa8422d01e983782548648e125fd617cadcec3f</id>
<content type='text'>
I was looking at

&lt;4&gt; [241.835158] general protection fault: 0000 [#1] PREEMPT SMP PTI
&lt;4&gt; [241.835181] CPU: 1 PID: 214 Comm: kworker/1:3 Tainted: G     U            5.2.0-CI-CI_DRM_6509+ #1
&lt;4&gt; [241.835199] Hardware name: Dell Inc.                 OptiPlex 745                 /0GW726, BIOS 2.3.1  05/21/2007
&lt;4&gt; [241.835234] Workqueue: events snd_hdac_bus_process_unsol_events [snd_hda_core]
&lt;4&gt; [241.835256] RIP: 0010:input_handle_event+0x16d/0x5e0
&lt;4&gt; [241.835270] Code: 48 8b 93 58 01 00 00 8b 52 08 89 50 04 8b 83 f8 06 00 00 48 8b 93 00 07 00 00 8d 70 01 48 8d 04 c2 83 e1 08 89 b3 f8 06 00 00 &lt;66&gt; 89 28 66 44 89 60 02 44 89 68 04 8b 93 f8 06 00 00 0f 84 fd fe
&lt;4&gt; [241.835304] RSP: 0018:ffffc9000019fda0 EFLAGS: 00010046
&lt;4&gt; [241.835317] RAX: 6b6b6b6ec6c6c6c3 RBX: ffff8880290fefc8 RCX: 0000000000000000
&lt;4&gt; [241.835332] RDX: 000000006b6b6b6b RSI: 000000006b6b6b6c RDI: 0000000000000046
&lt;4&gt; [241.835347] RBP: 0000000000000005 R08: 0000000000000000 R09: 0000000000000001
&lt;4&gt; [241.835362] R10: ffffc9000019faa0 R11: 0000000000000000 R12: 0000000000000004
&lt;4&gt; [241.835377] R13: 0000000000000000 R14: ffff8880290ff1d0 R15: 0000000000000293
&lt;4&gt; [241.835392] FS:  0000000000000000(0000) GS:ffff88803de80000(0000) knlGS:0000000000000000
&lt;4&gt; [241.835409] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&lt;4&gt; [241.835422] CR2: 00007ffe9a99e9b7 CR3: 000000002f588000 CR4: 00000000000006e0
&lt;4&gt; [241.835436] Call Trace:
&lt;4&gt; [241.835449]  input_event+0x45/0x70
&lt;4&gt; [241.835464]  snd_jack_report+0xdc/0x100
&lt;4&gt; [241.835490]  snd_hda_jack_report_sync+0x83/0xc0 [snd_hda_codec]
&lt;4&gt; [241.835512]  snd_hdac_bus_process_unsol_events+0x5a/0x70 [snd_hda_core]
&lt;4&gt; [241.835530]  process_one_work+0x245/0x610

which has the hallmarks of a worker queued from interrupt after it was
supposedly cancelled (note the POISON_FREE), and I could not see where
the interrupt would be flushed on shutdown so added the likely suspects.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111174
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus</title>
<updated>2019-07-08T12:45:34Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-07-08T12:45:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=3c53c6255d598db7084c5c3d7553d7200e857818'/>
<id>urn:sha1:3c53c6255d598db7084c5c3d7553d7200e857818</id>
<content type='text'>
ASoC: Updates for v5.3

This is a very big update, mainly thanks to Morimoto-san's refactoring
work and some fairly large new drivers.

 - Lots more work on moving towards a component based framework from
   Morimoto-san.
 - Support for force disconnecting muxes from Jerome Brunet.
 - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant
   CX2072X, Realtek RT1011 and RT1308.

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