[alsa-devel] Issues and/or possible bugs in alsa

Yomi Ogunwumi abyomi0 at gmail.com
Thu Apr 9 17:44:19 CEST 2015


Can you send me a modified sound/pci/hda/hda_proc.c, with the changes you
included in last email?

• Yomi
On Apr 3, 2015 11:10 AM, "Raymond Yau" <superquad.vortex2 at gmail.com> wrote:

> >
> > I'm going to take a guess and conclude that there must be bugs in the
> interface patch written for the realtek codecs. I happened to test two
> other laptops and they worked just fine. (Intel...)
> >
> > ...I guess in should report a bug related to that realtek patch...
> >
> > •
> >>>> >
> >>>> > Is there anything else I need to do?
> >>>>
> >>>> Codec: Realtek ALC269VB
> >>>> Address: 0
> >>>> AFG Function Id: 0x1 (unsol 1)
> >>>> Vendor Id: 0x10ec0269
> >>>> Subsystem Id: 0x1179fa22
> >>>> Revision Id: 0x100100
> >>>> No Modem Function Group found
> >>>> Default PCM:
> >>>> N/A
> >>>> Default Amp-In caps: N/A
> >>>> Default Amp-Out caps: N/A
> >>>> State of AFG node 0x01:
> >>>>   Power: setting=UNKNOWN, actual=UNKNOWN, Error, Clock-stop-OK,
> Setting-reset
> >>>> Invalid AFG subtree
>
> You need to find out what value return snd_hda_param_read()  in
> snd_hda_get_sub_nodes ()
>
> and value of pwr return by snd_hda_codec_read(codec, nid, 0,
>      AC_VERB_GET_POWER_STATE, 0);
>
> int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
>                         hda_nid_t *start_id)
> {
>          unsigned int parm;
>
>         parm = snd_hda_param_read(codec, nid, AC_PAR_NODE_COUNT);
>        if (parm == -1) {
>               *start_id = 0
>                  return 0;
>       }
>        *start_id = (parm >> 16) & 0x7fff;
>       return (int)(parm & 0x7fff);
> }
> nodes = snd_hda_get_sub_nodes(codec, fg, &nid);
> if (! nid || nodes < 0) {
> snd_iprintf(buffer, "Invalid AFG subtree\n");
> snd_hda_power_down(codec);
> return;
> }
>
>
> Power: setting=UNKNOWN, actual=UNKNOWN, Error, Clock-stop-OK, Setting-reset
>
> static const char *get_pwr_state(u32 state)
> {
> static const char * const buf[] = {
> "D0", "D1", "D2", "D3", "D3cold"
> };
> if (state < ARRAY_SIZE(buf))
> return buf[state];
> return "UNKNOWN";
> }
>
>
> int sup = snd_hda_param_read(codec, nid, AC_PAR_POWER_STATE);
> int pwr = snd_hda_codec_read(codec, nid, 0,
>      AC_VERB_GET_POWER_STATE, 0);
> if (sup != -1)
> snd_iprintf(buffer, "  Power states: %s\n",
>     bits_names(sup, names, ARRAY_SIZE(names)));
>
> snd_iprintf(buffer, "  Power: setting=%s, actual=%s",
>     get_pwr_state(pwr & AC_PWRST_SETTING),
>     get_pwr_state((pwr & AC_PWRST_ACTUAL) >>
>   AC_PWRST_ACTUAL_SHIFT));
> if (pwr & AC_PWRST_ERROR)
> snd_iprintf(buffer, ", Error");
> if (pwr & AC_PWRST_CLK_STOP_OK)
> snd_iprintf(buffer, ", Clock-stop-OK");
> if (pwr & AC_PWRST_SETTING_RESET)
> snd_iprintf(buffer, ", Setting-reset");
> snd_iprintf(buffer, "\n");
>


More information about the Alsa-devel mailing list