"num_steps = 0" error on ALC256

Bug #1446517 reported by David Henningsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
David Henningsson
Vivid
Fix Released
Undecided
Unassigned

Bug Description

This bug is used for tracking, please do not triage.

CVE References

Changed in linux (Ubuntu):
assignee: nobody → David Henningsson (diwic)
status: New → In Progress
Revision history for this message
David Henningsson (diwic) wrote : [PATCH] ALSA: hda - fix "num_steps = 0" error on ALC256

The ALC256 does not have a mixer nid at 0x0b, and there's no
loopback path (the output pins are directly connected to the DACs).

This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)"
error (and as a result, problems with amixer/alsamixer).

If there's pcbeep functionality, it certainly isn't controlled by setting an
amp on 0x0b, so disable beep functionality (at least for now).

Cc: <email address hidden>
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
Signed-off-by: David Henningsson <email address hidden>
---
 sound/pci/hda/patch_realtek.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 231d0e4..03975d03 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5664,6 +5664,7 @@ static int patch_alc269(struct hda_codec *codec)
   break;
  case 0x10ec0256:
   spec->codec_variant = ALC269_TYPE_ALC256;
+ spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
   break;
  }

@@ -5677,8 +5678,8 @@ static int patch_alc269(struct hda_codec *codec)
  if (err < 0)
   goto error;

- if (!spec->gen.no_analog && spec->gen.beep_nid)
- set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
+ if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
+ set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);

  codec->patch_ops = alc_patch_ops;
  codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
--
1.9.1

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Tue, 21 Apr 2015 10:48:46 +0200,
David Henningsson wrote:
>
> The ALC256 does not have a mixer nid at 0x0b, and there's no
> loopback path (the output pins are directly connected to the DACs).
>
> This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)"
> error (and as a result, problems with amixer/alsamixer).
>
> If there's pcbeep functionality, it certainly isn't controlled by setting an
> amp on 0x0b, so disable beep functionality (at least for now).
>
> Cc: <email address hidden>
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
> Signed-off-by: David Henningsson <email address hidden>

Applied, thanks.

Takashi

> ---
> sound/pci/hda/patch_realtek.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 231d0e4..03975d03 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5664,6 +5664,7 @@ static int patch_alc269(struct hda_codec *codec)
> break;
> case 0x10ec0256:
> spec->codec_variant = ALC269_TYPE_ALC256;
> + spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
> break;
> }
>
> @@ -5677,8 +5678,8 @@ static int patch_alc269(struct hda_codec *codec)
> if (err < 0)
> goto error;
>
> - if (!spec->gen.no_analog && spec->gen.beep_nid)
> - set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
> + if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
> + set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
>
> codec->patch_ops = alc_patch_ops;
> codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
> --
> 1.9.1
>

Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Kailiang Yang (kailang) wrote :

Fix Dell ALC256 headphone Mic recording issue.
Default is pcbeep path for 0x1a input.

> -----Original Message-----
> From: Takashi Iwai [mailto:<email address hidden>]
> Sent: Tuesday, April 21, 2015 6:03 PM
> To: David Henningsson
> Cc: <email address hidden>; Kailang; <email address hidden>;
> <email address hidden>; <email address hidden>
> Subject: Re: [PATCH] ALSA: hda - fix "num_steps = 0" error on ALC256
>
> At Tue, 21 Apr 2015 10:48:46 +0200,
> David Henningsson wrote:
> >
> > The ALC256 does not have a mixer nid at 0x0b, and there's
> no loopback
> > path (the output pins are directly connected to the DACs).
> >
> > This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep
> Playback Volume)"
> > error (and as a result, problems with amixer/alsamixer).
> >
> > If there's pcbeep functionality, it certainly isn't controlled by
> > setting an amp on 0x0b, so disable beep functionality (at
> least for now).
> >
> > Cc: <email address hidden>
> > BugLink:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
> > Signed-off-by: David Henningsson <email address hidden>
>
> Applied, thanks.
>
>
> Takashi
>
> > ---
> > sound/pci/hda/patch_realtek.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/sound/pci/hda/patch_realtek.c
> > b/sound/pci/hda/patch_realtek.c index 231d0e4..03975d03 100644
> > --- a/sound/pci/hda/patch_realtek.c
> > +++ b/sound/pci/hda/patch_realtek.c
> > @@ -5664,6 +5664,7 @@ static int patch_alc269(struct
> hda_codec *codec)
> > break;
> > case 0x10ec0256:
> > spec->codec_variant = ALC269_TYPE_ALC256;
> > + spec->gen.mixer_nid = 0; /* ALC256 does not
> have any loopback mixer
> > +path */
> > break;
> > }
> >
> > @@ -5677,8 +5678,8 @@ static int patch_alc269(struct
> hda_codec *codec)
> > if (err < 0)
> > goto error;
> >
> > - if (!spec->gen.no_analog && spec->gen.beep_nid)
> > - set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
> > + if (!spec->gen.no_analog && spec->gen.beep_nid &&
> spec->gen.mixer_nid)
> > + set_beep_amp(spec, spec->gen.mixer_nid, 0x04,
> HDA_INPUT);
> >
> > codec->patch_ops = alc_patch_ops;
> > codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
> > --
> > 1.9.1
> >
>
> ------Please consider the environment before printing this e-mail.
>

