Ubuntu

Lenovo IdeaPad Yoga 13: Inverted Internal microphone (phase inversion)

Reported by Szymon Acedański on 2013-10-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
David Henningsson

Bug Description

As per this meta-bug:
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1002978

Reporting for Lenovo IdeaPad Yoga 13. Inverted channel is visible when recording stereo in audacity. Mono recording via pulseaudio gives silence with occasional cracks somewhat corresponding to the sound level around. Skype and pavucontrol level gauges are also affected.

Changes in balance in pavucontrol do not help with mono recording, I don't know why.

I'm attaching two patches against oem-audio-hda-daily-dkms-0.201310111402~ubuntu13.10.1 (https://launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily); either of them fixes the problem for me (the -alt one may affect other hardware, though). No additional steps were needed after applying a patch, building and installing the package.

Output of alsa-info.sh is also attached.

Szymon Acedański (accek) wrote :
Szymon Acedański (accek) wrote :
Szymon Acedański (accek) wrote :
Szymon Acedański (accek) wrote :
description: updated

The attachment "inverted-mic-lenovo-yoga-13.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Raymond (superquad-vortex2) wrote :

but Vendor Id: 0x14f1506e identify CX20590

you need PCI SSID 17aa:3977 or codec SSID 0x17aaa001 to identify your Lenovo IdeaPad Yoga 13

Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------

00:1b.0 0403: 8086:1e20 (rev 04)
 Subsystem: 17aa:3977

!!HDA-Intel Codec information
!!-----------

Codec: Conexant CX20590
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x14f1506e
Subsystem Id: 0x17aaa001
Revision Id: 0x100003

The create_bind_cap_vol_ctl does not create any control indicating
that an inverted dmic is present. Therefore, create multiple
capture volumes in this scenario, so we always have some indication
that the internal mic is inverted.

This happens on the Lenovo Ideapad U310 as well as the Lenovo Yoga 13
(both are based on the CX20590 codec), but the fix is generic and
could be needed for other codecs/machines too.

Thanks to Szymon Acedański for the pointer and a draft patch.

BugLink: https://bugs.launchpad.net/bugs/1239392
BugLink: https://bugs.launchpad.net/bugs/1227491
Reported-by: Szymon Acedański <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/hda_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I think this fix is safe enough to send to Linus and stable, but will leave the
final judgement to Takashi.

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index ac41e9c..26ad4f0 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3531,7 +3531,7 @@ static int create_capture_mixers(struct hda_codec *codec)
   if (!multi)
    err = create_single_cap_vol_ctl(codec, n, vol, sw,
        inv_dmic);
- else if (!multi_cap_vol)
+ else if (!multi_cap_vol && !inv_dmic)
    err = create_bind_cap_vol_ctl(codec, n, vol, sw);
   else
    err = create_multi_cap_vol_ctl(codec);
--
1.7.9.5

David Henningsson (diwic) wrote :

Hi Szymon! and thanks for the pointer towards the multi_cap_vol hint. I believe I was able to come up with a more generic solution that I just sent upstream (see patch posted is previous comment).

Changed in alsa-driver (Ubuntu):
assignee: nobody → David Henningsson (diwic)
status: New → In Progress
Takashi Iwai (tiwai) wrote :

At Mon, 14 Oct 2013 10:16:22 +0200,
David Henningsson wrote:
>
> The create_bind_cap_vol_ctl does not create any control indicating
> that an inverted dmic is present. Therefore, create multiple
> capture volumes in this scenario, so we always have some indication
> that the internal mic is inverted.
>
> This happens on the Lenovo Ideapad U310 as well as the Lenovo Yoga 13
> (both are based on the CX20590 codec), but the fix is generic and
> could be needed for other codecs/machines too.
>
> Thanks to Szymon Acedański for the pointer and a draft patch.
>
> BugLink: https://bugs.launchpad.net/bugs/1239392
> BugLink: https://bugs.launchpad.net/bugs/1227491
> Reported-by: Szymon Acedański <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>
> ---
> sound/pci/hda/hda_generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I think this fix is safe enough to send to Linus and stable, but will leave the
> final judgement to Takashi.

Yes, this looks good as a stable material, as far as I've tested,
too. Applied it now. Thanks!

Takashi

>
> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
> index ac41e9c..26ad4f0 100644
> --- a/sound/pci/hda/hda_generic.c
> +++ b/sound/pci/hda/hda_generic.c
> @@ -3531,7 +3531,7 @@ static int create_capture_mixers(struct hda_codec *codec)
> if (!multi)
> err = create_single_cap_vol_ctl(codec, n, vol, sw,
> inv_dmic);
> - else if (!multi_cap_vol)
> + else if (!multi_cap_vol && !inv_dmic)
> err = create_bind_cap_vol_ctl(codec, n, vol, sw);
> else
> err = create_multi_cap_vol_ctl(codec);
> --
> 1.7.9.5
>

