<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/sound, branch v4.7.8</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.7.8</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.7.8'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2016-10-16T15:50:36+00:00</updated>
<entry>
<title>ALSA: usb-line6: use the same declaration as definition in header for MIDI manufacturer ID</title>
<updated>2016-10-16T15:50:36+00:00</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2016-09-25T13:00:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=be794ebace984d408f8cc96befceec0959deb4ae'/>
<id>urn:sha1:be794ebace984d408f8cc96befceec0959deb4ae</id>
<content type='text'>
commit 8da08ca03b73593d5299893bf29fc08569c3fb5f upstream.

Currently, usb-line6 module exports an array of MIDI manufacturer ID and
usb-pod module uses it. However, the declaration is not the definition in
common header. The difference is explicit length of array. Although
compiler calculates it and everything goes well, it's better to use the
same representation between definition and declaration.

This commit fills the length of array for usb-line6 module. As a small
good sub-effect, this commit suppress below warnings from static analysis
by sparse v0.5.0.

sound/usb/line6/driver.c:274:43: error: cannot size expression
sound/usb/line6/driver.c:275:16: error: cannot size expression
sound/usb/line6/driver.c:276:16: error: cannot size expression
sound/usb/line6/driver.c:277:16: error: cannot size expression

Fixes: 705ececd1c60 ("Staging: add line6 usb driver")
Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: usb-audio: Extend DragonFly dB scale quirk to cover other variants</title>
<updated>2016-10-16T15:50:36+00:00</updated>
<author>
<name>Anssi Hannula</name>
<email>anssi.hannula@iki.fi</email>
</author>
<published>2016-09-23T03:43:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=972cf5ca893a5e00739c949650fffea7c8758150'/>
<id>urn:sha1:972cf5ca893a5e00739c949650fffea7c8758150</id>
<content type='text'>
commit eb1a74b7bea17eea31915c4f76385cefe69d9795 upstream.

The DragonFly quirk added in 42e3121d90f4 ("ALSA: usb-audio: Add a more
accurate volume quirk for AudioQuest DragonFly") applies a custom dB map
on the volume control when its range is reported as 0..50 (0 .. 0.2dB).

However, there exists at least one other variant (hw v1.0c, as opposed
to the tested v1.2) which reports a different non-sensical volume range
(0..53) and the custom map is therefore not applied for that device.

This results in all of the volume change appearing close to 100% on
mixer UIs that utilize the dB TLV information.

Add a fallback case where no dB TLV is reported at all if the control
range is not 0..50 but still 0..N where N &lt;= 1000 (3.9 dB). Also
restrict the quirk to only apply to the volume control as there is also
a mute control which would match the check otherwise.

Fixes: 42e3121d90f4 ("ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly")
Signed-off-by: Anssi Hannula &lt;anssi.hannula@iki.fi&gt;
Reported-by: David W &lt;regulars@d-dub.org.uk&gt;
Tested-by: David W &lt;regulars@d-dub.org.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: ali5451: Fix out-of-bound position reporting</title>
<updated>2016-10-16T15:50:36+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-09-21T12:38:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8af4012013ae33bce25b621f66cde0c3469b149d'/>
<id>urn:sha1:8af4012013ae33bce25b621f66cde0c3469b149d</id>
<content type='text'>
commit db68577966abc1aeae4ec597b3dcfa0d56e92041 upstream.

The pointer callbacks of ali5451 driver may return the value at the
boundary occasionally, and it results in the kernel warning like
  snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024

It seems that folding the position offset is enough for fixing the
warning and no ill-effect has been seen by that.

Reported-by: Enrico Mioso &lt;mrkiko.rs@gmail.com&gt;
Tested-by: Enrico Mioso &lt;mrkiko.rs@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>
</entry>
<entry>
<title>ALSA: hda - Add the top speaker pin config for HP Spectre x360</title>
<updated>2016-10-07T13:21:28+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-09-27T14:44:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=81b18fbe9829f293a24ee8d666f02968649f771e'/>
<id>urn:sha1:81b18fbe9829f293a24ee8d666f02968649f771e</id>
<content type='text'>
commit 0eec880966e77bdbee0112989a2be67d92e39929 upstream.

HP Spectre x360 with CX20724 codec has two speaker outputs while the
BIOS sets up only the bottom one (NID 0x17) and disables the top one
(NID 0x1d).

This patch adds a fixup simply defining the proper pincfg for NID 0x1d
so that the top speaker works as is.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=169071
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: hda - Fix headset mic detection problem for several Dell laptops</title>
<updated>2016-10-07T13:21:28+00:00</updated>
<author>
<name>Hui Wang</name>
<email>hui.wang@canonical.com</email>
</author>
<published>2016-09-11T03:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=28e2aad955925a5c47f3a07c9dce39192f939a63'/>
<id>urn:sha1:28e2aad955925a5c47f3a07c9dce39192f939a63</id>
<content type='text'>
commit 3f640970a41429f0a076c01270bbd014c9eae61c upstream.

One of the laptops has the codec ALC256 on it, applying the
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE can fix the problem, the rest
of laptops have the codec ALC295 on them, they are similar to machines
with ALC225, applying the ALC269_FIXUP_DELL1_MIC_NO_PRESENCE can fix
the problem.

Signed-off-by: Hui Wang &lt;hui.wang@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: hda - Adding one more ALC255 pin definition for headset problem</title>
<updated>2016-10-07T13:21:28+00:00</updated>
<author>
<name>Hui Wang</name>
<email>hui.wang@canonical.com</email>
</author>
<published>2016-09-26T02:59:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c8d80159e98279a493e50ba82167f16f42dc8fe4'/>
<id>urn:sha1:c8d80159e98279a493e50ba82167f16f42dc8fe4</id>
<content type='text'>
commit 392c9da24a994f238c5d7ea611c6245be4617014 upstream.

We have two new Dell laptop models, they have the same ALC255 pin
definition, but not in the pin quirk table yet, as a result, the
headset microphone can't work. After adding the definition in the
table, the headset microphone works well.

Signed-off-by: Hui Wang &lt;hui.wang@canonical.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ASoC: omap-mcpdm: Fix irq resource handling</title>
<updated>2016-10-07T13:21:25+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2016-08-23T07:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3157e7e748ceb7d532d43209ff5951038f3e5d7d'/>
<id>urn:sha1:3157e7e748ceb7d532d43209ff5951038f3e5d7d</id>
<content type='text'>
commit a8719670687c46ed2e904c0d05fa4cd7e4950cd1 upstream.

Fixes: ddd17531ad908 ("ASoC: omap-mcpdm: Clean up with devm_* function")

Managed irq request will not doing any good in ASoC probe level as it is
not going to free up the irq when the driver is unbound from the sound
card.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Reported-by: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ASoC: Intel: Skylake: Fix error return code in skl_probe()</title>
<updated>2016-10-07T13:21:24+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyj.lk@gmail.com</email>
</author>
<published>2016-08-12T11:45:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=44ced8fcf96783928aa4f0aa3b87721b88e562c8'/>
<id>urn:sha1:44ced8fcf96783928aa4f0aa3b87721b88e562c8</id>
<content type='text'>
commit 979cf59acc9d634cc140aadd0d2915947ab303cc upstream.

Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 87b2bdf02278 ("ASoC: Intel: Skylake: Initialize NHLT table")
Signed-off-by: Wei Yongjun &lt;weiyj.lk@gmail.com&gt;
Acked-By: Vinod Koul &lt;vinod.kou@intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: timer: Fix zero-division by continue of uninitialized instance</title>
<updated>2016-09-15T06:20:30+00:00</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2016-09-07T13:45:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1e6e4141ba10817162c847d2f71c197acd337a7a'/>
<id>urn:sha1:1e6e4141ba10817162c847d2f71c197acd337a7a</id>
<content type='text'>
commit 9f8a7658bcafb2a7853f7a2eae8a94e87e6e695b upstream.

When a user timer instance is continued without the explicit start
beforehand, the system gets eventually zero-division error like:

  divide error: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
  CPU: 1 PID: 27320 Comm: syz-executor Not tainted 4.8.0-rc3-next-20160825+ #8
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
   task: ffff88003c9b2280 task.stack: ffff880027280000
   RIP: 0010:[&lt;ffffffff858e1a6c&gt;]  [&lt;     inline     &gt;] ktime_divns include/linux/ktime.h:195
   RIP: 0010:[&lt;ffffffff858e1a6c&gt;]  [&lt;ffffffff858e1a6c&gt;] snd_hrtimer_callback+0x1bc/0x3c0 sound/core/hrtimer.c:62
  Call Trace:
   &lt;IRQ&gt;
   [&lt;     inline     &gt;] __run_hrtimer kernel/time/hrtimer.c:1238
   [&lt;ffffffff81504335&gt;] __hrtimer_run_queues+0x325/0xe70 kernel/time/hrtimer.c:1302
   [&lt;ffffffff81506ceb&gt;] hrtimer_interrupt+0x18b/0x420 kernel/time/hrtimer.c:1336
   [&lt;ffffffff8126d8df&gt;] local_apic_timer_interrupt+0x6f/0xe0 arch/x86/kernel/apic/apic.c:933
   [&lt;ffffffff86e13056&gt;] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:957
   [&lt;ffffffff86e1210c&gt;] apic_timer_interrupt+0x8c/0xa0 arch/x86/entry/entry_64.S:487
   &lt;EOI&gt;
   .....

Although a similar issue was spotted and a fix patch was merged in
commit [6b760bb2c63a: ALSA: timer: fix division by zero after
SNDRV_TIMER_IOCTL_CONTINUE], it seems covering only a part of
iceberg.

In this patch, we fix the issue a bit more drastically.  Basically the
continue of an uninitialized timer is supposed to be a fresh start, so
we do it for user timers.  For the direct snd_timer_continue() call,
there is no way to pass the initial tick value, so we kick out for the
uninitialized case.

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ALSA: timer: fix NULL pointer dereference on memory allocation failure</title>
<updated>2016-09-15T06:20:30+00:00</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2016-08-28T22:33:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f36dce606fa5677a8a9e45f36ffeb0762f8a3c4c'/>
<id>urn:sha1:f36dce606fa5677a8a9e45f36ffeb0762f8a3c4c</id>
<content type='text'>
commit 8ddc05638ee42b18ba4fe99b5fb647fa3ad20456 upstream.

I hit this with syzkaller:

    kasan: CONFIG_KASAN_INLINE enabled
    kasan: GPF could be caused by NULL-ptr deref or user memory access
    general protection fault: 0000 [#1] PREEMPT SMP KASAN
    CPU: 0 PID: 1327 Comm: a.out Not tainted 4.8.0-rc2+ #190
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
    task: ffff88011278d600 task.stack: ffff8801120c0000
    RIP: 0010:[&lt;ffffffff82c8ba07&gt;]  [&lt;ffffffff82c8ba07&gt;] snd_hrtimer_start+0x77/0x100
    RSP: 0018:ffff8801120c7a60  EFLAGS: 00010006
    RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000007
    RDX: 0000000000000009 RSI: 1ffff10023483091 RDI: 0000000000000048
    RBP: ffff8801120c7a78 R08: ffff88011a5cf768 R09: ffff88011a5ba790
    R10: 0000000000000002 R11: ffffed00234b9ef1 R12: ffff880114843980
    R13: ffffffff84213c00 R14: ffff880114843ab0 R15: 0000000000000286
    FS:  00007f72958f3700(0000) GS:ffff88011aa00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000603001 CR3: 00000001126ab000 CR4: 00000000000006f0
    Stack:
     ffff880114843980 ffff880111eb2dc0 ffff880114843a34 ffff8801120c7ad0
     ffffffff82c81ab1 0000000000000000 ffffffff842138e0 0000000100000000
     ffff880111eb2dd0 ffff880111eb2dc0 0000000000000001 ffff880111eb2dc0
    Call Trace:
     [&lt;ffffffff82c81ab1&gt;] snd_timer_start1+0x331/0x670
     [&lt;ffffffff82c85bfd&gt;] snd_timer_start+0x5d/0xa0
     [&lt;ffffffff82c8795e&gt;] snd_timer_user_ioctl+0x88e/0x2830
     [&lt;ffffffff8159f3a0&gt;] ? __follow_pte.isra.49+0x430/0x430
     [&lt;ffffffff82c870d0&gt;] ? snd_timer_pause+0x80/0x80
     [&lt;ffffffff815a26fa&gt;] ? do_wp_page+0x3aa/0x1c90
     [&lt;ffffffff8132762f&gt;] ? put_prev_entity+0x108f/0x21a0
     [&lt;ffffffff82c870d0&gt;] ? snd_timer_pause+0x80/0x80
     [&lt;ffffffff816b0733&gt;] do_vfs_ioctl+0x193/0x1050
     [&lt;ffffffff813510af&gt;] ? cpuacct_account_field+0x12f/0x1a0
     [&lt;ffffffff816b05a0&gt;] ? ioctl_preallocate+0x200/0x200
     [&lt;ffffffff81002f2f&gt;] ? syscall_trace_enter+0x3cf/0xdb0
     [&lt;ffffffff815045ba&gt;] ? __context_tracking_exit.part.4+0x9a/0x1e0
     [&lt;ffffffff81002b60&gt;] ? exit_to_usermode_loop+0x190/0x190
     [&lt;ffffffff82001a97&gt;] ? check_preemption_disabled+0x37/0x1e0
     [&lt;ffffffff81d93889&gt;] ? security_file_ioctl+0x89/0xb0
     [&lt;ffffffff816b167f&gt;] SyS_ioctl+0x8f/0xc0
     [&lt;ffffffff816b15f0&gt;] ? do_vfs_ioctl+0x1050/0x1050
     [&lt;ffffffff81005524&gt;] do_syscall_64+0x1c4/0x4e0
     [&lt;ffffffff83c32b2a&gt;] entry_SYSCALL64_slow_path+0x25/0x25
    Code: c7 c7 c4 b9 c8 82 48 89 d9 4c 89 ee e8 63 88 7f fe e8 7e 46 7b fe 48 8d 7b 48 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 &lt;0f&gt; b6 04 02 84 c0 74 04 84 c0 7e 65 80 7b 48 00 74 0e e8 52 46
    RIP  [&lt;ffffffff82c8ba07&gt;] snd_hrtimer_start+0x77/0x100
     RSP &lt;ffff8801120c7a60&gt;
    ---[ end trace 5955b08db7f2b029 ]---

This can happen if snd_hrtimer_open() fails to allocate memory and
returns an error, which is currently not checked by snd_timer_open():

    ioctl(SNDRV_TIMER_IOCTL_SELECT)
     - snd_timer_user_tselect()
	- snd_timer_close()
	   - snd_hrtimer_close()
	      - (struct snd_timer *) t-&gt;private_data = NULL
        - snd_timer_open()
           - snd_hrtimer_open()
              - kzalloc() fails; t-&gt;private_data is still NULL

    ioctl(SNDRV_TIMER_IOCTL_START)
     - snd_timer_user_start()
	- snd_timer_start()
	   - snd_timer_start1()
	      - snd_hrtimer_start()
		- t-&gt;private_data == NULL // boom

Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