Revision history for this message
Hui Wang (hui.wang) wrote :

Hi Kailang,

Thanks for providing the patch, and we tested the patch, it fixed the
problem.

Regards,
Hui.

On 04/23/2015 03:18 PM, Kailang wrote:
> Fix Dell ALC256 headphone Mic recording issue.
> Default is pcbeep path for 0x1a input.
>
>> -----Original Message-----
>> From: Takashi Iwai [mailto:<email address hidden>]
>> Sent: Tuesday, April 21, 2015 6:03 PM
>> To: David Henningsson
>> Cc: <email address hidden>; Kailang; <email address hidden>;
>> <email address hidden>; <email address hidden>
>> Subject: Re: [PATCH] ALSA: hda - fix "num_steps = 0" error on ALC256
>>
>> At Tue, 21 Apr 2015 10:48:46 +0200,
>> David Henningsson wrote:
>>> The ALC256 does not have a mixer nid at 0x0b, and there's
>> no loopback
>>> path (the output pins are directly connected to the DACs).
>>>
>>> This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep
>> Playback Volume)"
>>> error (and as a result, problems with amixer/alsamixer).
>>>
>>> If there's pcbeep functionality, it certainly isn't controlled by
>>> setting an amp on 0x0b, so disable beep functionality (at
>> least for now).
>>> Cc: <email address hidden>
>>> BugLink:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
>>> Signed-off-by: David Henningsson <email address hidden>
>> Applied, thanks.
>>
>>
>> Takashi
>>
>>> ---
>>> sound/pci/hda/patch_realtek.c | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/sound/pci/hda/patch_realtek.c
>>> b/sound/pci/hda/patch_realtek.c index 231d0e4..03975d03 100644
>>> --- a/sound/pci/hda/patch_realtek.c
>>> +++ b/sound/pci/hda/patch_realtek.c
>>> @@ -5664,6 +5664,7 @@ static int patch_alc269(struct
>> hda_codec *codec)
>>> break;
>>> case 0x10ec0256:
>>> spec->codec_variant = ALC269_TYPE_ALC256;
>>> + spec->gen.mixer_nid = 0; /* ALC256 does not
>> have any loopback mixer
>>> +path */
>>> break;
>>> }
>>>
>>> @@ -5677,8 +5678,8 @@ static int patch_alc269(struct
>> hda_codec *codec)
>>> if (err < 0)
>>> goto error;
>>>
>>> - if (!spec->gen.no_analog && spec->gen.beep_nid)
>>> - set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
>>> + if (!spec->gen.no_analog && spec->gen.beep_nid &&
>> spec->gen.mixer_nid)
>>> + set_beep_amp(spec, spec->gen.mixer_nid, 0x04,
>> HDA_INPUT);
>>>
>>> codec->patch_ops = alc_patch_ops;
>>> codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
>>> --
>>> 1.9.1
>>>
>> ------Please consider the environment before printing this e-mail.

Revision history for this message
Takashi Iwai (tiwai) wrote :

At Thu, 23 Apr 2015 17:34:19 +0800,
Hui Wang wrote:
>
> Hi Kailang,
>
> Thanks for providing the patch, and we tested the patch, it fixed the
> problem.

OK, I applied it with Cc to stable now.

thanks,

Takashi

