Fix speaker volume on a Dell machine

Bug #1549660 reported by David Henningsson on 2016-02-25
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
linux (Ubuntu)
Undecided
David Henningsson

Bug Description

On one of the machines we enable, we found that the actual speaker volume did not always correspond to the volume set in alsamixer.

This bug is for tracking purposes; please do not triage.

On one of the machines we enable, we found that the actual speaker volume
did not always correspond to the volume set in alsamixer. This patch
fixes that problem.

This patch was orginally written by Kailang @ Realtek, I've rebased it
to fit sound git master.

BugLink: https://bugs.launchpad.net/bugs/1549660
Co-Authored-By: Kailang <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index efd4980..ab353b0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,

 static void alc_headset_mode_default(struct hda_codec *codec)
 {
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
+ {}
+ };
  static struct coef_fw coef0255[] = {
   WRITE_COEF(0x45, 0xc089),
   WRITE_COEF(0x45, 0xc489),
@@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
  };

  switch (codec->core.vendor_id) {
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ break;
  case 0x10ec0255:
  case 0x10ec0256:
   alc_process_coef_fw(codec, coef0255);
@@ -4749,6 +4756,7 @@ enum {
  ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
  ALC293_FIXUP_LENOVO_SPK_NOISE,
  ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
+ ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
 };

 static const struct hda_fixup alc269_fixups[] = {
@@ -5368,6 +5376,17 @@ static const struct hda_fixup alc269_fixups[] = {
   .type = HDA_FIXUP_FUNC,
   .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
  },
+ [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
+ .type = HDA_FIXUP_VERBS,
+ .v.verbs = (const struct hda_verb[]) {
+ /* Disable pass-through path for FRONT 14h */
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
+ {}
+ },
+ .chained = true,
+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+ },
 };

 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5638,10 +5657,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
  {0x21, 0x03211020}

 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
   ALC225_STANDARD_PINS,
   {0x14, 0x901701a0}),
- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
   ALC225_STANDARD_PINS,
   {0x14, 0x901701b0}),
  SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
--
1.9.1

Download full text (3.2 KiB)

On Thu, 25 Feb 2016 09:13:21 +0100,
David Henningsson wrote:
>
> On one of the machines we enable, we found that the actual speaker volume
> did not always correspond to the volume set in alsamixer. This patch
> fixes that problem.
>
> This patch was orginally written by Kailang @ Realtek, I've rebased it
> to fit sound git master.
>
> BugLink: https://bugs.launchpad.net/bugs/1549660
> Co-Authored-By: Kailang <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>

This conflicts with the latest for-linus branch right after I applied
another fixup addition. Could you again rebase to for-linus branch?

Also, I guess it deserves Cc to stable?

thanks,

Takashi

