alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Manolo Díaz" <diaz.manolo@gmail.com>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
	Miro Hodak <mhodak127@gmail.com>
Subject: Re: HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4
Date: Mon, 14 Jan 2013 13:31:22 +0100	[thread overview]
Message-ID: <20130114133122.52cadb99@gmail.com> (raw)
In-Reply-To: <CAN8ccia1N-eseNR2dET=ghXuyK0E0gXaakehW3VAN8u1UxUQ8Q@mail.gmail.com>

El lun, 14 ene 2013 a las 11:42 horas
Raymond Yau escribió:

>>
>> Commit identified in the subject (ALSA: HDA - Add Independent Headphone
>for
>> all models of ad1988/ad1989) causes problem with audio on at least two
>Asus
>> boards and is still present in current kernel. The boards on which this
>> problem is seen are Asus M3A79-T DELUXE and Asus Rampage II Gene (actually
>> a slightly modified version used in Asus CG5290 desktop).
>>
>> The symptoms:
>> 1. XFCE and Gnome2 audio mixers crash whenever sound is started or
>stopped.
>> The error message is:
>> simple_none.c:1350: get_enum_item_ops: Assertion `helem' failed.
>
>This is caused by the active access flag of independent headphone control
>
>static void activate_ctl(struct hda_codec *codec, const char *name, int
>active)
>{
>       struct snd_kcontrol *ctl = snd_hda_find_mixer_ctl(codec, name);
>       if (ctl) {
>-               ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
>-               ctl->vd[0].access |= active ? 0 :
>-                       SNDRV_CTL_ELEM_ACCESS_INACTIVE;
>               ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_WRITE;
>               ctl->vd[0].access |= active ?
>                       SNDRV_CTL_ELEM_ACCESS_WRITE : 0;
>               snd_ctl_notify(codec->bus->card,
>                              SNDRV_CTL_EVENT_MASK_INFO, &ctl->id);
>       }
>}
>
>>
>> 2. On one of the boards (Asus M3A79-T DELUXE) the mixer control labels are
>> misconfigured since muting the Master channel does not turn the sound off.
>
>For model=auto
>
>It is bug of hda parser which put node 0x1a in speaker out pin when the
>pincap only support input
>
>Your need either
>
>ignore this node in hda parser or
>
>Ignore the node as speaker when pincap is INPUT in patch_analog.c
>
>/* add playback controls for speaker and HP outputs */
>static int ad1988_auto_create_extra_out(struct hda_codec *codec, hda_nid_t
>pin,
>                                        const char *pfx)
>{
>        struct ad198x_spec *spec = codec->spec;
>        hda_nid_t nid;
>        int i, idx, err;
>        char name[32];
>
>        if (! pin)
>                return 0;
>
>+
>+     if ((snd_hda_query_pin_caps(codec, pin) & AC_PINCTL_OUT_EN) == 0)
>+          return 0;
>+
>        idx = ad1988_pin_idx(pin);
>        nid = ad1988_idx_to_dac(codec, idx);
>
>

No. Doing those insertions and deletions mixer crashes are still here but
I have no headphone control and headphone doesn't sound in auto model.

>Node 0x1a [Pin Complex] wcaps 0x400000: Mono
>  Pincap 0x00000020: IN
>  Pin Default 0x911711f0: [Fixed] Speaker at Int Rear
>    Conn = Analog, Color = Black
>    DefAssociation = 0xf, Sequence = 0x0
>    Misc = NO_PRESENCE
>  Pin-ctls: 0x20: IN
>
>Node 0x03 [Audio Output] wcaps 0x405: Stereo Amp-Out
>  Control: name="Speaker Playback Volume", index=0, device=0
>    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
>  Control: name="Headphone Playback Volume", index=0, device=0
>    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
>  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=0
>  Amp-Out vals:  [0x1e 0x1e]
>  Converter: stream=0, channel=0
>  Power states:  D0 D3
>  Power: setting=D0, actual=D0
>
>Node 0x22 [Audio Mixer] wcaps 0x200103: Stereo Amp-In
>  Control: name="Speaker Playback Switch", index=0, device=0
>    ControlAmp: chs=3, dir=In, idx=2, ofs=0
>  Control: name="Headphone Playback Switch", index=0, device=0
>    ControlAmp: chs=3, dir=In, idx=2, ofs=0
>  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>  Amp-In vals:  [0x00 0x00] [0x00 0x00]
>  Connection: 2
>     0x37 0x21
>
>> Either Master is mislabeled or it does not work correctly.
>>
>> Other than that, the sound actually works fine, but it is very annoying
>> when mixer keeps crashing. Reverting to kernel just before the commit
>fixes
>> these issues. Thus it appears that the commit
>> 34588709af61be1550b4e2bcee5c85d0ac4f34d4 breaks autodetect for these
>> boards. A workaround is to force the 6stack-dig model and this fixes
>> problems on both boards, but, of course, it would be preferred if things
>> work out of the box.
>>
>
>If  possible try the proposed generic hda parser from sound-unstable.git
>
>http://mailman.alsa-project.org/pipermail/alsa-devel/2013-January/058330.html

I've tried to patch it, but this is what's happened (linux stable 3.7.2):

patching file sound/pci/hda/hda_generic.c
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 1485.
Hunk #3 FAILED at 2905.
Hunk #4 FAILED at 3057.
Hunk #5 succeeded at 1086 with fuzz 2 (offset -1994 lines).
Hunk #6 FAILED at 3192.
Hunk #7 FAILED at 3209.
6 out of 7 hunks FAILED -- saving rejects to file sound/pci/hda/hda_generic.c.rej
can't find file to patch at input line 187
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
|index 85d138f..5c1569c 100644
|--- a/sound/pci/hda/hda_generic.h
|+++ b/sound/pci/hda/hda_generic.h


What sources is supposed should we patch?

>http://mailman.alsa-project.org/pipermail/alsa-devel/2013-January/058367.html
>
>>
>> Alsa-info for both boards can be found below.
>>
>
>Model=auto does not include headphone as slave of virtual master , the
>volume of headphone and line out jacks are controlled independently since
>you can play different streams to headphone and line out jacks (multi
>stream playback)

Then it works as expected. Front control is slave of master, but headphone
isn't (Asus M3A79-T at least). Sorry, my bad.

>May need dynamically inlcude/exclude headphone play volume and switch as
>slave of the virtual master controls
>
>Do  you need to include HDMI playback volume as slave of the virtual master
>volume ?
>
>Can HDMI and SPDIF work independently since there are two digital audio
>output convertor and the number of SDO of hda controller is 4 ?


Sorry, but can't answer you because I have nothing that can be connected to
a digital output.

>Node 0x1b [Pin Complex] wcaps 0x40030d: Stereo Digital Amp-Out
>  Control: name="IEC958 Playback Volume", index=0, device=0
>    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
>  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=1
>  Amp-Out vals:  [0x00 0x00]
>  Pincap 0x00000010: OUT
>  Pin Default 0x0145f1a0: [Jack] SPDIF Out at Ext Rear
>    Conn = Optical, Color = Other
>    DefAssociation = 0xa, Sequence = 0x0
>    Misc = NO_PRESENCE
>  Pin-ctls: 0x40: OUT
>  Connection: 1
>     0x02
>
>Node 0x1d [Pin Complex] wcaps 0x40030d: Stereo Digital Amp-Out
>  Control: name="HDMI Playback Volume", index=0, device=0
>    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
>  Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x05, mute=1
>  Amp-Out vals:  [0x00 0x00]
>  Pincap 0x00000010: OUT
>  Pin Default 0x1856f1b0: [Jack] Digital Out at Int HDMI
>    Conn = Digital, Color = Other
>    DefAssociation = 0xb, Sequence = 0x0
>    Misc = NO_PRESENCE
>  Pin-ctls: 0x40: OUT
>  Connection: 1
>     0x0b
>
>For 6stack-dig
>
>Thus model create digital capture even when there is no spdif  in pin
>complex
>
>Node 0x07 [Audio Input] wcaps 0x130391: Stereo Digital
>  Control: name="IEC958 Capture Switch", index=0, device=0
>  Control: name="IEC958 Capture Default", index=0, device=0
>  Device: name="AD198x Digital", type="SPDIF", device=1
>  Converter: stream=0, channel=0
>  SDI-Select: 0
>  Digital:
>  Digital category: 0x0
>  PCM:
>    rates [0x7e0]: 44100 48000 88200 96000 176400 192000
>    bits [0xe]: 16 20 24
>    formats [0x5]: PCM AC3
>  Unsolicited: tag=00, enabled=0
>  Delay: 3 samples
>  Connection: 1
>     0x1c
>
>Node 0x1c [Pin Complex] wcaps 0x40020b: Stereo Digital Amp-In
>  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
>  Amp-In vals:  [0x97 0x97]
>  Pincap 0x00000020: IN
>  Pin Default 0x41c5f160: [N/A] SPDIF In at Ext Rear
>    Conn = Optical, Color = Other
>    DefAssociation = 0x6, Sequence = 0x0
>    Misc = NO_PRESENCE
>  Pin-ctls: 0x20: IN
>
>> Results of alsa-info
>>
>> Asus Rampage II Gene:
>>
>> Before the commit: http://pastebin.com/gCZurk6D
>> After the commit (autodetect): http://pastebin.com/3hNX2g1c
>> After the commit (6stack_dig model): http://pastebin.com/dL0UGeTW
>>
>> More recent kernel:
>> 3.6.11-gentoo (autodetect): http://pastebin.com/0gjnhYA2
>> 3.6.11-gentoo (6stack_dig model): http://pastebin.com/K9bsWBWW
>
>>
>> Asus M3A79-T DELUXE
>>
>> Before the commit: http://pastebin.com/hyUBmpDL
>> After the commit (autodetect) : http://pastebin.com/gzGg60bM
>> After the commit (6stack_dig model): http://pastebin.com/y88jCMhM


-- 
Manolo Díaz
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2013-01-14 12:31 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-13 18:05 HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4 Miro Hodak
2013-01-14  3:42 ` Raymond Yau
2013-01-14 11:03   ` Takashi Iwai
2013-01-14 13:46     ` Raymond Yau
2013-01-14 14:18       ` Takashi Iwai
2013-01-15  7:59         ` Takashi Iwai
2013-01-16  2:04           ` Raymond Yau
2013-01-16  6:47             ` Takashi Iwai
2013-01-16  7:19               ` Raymond Yau
2013-01-16  7:24                 ` Takashi Iwai
2013-01-14 11:37   ` Clemens Ladisch
2013-01-14 12:31   ` Manolo Díaz [this message]
2013-01-14 12:48     ` Takashi Iwai
2013-01-14 12:59       ` Manolo Díaz
2013-01-14 13:03         ` Takashi Iwai
2013-01-14 13:10           ` Manolo Díaz
2013-01-14 16:23           ` Manolo Díaz
2013-01-15  0:42             ` Raymond Yau
2013-01-15  8:53               ` Manolo Díaz
2013-01-16  1:52                 ` Raymond Yau
2013-01-16  8:49                   ` Manolo Díaz
2013-01-16  8:54                     ` Takashi Iwai
2013-01-16 12:37                       ` Raymond Yau
2013-01-16 12:39                       ` Manolo Díaz
2013-01-16 12:54                         ` Takashi Iwai
2013-01-16 13:04                           ` Manolo Díaz
2013-01-16 13:16                             ` Takashi Iwai
2013-01-16 13:55                               ` Manolo Díaz
2013-01-16 14:20                                 ` Takashi Iwai
2013-01-17  3:51                                   ` Raymond Yau
2013-01-17  6:30                                     ` Takashi Iwai
2013-01-17  6:40                                       ` Raymond Yau
2013-01-17  6:49                                         ` Takashi Iwai
2013-01-17  8:10                                           ` Miro Hodak
2013-01-17  9:04                                             ` Takashi Iwai
2013-01-17  9:24                                               ` Miro Hodak
2013-01-17  9:29                                                 ` Takashi Iwai
2013-01-17  9:42                                                   ` Miro Hodak
2013-01-17  9:55                                                     ` Takashi Iwai
2013-01-17 10:17                                                       ` Miro Hodak
2013-01-17 10:21                                                         ` Takashi Iwai
2013-01-17 10:32                                                           ` Miro Hodak
2013-01-17 11:09                                                             ` Takashi Iwai
2013-01-17 12:49                                                             ` Raymond Yau
2013-01-17 14:59                                                               ` Miro Hodak
2013-01-17 15:29                                                                 ` Raymond Yau
2013-01-17 15:33                                                                   ` hda_analyzer (was: Re: HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4) David Henningsson
2013-01-17 15:32                                                                 ` HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4 Takashi Iwai
2013-01-17 18:12                                                                   ` Manolo Díaz
2013-01-17 19:51                                                                     ` Miro Hodak
2013-01-17 21:12                                                                       ` ALSA versions versus kernel versions Daniel Griscom
2013-01-17 20:16                                                                     ` HD-audio regression after commit 34588709af61be1550b4e2bcee5c85d0ac4f34d4 Takashi Iwai
     [not found]                                                                       ` <20130117214043.5a1574ee@gmail.com>
2013-01-18  4:20                                                                         ` Miro Hodak
2013-01-18  7:04                                                                         ` Takashi Iwai
2013-01-18  7:31                                                                           ` Miro Hodak
2013-01-18  8:08                                                                             ` Manolo Díaz
2013-01-18  8:14                                                                               ` Miro Hodak
2013-01-18 10:17                                                                                 ` Takashi Iwai
2013-01-18 12:37                                                                                   ` Manolo Díaz
2013-01-18 13:49                                                                                     ` Takashi Iwai
2013-01-18 14:49                                                                                       ` Raymond Yau
2013-01-18 15:30                                                                                         ` Takashi Iwai
2013-01-18 16:48                                                                                           ` Manolo Díaz
2013-01-18 16:58                                                                                             ` Takashi Iwai
2013-01-18 17:51                                                                                               ` Manolo Díaz
2013-01-18 18:20                                                                                                 ` Manolo Díaz
2013-01-18 18:45                                                                                                   ` Takashi Iwai
     [not found]                                                                                                     ` <CA+S_cwrH6mjunDsn2w76Vpyk7XovOKpH0k_KoU_8SXjmisLAYw@mail.gmail.com>
2013-01-19  5:49                                                                                                       ` Raymond Yau
2013-01-19 11:12                                                                                                         ` Takashi Iwai
2013-01-19 11:11                                                                                                       ` Takashi Iwai
2013-01-20 19:54                                                                                                         ` Miro Hodak
2013-01-21  4:01                                                                                                           ` Raymond Yau
2013-01-21  8:18                                                                                                           ` Takashi Iwai
2013-01-21  8:54                                                                                                             ` Miro Hodak
2013-01-21  9:18                                                                                                               ` Raymond Yau
2013-01-21 17:08                                                                                                                 ` Miro Hodak
2013-01-21 17:29                                                                                                                   ` Takashi Iwai
2013-01-21 17:44                                                                                                                     ` Miro Hodak
2013-01-21 19:11                                                                                                                       ` Miro Hodak
2013-01-21 20:21                                                                                                                         ` Takashi Iwai
2013-01-22  7:05                                                                                                                           ` Takashi Iwai
2013-01-22  8:14                                                                                                                             ` Miro Hodak
2013-01-22  8:58                                                                                                                               ` Takashi Iwai
2013-01-22 10:06                                                                                                                                 ` Miro Hodak
2013-01-22 10:12                                                                                                                                   ` Takashi Iwai
2013-01-19  2:39                                                                                           ` Raymond Yau
2013-01-19 11:09                                                                                             ` Takashi Iwai
2013-01-19 12:37                                                                                               ` Raymond Yau
2013-01-19 16:56                                                                                                 ` Takashi Iwai
2013-01-18  7:43                                             ` Raymond Yau
2013-01-15  7:27             ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130114133122.52cadb99@gmail.com \
    --to=diaz.manolo@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=mhodak127@gmail.com \
    --cc=superquad.vortex2@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).