>
> Regards,
> Hui.
>
> On 04/23/2015 03:18 PM, Kailang wrote:
> > Fix Dell ALC256 headphone Mic recording issue.
> > Default is pcbeep path for 0x1a input.
> >
> >> -----Original Message-----
> >> From: Takashi Iwai [mailto:<email address hidden>]
> >> Sent: Tuesday, April 21, 2015 6:03 PM
> >> To: David Henningsson
> >> Cc: <email address hidden>; Kailang; <email address hidden>;
> >> <email address hidden>; <email address hidden>
> >> Subject: Re: [PATCH] ALSA: hda - fix "num_steps = 0" error on ALC256
> >>
> >> At Tue, 21 Apr 2015 10:48:46 +0200,
> >> David Henningsson wrote:
> >>> The ALC256 does not have a mixer nid at 0x0b, and there's
> >> no loopback
> >>> path (the output pins are directly connected to the DACs).
> >>>
> >>> This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep
> >> Playback Volume)"
> >>> error (and as a result, problems with amixer/alsamixer).
> >>>
> >>> If there's pcbeep functionality, it certainly isn't controlled by
> >>> setting an amp on 0x0b, so disable beep functionality (at
> >> least for now).
> >>> Cc: <email address hidden>
> >>> BugLink:
> >> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
> >>> Signed-off-by: David Henningsson <email address hidden>
> >> Applied, thanks.
> >>
> >>
> >> Takashi
> >>
> >>> ---
> >>> sound/pci/hda/patch_realtek.c | 5 +++--
> >>> 1 file changed, 3 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/sound/pci/hda/patch_realtek.c
> >>> b/sound/pci/hda/patch_realtek.c index 231d0e4..03975d03 100644
> >>> --- a/sound/pci/hda/patch_realtek.c
> >>> +++ b/sound/pci/hda/patch_realtek.c
> >>> @@ -5664,6 +5664,7 @@ static int patch_alc269(struct
> >> hda_codec *codec)
> >>> break;
> >>> case 0x10ec0256:
> >>> spec->codec_variant = ALC269_TYPE_ALC256;
> >>> + spec->gen.mixer_nid = 0; /* ALC256 does not
> >> have any loopback mixer
> >>> +path */
> >>> break;
> >>> }
> >>>
> >>> @@ -5677,8 +5678,8 @@ static int patch_alc269(struct
> >> hda_codec *codec)
> >>> if (err < 0)
> >>> goto error;
> >>>
> >>> - if (!spec->gen.no_analog && spec->gen.beep_nid)
> >>> - set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
> >>> + if (!spec->gen.no_analog && spec->gen.beep_nid &&
> >> spec->gen.mixer_nid)
> >>> + set_beep_amp(spec, spec->gen.mixer_nid, 0x04,
> >> HDA_INPUT);
> >>>
> >>> codec->patch_ops = alc_patch_ops;
> >>> codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
> >>> --
> >>> 1.9.1
> >>>
> >> ------Please consider the environment before printing this e-mail.
>

Brad Figg (brad-figg)
Changed in linux (Ubuntu Vivid):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.0 KiB)

This bug was fixed in the package linux - 3.19.0-20.20

---------------
linux (3.19.0-20.20) vivid; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1459957
  * Revert "SAUCE: Call i915_bpo specific functions from the hda driver"
    - LP: #1457369

linux (3.19.0-19.19) vivid; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1458964

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1451593

  [ Luis Henriques ]

  * [Config] updateconfigs for 3.19.7 stable update

  [ Paolo Pisati ]

  * [Config] armhf: CPUFREQ_DT=y
    - LP: #1457781
  * annotations: enforce CPUFREQ_DT
    - LP: #1457781

  [ Tanmay Inamdar ]

  * SAUCE: (no-up) Add MSI/MSI-X driver for APM PCI bus
    - LP: #1451593

  [ Timo Aaltonen ]

  * SAUCE: i915_bpo: Rebase to v4.1-rc4.
    - LP: #1456123
  * SAUCE: i915_bpo: Revert dma-buf: cleanup dma_buf_export() to make it
    easily extensible
    - LP: #1456123

  [ Tuan Phan ]

  * SAUCE: (no-up) pci-xgene-msi: fixed deadlock in irq_set_affinity
    - LP: #1451593

  [ Upstream Kernel Changes ]

  * Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
    - LP: #1454699
  * cpufreq: powernv: Report cpu frequency throttling
    - LP: #1452547
  * x86: kvm: Revert "remove sched notifier for cross-cpu migrations"
    - LP: #1450584
  * x86: vdso: fix pvclock races with task migration
    - LP: #1450584
  * ip_forward: Drop frames with attached skb->sk
    - LP: #1454699
  * net: add skb_checksum_complete_unset
    - LP: #1454699
  * ppp: call skb_checksum_complete_unset in ppp_receive_frame
    - LP: #1454699
  * tcp: fix possible deadlock in tcp_send_fin()
    - LP: #1454699
  * tcp: avoid looping in tcp_send_fin()
    - LP: #1454699
  * net: do not deplete pfmemalloc reserve
    - LP: #1454699
  * net: fix crash in build_skb()
    - LP: #1454699
  * pxa168: fix double deallocation of managed resources
    - LP: #1454699
  * net/mlx4_en: Prevent setting invalid RSS hash function
    - LP: #1454699
  * md: fix md io stats accounting broken
    - LP: #1454699
  * x86/asm/decoder: Fix and enforce max instruction size in the insn
    decoder
    - LP: #1454699
  * sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve
    power savings and to improve performance
    - LP: #1454699
  * sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs
    - LP: #1454699
  * perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events
    - LP: #1454699
  * KVM: x86: Fix MSR_IA32_BNDCFGS in msrs_to_save
    - LP: #1454699
  * Btrfs: fix log tree corruption when fs mounted with -o discard
    - LP: #1454699
  * btrfs: don't accept bare namespace as a valid xattr
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after cloning into it
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after extent_same ioctl
    - LP: #1454699
  * usb: gadget: printer: enqueue printer's response for setup request
    - LP: #1454699
  * KVM: s390: fix handling of write errors in the tpi handler
    - LP: #1454699
  * KVM: s390: reinjection of irqs can fail in the tpi handler
    - LP: #1454699
  * KVM:...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Luis Henriques (henrix) 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-vivid' to 'verification-done-vivid'.

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-vivid
Revision history for this message
David Henningsson (diwic) wrote :