> ---
> sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index efd4980..ab353b0 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
>
> static void alc_headset_mode_default(struct hda_codec *codec)
> {
> + static struct coef_fw coef0225[] = {
> + UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
> + {}
> + };
> static struct coef_fw coef0255[] = {
> WRITE_COEF(0x45, 0xc089),
> WRITE_COEF(0x45, 0xc489),
> @@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
> };
>
> switch (codec->core.vendor_id) {
> + case 0x10ec0225:
> + alc_process_coef_fw(codec, coef0225);
> + break;
> case 0x10ec0255:
> case 0x10ec0256:
> alc_process_coef_fw(codec, coef0255);
> @@ -4749,6 +4756,7 @@ enum {
> ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
> ALC293_FIXUP_LENOVO_SPK_NOISE,
> ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
> + ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
> };
>
> static const struct hda_fixup alc269_fixups[] = {
> @@ -5368,6 +5376,17 @@ static const struct hda_fixup alc269_fixups[] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
> },
> + [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
> + .type = HDA_FIXUP_VERBS,
> + .v.verbs = (const struct hda_verb[]) {
> + /* Disable pass-through path for FRONT 14h */
> + { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
> + { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
> + {}
> + },
> + .chained = true,
> + .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
> + },
> };
>
> static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -5638,10 +5657,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
> {0x21, 0x03211020}
>
> static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
> - SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
> + SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
> ALC225_STANDARD_PINS,
> {0x14, 0x901701a0}),
> - SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
> + SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
> ALC225_STANDARD_PINS,
> {0x14, 0x901701b0}),
> SND_HDA_PIN_QUIRK(...

Read more...

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

apport-collect 1549660

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

On one of the machines we enable, we found that the actual speaker volume
did not always correspond to the volume set in alsamixer. This patch
fixes that problem.

This patch was orginally written by Kailang @ Realtek, I've rebased it
to fit sound git master.

Cc: <email address hidden>
BugLink: https://bugs.launchpad.net/bugs/1549660
Co-Authored-By: Kailang <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 72fa58d..7fded69 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,

 static void alc_headset_mode_default(struct hda_codec *codec)
 {
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
+ {}
+ };
  static struct coef_fw coef0255[] = {
   WRITE_COEF(0x45, 0xc089),
   WRITE_COEF(0x45, 0xc489),
@@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
  };

  switch (codec->core.vendor_id) {
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ break;
  case 0x10ec0255:
  case 0x10ec0256:
   alc_process_coef_fw(codec, coef0255);
@@ -4750,6 +4757,7 @@ enum {
  ALC293_FIXUP_LENOVO_SPK_NOISE,
  ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
  ALC255_FIXUP_DELL_SPK_NOISE,
+ ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
 };

 static const struct hda_fixup alc269_fixups[] = {
@@ -5375,6 +5383,17 @@ static const struct hda_fixup alc269_fixups[] = {
   .chained = true,
   .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
  },
+ [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
+ .type = HDA_FIXUP_VERBS,
+ .v.verbs = (const struct hda_verb[]) {
+ /* Disable pass-through path for FRONT 14h */
+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
+ { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
+ {}
+ },
+ .chained = true,
+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+ },
 };

 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5646,10 +5665,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
  {0x21, 0x03211020}

 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
   ALC225_STANDARD_PINS,
   {0x14, 0x901701a0}),
- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
   ALC225_STANDARD_PINS,
   {0x14, 0x901701b0}),
  SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
--
1.9.1

Download full text (3.7 KiB)

On 2016-02-25 09:29, Takashi Iwai wrote:
> On Thu, 25 Feb 2016 09:13:21 +0100,
> David Henningsson wrote:
>>
>> On one of the machines we enable, we found that the actual speaker volume
>> did not always correspond to the volume set in alsamixer. This patch
>> fixes that problem.
>>
>> This patch was orginally written by Kailang @ Realtek, I've rebased it
>> to fit sound git master.
>>
>> BugLink: https://bugs.launchpad.net/bugs/1549660
>> Co-Authored-By: Kailang <email address hidden>
>> Signed-off-by: David Henningsson <email address hidden>
>
> This conflicts with the latest for-linus branch right after I applied
> another fixup addition. Could you again rebase to for-linus branch?

Ok, done now. Let me know when it's pushed out. Thanks!

> Also, I guess it deserves Cc to stable?

I guess so too, so added in v2. I'm always a bit scared to do so when
  1) we deal with machines that are not released yet
  2) there are verbs in there which only Kailang knows the true meaning
of...

>
>
> thanks,
>
> Takashi
>
>> ---
>> sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++--
>> 1 file changed, 21 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
>> index efd4980..ab353b0 100644
>> --- a/sound/pci/hda/patch_realtek.c
>> +++ b/sound/pci/hda/patch_realtek.c
>> @@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
>>
>> static void alc_headset_mode_default(struct hda_codec *codec)
>> {
>> + static struct coef_fw coef0225[] = {
>> + UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
>> + {}
>> + };
>> static struct coef_fw coef0255[] = {
>> WRITE_COEF(0x45, 0xc089),
>> WRITE_COEF(0x45, 0xc489),
>> @@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
>> };
>>
>> switch (codec->core.vendor_id) {
>> + case 0x10ec0225:
>> + alc_process_coef_fw(codec, coef0225);
>> + break;
>> case 0x10ec0255:
>> case 0x10ec0256:
>> alc_process_coef_fw(codec, coef0255);
>> @@ -4749,6 +4756,7 @@ enum {
>> ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
>> ALC293_FIXUP_LENOVO_SPK_NOISE,
>> ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
>> + ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
>> };
>>
>> static const struct hda_fixup alc269_fixups[] = {
>> @@ -5368,6 +5376,17 @@ static const struct hda_fixup alc269_fixups[] = {
>> .type = HDA_FIXUP_FUNC,
>> .v.func = alc233_fixup_lenovo_line2_mic_hotkey,
>> },
>> + [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
>> + .type = HDA_FIXUP_VERBS,
>> + .v.verbs = (const struct hda_verb[]) {
>> + /* Disable pass-through path for FRONT 14h */
>> + { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
>> + { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
>> + {}
>> + },
>> + .chained = true,
>> + .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
>> + },
>> };
>>
>> static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>> @@ -5638,10 +5657,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
>> {0x21, 0x03211020}
>>
>> static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
>> - SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DEL...

Read more...

On Thu, 25 Feb 2016 09:37:05 +0100,
David Henningsson wrote:
>
> On one of the machines we enable, we found that the actual speaker volume
> did not always correspond to the volume set in alsamixer. This patch
> fixes that problem.
>
> This patch was orginally written by Kailang @ Realtek, I've rebased it
> to fit sound git master.
>
> Cc: <email address hidden>
> BugLink: https://bugs.launchpad.net/bugs/1549660
> Co-Authored-By: Kailang <email address hidden>
> Signed-off-by: David Henningsson <email address hidden>

Applied, thanks.

Takashi

Changed in linux (Ubuntu):
status: Incomplete → Fix Committed
assignee: nobody → David Henningsson (diwic)
tags: added: somerville
Kamal Mostafa (kamalmostafa) 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-wily' to 'verification-done-wily'.

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-wily
Brad Figg (brad-figg) on 2016-03-24
tags: added: verification-passed-wily
removed: verification-needed-wily
Launchpad Janitor (janitor) wrote :
Download full text (20.9 KiB)

This bug was fixed in the package linux - 4.2.0-35.40

---------------
linux (4.2.0-35.40) wily; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1557706

  [ Upstream Kernel Changes ]

  * Revert "workqueue: make sure delayed work run in local cpu"
    - LP: #1556269
  * Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo"
    - LP: #1556269
  * KVM: VMX: Fix host initiated access to guest MSR_TSC_AUX
    - LP: #1552592
  * locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h
    - LP: #1545330
  * [media] usbvision fix overflow of interfaces array
    - LP: #1556269
  * [media] usbvision: fix crash on detecting device with invalid
    configuration
    - LP: #1556269
  * ASN.1: Fix non-match detection failure on data overrun
    - LP: #1556269
  * iw_cxgb3: Fix incorrectly returning error on success
    - LP: #1556269
  * EVM: Use crypto_memneq() for digest comparisons
    - LP: #1556269
  * vmstat: explicitly schedule per-cpu work on the CPU we need it to run
    on
    - LP: #1556269
  * x86/entry/compat: Add missing CLAC to entry_INT80_32
    - LP: #1556269
  * iio-light: Use a signed return type for ltr501_match_samp_freq()
    - LP: #1556269
  * iio: add IIO_TRIGGER dependency to STK8BA50
    - LP: #1556269
  * iio: add HAS_IOMEM dependency to VF610_ADC
    - LP: #1556269
  * iio: dac: mcp4725: set iio name property in sysfs
    - LP: #1556269
  * iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG
    - LP: #1556269
  * iio: light: acpi-als: Report data as processed
    - LP: #1556269
  * iio:adc:ti_am335x_adc Fix buffered mode by identifying as software
    buffer.
    - LP: #1556269
  * ASoC: rt5645: fix the shift bit of IN1 boost
    - LP: #1556269
  * ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2
    - LP: #1556269
  * cgroup: make sure a parent css isn't offlined before its children
    - LP: #1556269
  * ARM: OMAP2+: Fix wait_dll_lock_timed for rodata
    - LP: #1556269
  * ARM: OMAP2+: Fix l2dis_3630 for rodata
    - LP: #1556269
  * ARM: OMAP2+: Fix save_secure_ram_context for rodata
    - LP: #1556269
  * ARM: OMAP2+: Fix l2_inv_api_params for rodata
    - LP: #1556269
  * ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata
    - LP: #1556269
  * rtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded
    - LP: #1556269
  * PCI/AER: Flush workqueue on device remove to avoid use-after-free
    - LP: #1556269
  * ARM: dts: Fix wl12xx missing clocks that cause hangs
    - LP: #1556269
  * libata: disable forced PORTS_IMPL for >= AHCI 1.3
    - LP: #1556269
  * mac80211: Requeue work after scan complete for all VIF types.
    - LP: #1556269
  * rfkill: fix rfkill_fop_read wait_event usage
    - LP: #1556269
  * ARM: dts: at91: sama5d4: fix instance id of DBGU
    - LP: #1556269
  * ARM: dts: at91: sama5d4ek: add phy address and IRQ for macb0
    - LP: #1556269
  * ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type
    - LP: #1556269
  * crypto: shash - Fix has_key setting
    - LP: #1556269
  * Input: vmmouse - fix absolute device registration
    - LP: #1556269
  * spi: atmel: fix gpio chip-select in case of non-DT platform
    - LP: #1556269
  ...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Kamal Mostafa (kamalmostafa) 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-xenial' to 'verification-done-xenial'.

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-xenial
Hui Wang (hui.wang) on 2016-04-26
tags: added: verification-done-xenial
removed: verification-needed-xenial
Changed in hwe-next:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers