Ubuntu

System cannot detect external microphone

Reported by Emily Chien on 2013-07-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
David Henningsson
linux (Ubuntu)
Undecided
David Henningsson

Bug Description

Steps to reproduce:
1. Boot into system
2. Plug in a 3 ring Microphone
3. Launch Sound preference --> Input tab
4. Observe

Expected results: System should detect the external microphone and switch to use it
Actual results: System fail to detect the external microphone

Image: Ubuntu 12.04.2 OEM pre-install image

CPU: Intel(R) Pentium(R) CPU 2117U @ 1.80GHz (2x)
GPU: 00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09)
Manufacturer: ASUSTeK COMPUTER INC.
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.25.
Audio Codec - Conexant CX20751/2

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1198030

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
assignee: nobody → David Henningsson (diwic)
tags: added: blocks-hwcert-enablement
Download full text (4.9 KiB)

This Conexant codec has a single jack that can be used as either
headphone or mic (but not headset). The existing hp_mic functionality
does not apply here, because the mic and the HP are on separate pins.

Hence make a lighter version of what has been earlier done for Realtek
codecs.

BugLink: https://bugs.launchpad.net/bugs/1198030
Tested-by: Franz Hsieh <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_conexant.c | 79 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 78 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index de00ce1..4edd2d0 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -66,6 +66,8 @@ struct conexant_spec {
  hda_nid_t eapds[4];
  bool dynamic_eapd;

+ unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */
+
 #ifdef ENABLE_CXT_STATIC_QUIRKS
  const struct snd_kcontrol_new *mixers[5];
  int num_mixers;
@@ -3200,6 +3202,9 @@ static int cx_auto_init(struct hda_codec *codec)
  snd_hda_gen_init(codec);
  if (!spec->dynamic_eapd)
   cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
+
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
+
  return 0;
 }

@@ -3224,6 +3229,8 @@ enum {
  CXT_PINCFG_LEMOTE_A1205,
  CXT_FIXUP_STEREO_DMIC,
  CXT_FIXUP_INC_MIC_BOOST,
+ CXT_FIXUP_HEADPHONE_MIC_PIN,
+ CXT_FIXUP_HEADPHONE_MIC,
 };

 static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
@@ -3246,6 +3253,59 @@ static void cxt5066_increase_mic_boost(struct hda_codec *codec,
       (0 << AC_AMPCAP_MUTE_SHIFT));
 }

+static void cxt_update_headset_mode(struct hda_codec *codec)
+{
+ /* The verbs used in this function were tested on a Conexant CX20751/2 codec. */
+ int i;
+ bool mic_mode = false;
+ struct conexant_spec *spec = codec->spec;
+ struct auto_pin_cfg *cfg = &spec->gen.autocfg;
+
+ hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
+
+ for (i = 0; i < cfg->num_inputs; i++)
+ if (cfg->inputs[i].pin == mux_pin) {
+ mic_mode = !!cfg->inputs[i].is_headphone_mic;
+ break;
+ }
+
+ if (mic_mode) {
+ snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x7c); /* enable merged mode for analog int-mic */
+ spec->gen.hp_jack_present = false;
+ } else {
+ snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x54); /* disable merged mode for analog int-mic */
+ spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]);
+ }
+
+ snd_hda_gen_update_outputs(codec);
+}
+
+static void cxt_update_headset_mode_hook(struct hda_codec *codec,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ cxt_update_headset_mode(codec);
+}
+
+static void cxt_fixup_headphone_mic(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct conexant_spec *spec = codec->spec;
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC;
+ break;
+ case HDA_FIXUP_ACT_PROBE:
+ spec->gen.cap_sync_hook = cxt_update_headset_mode_hook;
+ spec->gen.automute_hook = cxt_update_headset_mode;
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ cxt_update_headset_mode(codec);
+ break;
+ }...

Read more...

Changed in linux (Ubuntu):
status: Confirmed → In Progress
Takashi Iwai (tiwai) wrote :
Download full text (5.3 KiB)

At Tue, 16 Jul 2013 11:48:10 +0200,
David Henningsson wrote:
>
> This Conexant codec has a single jack that can be used as either
> headphone or mic (but not headset). The existing hp_mic functionality
> does not apply here, because the mic and the HP are on separate pins.
>
> Hence make a lighter version of what has been earlier done for Realtek
> codecs.
>
> BugLink: https://bugs.launchpad.net/bugs/1198030
> Tested-by: Franz Hsieh <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>

Thanks, applied.

Takashi