Szymon Acedański (accek) wrote :

Hi David! Sure, I've just tested your change and of course it works, too.

Patching patch_conexant.c is not needed anymore in this scenario, as inv_dmix flag is already set by a quirk pointed out by Raymond.

Thanks a lot, guys.

Changed in alsa-driver (Ubuntu):
status: In Progress → Fix Committed
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-saucy' to 'verification-done-saucy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-saucy
David Henningsson (diwic) wrote :

This bug came from upstream stable and thus does not require explicit verification in Ubuntu.

affects: alsa-driver (Ubuntu) → linux (Ubuntu)
tags: added: verification-done-saucy
removed: verification-needed-saucy
Launchpad Janitor (janitor) wrote :
Download full text (5.6 KiB)

This bug was fixed in the package linux - 3.11.0-14.21

---------------
linux (3.11.0-14.21) saucy; urgency=low

  [Brad Figg]

  * Release Tracking Bug
    - LP: #1250540

  [ Anthony Wong ]

  * SAUCE: Work around broken ACPI backlight on Dell Inspiron 5537
    - LP: #1231305

  [ Colin Ian King ]

  * SAUCE: eCryptfs: fix 32 bit corruption issue
    - LP: #1243636

  [ Ming Lei ]

  * SAUCE: ext4: fix performance regression in ext4_writepages
    - LP: #1242812

  [ Upstream Kernel Changes ]

  * Revert "bridge: only expire the mdb entry when query is received"
    - LP: #1249081
  * ext4: fix performance regression in writeback of random writes
    - LP: #1242812
  * be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd
    - LP: #1234019
  * tcp: TSO packets automatic sizing
    - LP: #1249081
  * tcp: TSQ can use a dynamic limit
    - LP: #1249081
  * tcp: must unclone packets before mangling them
    - LP: #1249081
  * tcp: do not forget FIN in tcp_shifted_skb()
    - LP: #1249081
  * tcp: fix incorrect ca_state in tail loss probe
    - LP: #1249081
  * net: do not call sock_put() on TIMEWAIT sockets
    - LP: #1249081
  * batman-adv: set up network coding packet handlers during module init
    - LP: #1249081
  * l2tp: fix kernel panic when using IPv4-mapped IPv6 addresses
    - LP: #1249081
  * l2tp: Fix build warning with ipv6 disabled.
    - LP: #1249081
  * net: mv643xx_eth: update statistics timer from timer context only
    - LP: #1249081
  * net: mv643xx_eth: fix orphaned statistics timer crash
    - LP: #1249081
  * net: heap overflow in __audit_sockaddr()
    - LP: #1249081
  * sit: amend "allow to use rtnl ops on fb tunnel"
    - LP: #1249081
  * proc connector: fix info leaks
    - LP: #1249081
  * ipv4: fix ineffective source address selection
    - LP: #1249081
  * can: dev: fix nlmsg size calculation in can_get_size()
    - LP: #1249081
  * net: secure_seq: Fix warning when CONFIG_IPV6 and CONFIG_INET are not
    selected
    - LP: #1249081
  * xen-netback: Don't destroy the netdev until the vif is shut down
    - LP: #1249081
  * net/mlx4_en: Rename name of mlx4_en_rx_alloc members
    - LP: #1249081
  * net/mlx4_en: Fix pages never dma unmapped on rx
    - LP: #1249081
  * net: vlan: fix nlmsg size calculation in vlan_get_size()
    - LP: #1249081
  * bridge: update mdb expiration timer upon reports.
    - LP: #1249081
  * vti: get rid of nf mark rule in prerouting
    - LP: #1249081
  * l2tp: must disable bh before calling l2tp_xmit_skb()
    - LP: #1249081
  * netem: update backlog after drop
    - LP: #1249081
  * netem: free skb's in tree on reset
    - LP: #1249081
  * farsync: fix info leak in ioctl
    - LP: #1249081
  * unix_diag: fix info leak
    - LP: #1249081
  * connector: use nlmsg_len() to check message length
    - LP: #1249081
  * bnx2x: record rx queue for LRO packets
    - LP: #1249081
  * virtio-net: don't respond to cpu hotplug notifier if we're not ready
    - LP: #1249081
  * virtio-net: refill only when device is up during setting queues
    - LP: #1249081
  * bridge: Correctly clamp MAX forward_delay when enabling STP
    - LP: #1249081
  * net: dst: provide accessor function to dst->xfrm
 ...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers