All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: mengdong.lin@intel.com, alsa-devel@alsa-project.org, kailang@realtek.com
Subject: Re: [PATCH] ALSA: hda - Fix error accessing non-existent node for Realtek codecs
Date: Mon, 15 Jul 2013 10:58:16 +0200	[thread overview]
Message-ID: <51E3B9A8.3020806@canonical.com> (raw)
In-Reply-To: <s5hy598yzgh.wl%tiwai@suse.de>

On 07/15/2013 10:55 AM, Takashi Iwai wrote:
> At Mon, 15 Jul 2013 10:20:52 +0200,
> David Henningsson wrote:
>>
>> A recent commit caused my hda-emu based test tool to complain about
>> accessing nodes that don't exist. This simple test works around this.
>>
>> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
>> ---
>>   sound/pci/hda/patch_realtek.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> I don't have ALC5505 hardware here, no alsa-info to look at, and I don't know
>> what it is. Therefore it would be good with some confirmation that this patch
>> does not break such hardware, which could be the case if the Realtek codec
>> breaks the HDA spec by having "hidden" nodes.
>
> It seems that ALC5505 itself doesn't appear in the codec information
> but it appears transparent to the real codec behind it.  So the node
> 0x51 doesn't exist in the widget list of the codec, and your  patch
> will break.

I suspected that, but without alsa-info there was no way to tell if this 
was the case or not.

> we may need to patch hda-emu instead...

Okay. Also, is there a way to limit the effect here, like, what codec 
(or codec variants) have this secret 0x51 node? Right now it's being 
tested for most of ALC2xx codecs.

>
>
> Takashi
>
>>
>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
>> index 8bd2261..ca73f10 100644
>> --- a/sound/pci/hda/patch_realtek.c
>> +++ b/sound/pci/hda/patch_realtek.c
>> @@ -3844,7 +3844,8 @@ static int patch_alc269(struct hda_codec *codec)
>>   		break;
>>   	}
>>
>> -	if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
>> +	if (codec->num_nodes > 0x51 &&
>> +	    snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
>>   		spec->has_alc5505_dsp = true;
>>   		spec->init_hook = alc5505_dsp_init;
>>   	}
>> --
>> 1.7.9.5
>>
>



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

  reply	other threads:[~2013-07-15  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15  8:20 [PATCH] ALSA: hda - Fix error accessing non-existent node for Realtek codecs David Henningsson
2013-07-15  8:55 ` Takashi Iwai
2013-07-15  8:58   ` David Henningsson [this message]
2013-07-15  9:26     ` Takashi Iwai
2013-07-15  9:33       ` Kailang
2013-07-15 18:14         ` David Henningsson

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=51E3B9A8.3020806@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kailang@realtek.com \
    --cc=mengdong.lin@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.