> ---
> sound/pci/hda/patch_conexant.c | 79 +++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 78 insertions(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index de00ce1..4edd2d0 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -66,6 +66,8 @@ struct conexant_spec {
> hda_nid_t eapds[4];
> bool dynamic_eapd;
>
> + unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */
> +
> #ifdef ENABLE_CXT_STATIC_QUIRKS
> const struct snd_kcontrol_new *mixers[5];
> int num_mixers;
> @@ -3200,6 +3202,9 @@ static int cx_auto_init(struct hda_codec *codec)
> snd_hda_gen_init(codec);
> if (!spec->dynamic_eapd)
> cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
> +
> + snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
> +
> return 0;
> }
>
> @@ -3224,6 +3229,8 @@ enum {
> CXT_PINCFG_LEMOTE_A1205,
> CXT_FIXUP_STEREO_DMIC,
> CXT_FIXUP_INC_MIC_BOOST,
> + CXT_FIXUP_HEADPHONE_MIC_PIN,
> + CXT_FIXUP_HEADPHONE_MIC,
> };
>
> static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
> @@ -3246,6 +3253,59 @@ static void cxt5066_increase_mic_boost(struct hda_codec *codec,
> (0 << AC_AMPCAP_MUTE_SHIFT));
> }
>
> +static void cxt_update_headset_mode(struct hda_codec *codec)
> +{
> + /* The verbs used in this function were tested on a Conexant CX20751/2 codec. */
> + int i;
> + bool mic_mode = false;
> + struct conexant_spec *spec = codec->spec;
> + struct auto_pin_cfg *cfg = &spec->gen.autocfg;
> +
> + hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
> +
> + for (i = 0; i < cfg->num_inputs; i++)
> + if (cfg->inputs[i].pin == mux_pin) {
> + mic_mode = !!cfg->inputs[i].is_headphone_mic;
> + break;
> + }
> +
> + if (mic_mode) {
> + snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x7c); /* enable merged mode for analog int-mic */
> + spec->gen.hp_jack_present = false;
> + } else {
> + snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x54); /* disable merged mode for analog int-mic */
> + spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]);
> + }
> +
> + snd_hda_gen_update_outputs(codec);
> +}
> +
> +static void cxt_update_headset_mode_hook(struct hda_codec *codec,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + cxt_update_headset_mode(codec);
> +}
> +
> +static void cxt_fixup_headphone_mic(struct hda_codec *codec,
> + const struct hda_fixup *fix, int action)
> +{
> + struct conexant_spec *spec = codec->spec;
> +
> + switch (action) {
> + case HDA_FIXUP_ACT_PRE_PROBE:
> + spec->pa...

Read more...

Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Changed in hwe-next:
status: New → Fix Committed
assignee: nobody → David Henningsson (diwic)
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

This bug was fixed in the package linux - 3.12.0-1.3

---------------
linux (3.12.0-1.3) trusty; urgency=low

  [ Andy Whitcroft ]

  * [Config] arm64 -- add arch to the configuration handlers
  * [Config] arm64 -- add generic flavour
  * [Config] arm64 -- default config
  * [Config] arm64 -- fix up various FTBFS config options
  * SAUCE: arm64: export __copy_in_user to modules
  * [Config] arm64 -- disable ABI/module checks
  * [Config] arm64 -- enforcer -- add arm64 to the enforcer
  * [Config] arm64 -- enable udebs for arm64

  [ Colin Watson ]

  * [Config] Clean up various udeb Provides

  [ Paolo Pisati ]

  * [Config] AHCI_IMX=y
  * [Config] build imx*-wandboard dtbs

  [ Serge Hallyn ]

  * SAUCE: device_cgroup: remove can_attach

  [ Tim Gardner ]

  * rebase to v3.12-rc7
  * SAUCE: KVM: Fix modprobe failure for kvm_intel/kvm_amd
  * Release tracker
    - LP: #1245932

  [ Upstream Kernel Changes ]

  * rebase to v3.12-rc7
    - LP: #1180881
    - LP: #1180881
    - LP: #1217957

linux (3.12.0-0.2) trusty; urgency=low

  [ Andy Whitcroft ]

  * Revert "SAUCE: (no-up) scsi: hyper-v storage -- mark as preferring READ
    CAPACITY (16) at SPC-2"
  * Revert "SAUCE: (no-up) scsi: hyper-v storage -- mark as VPD capable at
    SPC-2"
  * Revert "SAUCE: (no-up) scsi: add scsi device flag to request READ
    CAPACITY (16) be preferred"
  * Revert "SAUCE: (no-up) scsi: add scsi device flag to request VPD pages
    be used at SPC-2"
  * Revert "overlayfs: Update to v19"
  * Revert "ubuntu: overlayfs v18 -- -- overlayfs: implement show_options"
  * Revert "ubuntu: overlayfs v18 -- -- overlayfs: add statfs support"
  * Revert "ubuntu: overlayfs v18 -- -- overlay filesystem"
  * Revert "ubuntu: overlayfs v18 -- -- vfs: introduce
    clone_private_mount()"
  * Revert "ubuntu: overlayfs v18 -- -- vfs: export do_splice_direct() to
    modules"
  * Revert "ubuntu: overlayfs v18 -- -- overlay: overlay filesystem
    documentation"
  * ubuntu: overlayfs v20 -- overlayfs: add statfs support
  * [Config] fix linux-libc-dev generation for arm64
  * [Config] fix linux-libc-dev generation for x32
  * [Config] add linux-libc-dev generation for ppc64el

  [ Erez Zadok ]

  * ubuntu: overlayfs v20 -- overlayfs: implement show_options

  [ Miklos Szeredi ]

  * ubuntu: overlayfs v20 -- vfs: add i_op->dentry_open()
  * ubuntu: overlayfs v20 -- vfs: export do_splice_direct() to modules
  * ubuntu: overlayfs v20 -- vfs: export __inode_permission() to modules
  * ubuntu: overlayfs v20 -- vfs: introduce clone_private_mount()
  * ubuntu: overlayfs v20 -- overlay filesystem
  * ubuntu: overlayfs v20 -- fs: limit filesystem stacking depth

  [ Neil Brown ]

  * ubuntu: overlayfs v20 -- overlay: overlay filesystem documentation

  [ Paolo Pisati ]

  * [Config] arm: VIRTIO_[BLK|NET|MMIO]=y

  [ Seth Forshee ]

  * SAUCE: (no-up) ACPI: Disable Windows 8 compatibility for some Lenovo
    ThinkPads
    - LP: #1183856

  [ Tim Gardner ]

  * [Config] CONFIG_CRYPTO_CRCT10DIF=y, CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m
  * rebase to v3.12-rc2
  * updateconfigs
  * [Config] disable CONFIG_FB_VESA enforcer check
  * [Config] Disable lttng for FTBS
  * rebase to v3.12-rc3
  * rebase to v...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
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
Changed in hwe-next:
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