<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/sound/hda, branch v4.9.120</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ALSA: hda: Drop useless WARN_ON()</title>
<updated>2018-01-02T19:35:08+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2017-12-22T09:45:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1dbcd823a302fa90766ca4eb80374031d4dea72'/>
<id>a1dbcd823a302fa90766ca4eb80374031d4dea72</id>
<content type='text'>
commit a36c2638380c0a4676647a1f553b70b20d3ebce1 upstream.

Since the commit 97cc2ed27e5a ("ALSA: hda - Fix yet another i915
pointer leftover in error path") cleared hdac_acomp pointer, the
WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give
a false-positive warning, as the function gets called no matter
whether the component is registered or not.  For fixing it, let's get
rid of the spurious WARN_ON().

Fixes: 97cc2ed27e5a ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
Reported-by: Kouta Okamoto &lt;kouta.okamoto@toshiba.co.jp&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a36c2638380c0a4676647a1f553b70b20d3ebce1 upstream.

Since the commit 97cc2ed27e5a ("ALSA: hda - Fix yet another i915
pointer leftover in error path") cleared hdac_acomp pointer, the
WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give
a false-positive warning, as the function gets called no matter
whether the component is registered or not.  For fixing it, let's get
rid of the spurious WARN_ON().

Fixes: 97cc2ed27e5a ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
Reported-by: Kouta Okamoto &lt;kouta.okamoto@toshiba.co.jp&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hda: Fix too short HDMI/DP chmap reporting</title>
<updated>2017-11-30T08:39:05+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2017-11-17T11:08:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af9642d85915920271256dab4bba0a70a21618f7'/>
<id>af9642d85915920271256dab4bba0a70a21618f7</id>
<content type='text'>
commit c2432466f583cb719b35a41e757da587d9ab1d00 upstream.

We got a regression report about the HD-audio HDMI chmap, where some
surround channels are reported as UNKNOWN.  The git bisection pointed
the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap
obj as priv data instead of codec").  The story behind scene is like
this:

- While moving the code out of the legacy HDA to the HDA common place,
  the patch modifies the code to obtain the chmap array indirectly in
  a byte array, and it expands it to kctl value array.
- At the latter operation, the size of the array is wrongly passed by
  sizeof() to the pointer.
- It can be 4 on 32bit arch, thus too short for 6+ channels.
  (And that's the reason why it didn't hit other persons; it's 8 on
  64bit arch, thus it's usually enough.)

The code was further changed meanwhile, but the problem persisted.
Let's fix it by correctly evaluating the array size.

Fixes: 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec")
Reported-by: VDR User &lt;user.vdr@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c2432466f583cb719b35a41e757da587d9ab1d00 upstream.

We got a regression report about the HD-audio HDMI chmap, where some
surround channels are reported as UNKNOWN.  The git bisection pointed
the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap
obj as priv data instead of codec").  The story behind scene is like
this:

- While moving the code out of the legacy HDA to the HDA common place,
  the patch modifies the code to obtain the chmap array indirectly in
  a byte array, and it expands it to kctl value array.
- At the latter operation, the size of the array is wrongly passed by
  sizeof() to the pointer.
- It can be 4 on 32bit arch, thus too short for 6+ channels.
  (And that's the reason why it didn't hit other persons; it's 8 on
  64bit arch, thus it's usually enough.)

The code was further changed meanwhile, but the problem persisted.
Let's fix it by correctly evaluating the array size.

Fixes: 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec")
Reported-by: VDR User &lt;user.vdr@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hda: Abort capability probe at invalid register read</title>
<updated>2017-10-27T08:38:07+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2017-10-17T14:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57ed31530cf929c754476c207db8c72edb228c5a'/>
<id>57ed31530cf929c754476c207db8c72edb228c5a</id>
<content type='text'>
commit 098a0a62c1554f5a3813ef1b8539563214ada8f6 upstream.

The loop in snd_hdac_bus_parse_capabilities() may go to nirvana when
it hits an invalid register value read:

 BUG: unable to handle kernel paging request at ffffad5dc41f3fff
 IP: pci_azx_readl+0x5/0x10 [snd_hda_intel]
 Call Trace:
  snd_hdac_bus_parse_capabilities+0x3c/0x1f0 [snd_hda_core]
  azx_probe_continue+0x7d5/0x940 [snd_hda_intel]
  .....

This happened on a new Intel machine, and we need to check the value
and abort the loop accordingly.

[Note: the fixes tag below indicates only the commit where this patch
 can be applied; the original problem was introduced even before that
 commit]

Fixes: 6720b38420a0 ("ALSA: hda - move bus_parse_capabilities to core")
Acked-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 098a0a62c1554f5a3813ef1b8539563214ada8f6 upstream.

The loop in snd_hdac_bus_parse_capabilities() may go to nirvana when
it hits an invalid register value read:

 BUG: unable to handle kernel paging request at ffffad5dc41f3fff
 IP: pci_azx_readl+0x5/0x10 [snd_hda_intel]
 Call Trace:
  snd_hdac_bus_parse_capabilities+0x3c/0x1f0 [snd_hda_core]
  azx_probe_continue+0x7d5/0x940 [snd_hda_intel]
  .....

This happened on a new Intel machine, and we need to check the value
and abort the loop accordingly.

[Note: the fixes tag below indicates only the commit where this patch
 can be applied; the original problem was introduced even before that
 commit]

Fixes: 6720b38420a0 ("ALSA: hda - move bus_parse_capabilities to core")
Acked-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hda: Fix cpu lockup when stopping the cmd dmas</title>
<updated>2017-05-25T13:44:31+00:00</updated>
<author>
<name>Jeeja KP</name>
<email>jeeja.kp@intel.com</email>
</author>
<published>2017-05-10T06:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0251f6affb1170a3c3364651a1c2757526cbfb88'/>
<id>0251f6affb1170a3c3364651a1c2757526cbfb88</id>
<content type='text'>
commit 960013762df0a214b57f2fce655422fb52bdfd2c upstream.

Using jiffies in hdac_wait_for_cmd_dmas() to determine when to time out
when interrupts are off (snd_hdac_bus_stop_cmd_io()/spin_lock_irq())
causes hard lockup so unlock while waiting using jiffies.

---&lt;-snip-&gt;---
&lt;0&gt;[ 1211.603046] NMI watchdog: Watchdog detected hard LOCKUP on cpu 3
&lt;4&gt;[ 1211.603047] Modules linked in: snd_hda_intel i915 vgem
&lt;4&gt;[ 1211.603053] irq event stamp: 13366
&lt;4&gt;[ 1211.603053] hardirqs last  enabled at (13365):
...
&lt;4&gt;[ 1211.603059] Call Trace:
&lt;4&gt;[ 1211.603059]  ? delay_tsc+0x3d/0xc0
&lt;4&gt;[ 1211.603059]  __delay+0xa/0x10
&lt;4&gt;[ 1211.603060]  __const_udelay+0x31/0x40
&lt;4&gt;[ 1211.603060]  snd_hdac_bus_stop_cmd_io+0x96/0xe0 [snd_hda_core]
&lt;4&gt;[ 1211.603060]  ? azx_dev_disconnect+0x20/0x20 [snd_hda_intel]
&lt;4&gt;[ 1211.603061]  snd_hdac_bus_stop_chip+0xb1/0x100 [snd_hda_core]
&lt;4&gt;[ 1211.603061]  azx_stop_chip+0x9/0x10 [snd_hda_codec]
&lt;4&gt;[ 1211.603061]  azx_suspend+0x72/0x220 [snd_hda_intel]
&lt;4&gt;[ 1211.603061]  pci_pm_suspend+0x71/0x140
&lt;4&gt;[ 1211.603062]  dpm_run_callback+0x6f/0x330
&lt;4&gt;[ 1211.603062]  ? pci_pm_freeze+0xe0/0xe0
&lt;4&gt;[ 1211.603062]  __device_suspend+0xf9/0x370
&lt;4&gt;[ 1211.603062]  ? dpm_watchdog_set+0x60/0x60
&lt;4&gt;[ 1211.603063]  async_suspend+0x1a/0x90
&lt;4&gt;[ 1211.603063]  async_run_entry_fn+0x34/0x160
&lt;4&gt;[ 1211.603063]  process_one_work+0x1f4/0x6d0
&lt;4&gt;[ 1211.603063]  ? process_one_work+0x16e/0x6d0
&lt;4&gt;[ 1211.603064]  worker_thread+0x49/0x4a0
&lt;4&gt;[ 1211.603064]  kthread+0x107/0x140
&lt;4&gt;[ 1211.603064]  ? process_one_work+0x6d0/0x6d0
&lt;4&gt;[ 1211.603065]  ? kthread_create_on_node+0x40/0x40
&lt;4&gt;[ 1211.603065]  ret_from_fork+0x2e/0x40

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100419
Fixes: 38b19ed7f81ec ("ALSA: hda: fix to wait for RIRB &amp; CORB DMA to set")
Reported-by: Marta Lofstedt &lt;marta.lofstedt@intel.com&gt;
Suggested-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Jeeja KP &lt;jeeja.kp@intel.com&gt;
Acked-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 960013762df0a214b57f2fce655422fb52bdfd2c upstream.

Using jiffies in hdac_wait_for_cmd_dmas() to determine when to time out
when interrupts are off (snd_hdac_bus_stop_cmd_io()/spin_lock_irq())
causes hard lockup so unlock while waiting using jiffies.

---&lt;-snip-&gt;---
&lt;0&gt;[ 1211.603046] NMI watchdog: Watchdog detected hard LOCKUP on cpu 3
&lt;4&gt;[ 1211.603047] Modules linked in: snd_hda_intel i915 vgem
&lt;4&gt;[ 1211.603053] irq event stamp: 13366
&lt;4&gt;[ 1211.603053] hardirqs last  enabled at (13365):
...
&lt;4&gt;[ 1211.603059] Call Trace:
&lt;4&gt;[ 1211.603059]  ? delay_tsc+0x3d/0xc0
&lt;4&gt;[ 1211.603059]  __delay+0xa/0x10
&lt;4&gt;[ 1211.603060]  __const_udelay+0x31/0x40
&lt;4&gt;[ 1211.603060]  snd_hdac_bus_stop_cmd_io+0x96/0xe0 [snd_hda_core]
&lt;4&gt;[ 1211.603060]  ? azx_dev_disconnect+0x20/0x20 [snd_hda_intel]
&lt;4&gt;[ 1211.603061]  snd_hdac_bus_stop_chip+0xb1/0x100 [snd_hda_core]
&lt;4&gt;[ 1211.603061]  azx_stop_chip+0x9/0x10 [snd_hda_codec]
&lt;4&gt;[ 1211.603061]  azx_suspend+0x72/0x220 [snd_hda_intel]
&lt;4&gt;[ 1211.603061]  pci_pm_suspend+0x71/0x140
&lt;4&gt;[ 1211.603062]  dpm_run_callback+0x6f/0x330
&lt;4&gt;[ 1211.603062]  ? pci_pm_freeze+0xe0/0xe0
&lt;4&gt;[ 1211.603062]  __device_suspend+0xf9/0x370
&lt;4&gt;[ 1211.603062]  ? dpm_watchdog_set+0x60/0x60
&lt;4&gt;[ 1211.603063]  async_suspend+0x1a/0x90
&lt;4&gt;[ 1211.603063]  async_run_entry_fn+0x34/0x160
&lt;4&gt;[ 1211.603063]  process_one_work+0x1f4/0x6d0
&lt;4&gt;[ 1211.603063]  ? process_one_work+0x16e/0x6d0
&lt;4&gt;[ 1211.603064]  worker_thread+0x49/0x4a0
&lt;4&gt;[ 1211.603064]  kthread+0x107/0x140
&lt;4&gt;[ 1211.603064]  ? process_one_work+0x6d0/0x6d0
&lt;4&gt;[ 1211.603065]  ? kthread_create_on_node+0x40/0x40
&lt;4&gt;[ 1211.603065]  ret_from_fork+0x2e/0x40

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100419
Fixes: 38b19ed7f81ec ("ALSA: hda: fix to wait for RIRB &amp; CORB DMA to set")
Reported-by: Marta Lofstedt &lt;marta.lofstedt@intel.com&gt;
Suggested-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Jeeja KP &lt;jeeja.kp@intel.com&gt;
Acked-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hdac: add missing \n to end of dev_err messages</title>
<updated>2016-09-16T17:23:57+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-09-16T16:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=361763127f8734b460e2452cf882272c93c26c56'/>
<id>361763127f8734b460e2452cf882272c93c26c56</id>
<content type='text'>
Trival fix, some dev_err messages are missing a \n, so add it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trival fix, some dev_err messages are missing a \n, so add it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA - Ext hda: remove bus_parse_capabilities</title>
<updated>2016-08-09T06:53:56+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2016-08-04T10:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=404735c9fd8adff8e5ad11e1f9f8db069d865698'/>
<id>404735c9fd8adff8e5ad11e1f9f8db069d865698</id>
<content type='text'>
Remove the unused one as we have moved it up to hdac core.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the unused one as we have moved it up to hdac core.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: convert users to core bus_parse_capabilities</title>
<updated>2016-08-09T06:53:56+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2016-08-04T10:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ec8ae5703da1b8bd057b4e319567ddbcac295b3a'/>
<id>ec8ae5703da1b8bd057b4e319567ddbcac295b3a</id>
<content type='text'>
Now that we have the bus parse capabilities moved to core, we need to
convert users.

The SKL driver and HDA extended lib needs to converted in single patch,
otherwise we regress on the functionality.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have the bus parse capabilities moved to core, we need to
convert users.

The SKL driver and HDA extended lib needs to converted in single patch,
otherwise we regress on the functionality.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hda - move bus_parse_capabilities to core</title>
<updated>2016-08-09T06:53:56+00:00</updated>
<author>
<name>Vinod Koul</name>
<email>vinod.koul@intel.com</email>
</author>
<published>2016-08-04T10:16:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6720b38420a01d40dbeb8ee575eb601d612de691'/>
<id>6720b38420a01d40dbeb8ee575eb601d612de691</id>
<content type='text'>
HDA capability introduced recently are move to hdac core so that it can
be used by legacy driver as well. Also move the capability pointers up
to hdac_bus object.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
HDA capability introduced recently are move to hdac core so that it can
be used by legacy driver as well. Also move the capability pointers up
to hdac_bus object.

Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ALSA: hda: Fix krealloc() with __GFP_ZERO usage</title>
<updated>2016-08-03T13:17:22+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-08-03T13:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=33baefe5e72f17a6df378e48196cd8cada11deec'/>
<id>33baefe5e72f17a6df378e48196cd8cada11deec</id>
<content type='text'>
krealloc() doesn't work always properly with __GFP_ZERO flag as
expected.  For clearing the reallocated area, we need to clear
explicitly instead.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
krealloc() doesn't work always properly with __GFP_ZERO flag as
expected.  For clearing the reallocated area, we need to clear
explicitly instead.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-next' into for-linus</title>
<updated>2016-07-25T15:01:14+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-07-25T15:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cf81d6b583444cb6f5e656f050e43413b236354e'/>
<id>cf81d6b583444cb6f5e656f050e43413b236354e</id>
<content type='text'>
Merged 4.8 changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merged 4.8 changes.
</pre>
</div>
</content>
</entry>
</feed>