Comes from upstream stable, does not need verification.

tags: added: verification-done-vivid
removed: verification-needed-vivid
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.0 KiB)

This bug was fixed in the package linux - 3.19.0-20.20

---------------
linux (3.19.0-20.20) vivid; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1459957
  * Revert "SAUCE: Call i915_bpo specific functions from the hda driver"
    - LP: #1457369

linux (3.19.0-19.19) vivid; urgency=low

  [ Brad Figg ]

  * Release Tracking Bug
    - LP: #1458964

  [ Duc Dang ]

  * SAUCE: (no-up) [PCIE] APM X-Gene: Remove debug messages in MSI
    interrupt handler path.
    - LP: #1451593

  [ Luis Henriques ]

  * [Config] updateconfigs for 3.19.7 stable update

  [ Paolo Pisati ]

  * [Config] armhf: CPUFREQ_DT=y
    - LP: #1457781
  * annotations: enforce CPUFREQ_DT
    - LP: #1457781

  [ Tanmay Inamdar ]

  * SAUCE: (no-up) Add MSI/MSI-X driver for APM PCI bus
    - LP: #1451593

  [ Timo Aaltonen ]

  * SAUCE: i915_bpo: Rebase to v4.1-rc4.
    - LP: #1456123
  * SAUCE: i915_bpo: Revert dma-buf: cleanup dma_buf_export() to make it
    easily extensible
    - LP: #1456123

  [ Tuan Phan ]

  * SAUCE: (no-up) pci-xgene-msi: fixed deadlock in irq_set_affinity
    - LP: #1451593

  [ Upstream Kernel Changes ]

  * Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
    - LP: #1454699
  * cpufreq: powernv: Report cpu frequency throttling
    - LP: #1452547
  * x86: kvm: Revert "remove sched notifier for cross-cpu migrations"
    - LP: #1450584
  * x86: vdso: fix pvclock races with task migration
    - LP: #1450584
  * ip_forward: Drop frames with attached skb->sk
    - LP: #1454699
  * net: add skb_checksum_complete_unset
    - LP: #1454699
  * ppp: call skb_checksum_complete_unset in ppp_receive_frame
    - LP: #1454699
  * tcp: fix possible deadlock in tcp_send_fin()
    - LP: #1454699
  * tcp: avoid looping in tcp_send_fin()
    - LP: #1454699
  * net: do not deplete pfmemalloc reserve
    - LP: #1454699
  * net: fix crash in build_skb()
    - LP: #1454699
  * pxa168: fix double deallocation of managed resources
    - LP: #1454699
  * net/mlx4_en: Prevent setting invalid RSS hash function
    - LP: #1454699
  * md: fix md io stats accounting broken
    - LP: #1454699
  * x86/asm/decoder: Fix and enforce max instruction size in the insn
    decoder
    - LP: #1454699
  * sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve
    power savings and to improve performance
    - LP: #1454699
  * sched/idle/x86: Optimize unnecessary mwait_idle() resched IPIs
    - LP: #1454699
  * perf/x86/intel: Fix Core2,Atom,NHM,WSM cycles:pp events
    - LP: #1454699
  * KVM: x86: Fix MSR_IA32_BNDCFGS in msrs_to_save
    - LP: #1454699
  * Btrfs: fix log tree corruption when fs mounted with -o discard
    - LP: #1454699
  * btrfs: don't accept bare namespace as a valid xattr
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after cloning into it
    - LP: #1454699
  * Btrfs: fix inode eviction infinite loop after extent_same ioctl
    - LP: #1454699
  * usb: gadget: printer: enqueue printer's response for setup request
    - LP: #1454699
  * KVM: s390: fix handling of write errors in the tpi handler
    - LP: #1454699
  * KVM: s390: reinjection of irqs can fail in the tpi handler
    - LP: #1454699
  * KVM:...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.