[alsa-devel] How to use hda-verb to detect

Takashi Iwai tiwai at suse.de
Mon Aug 17 11:34:16 CEST 2009


At Mon, 17 Aug 2009 12:23:42 +0300,
Ozan Çağlayan wrote:
> 
> Hi,
> 
> I'm playing with an HP DV6(which produces sound only when model=hp-dv5,
> will send a patch for it after further testing) on which HP automuting
> is not working. The laptop has apparently two HP outputs which seems to
> behave completely parallel.

A question is whether two pins are assigned for both or one pin is
shared.  I guess the former case, so according to your alsa-info.sh
output, BIOS gives utterly wrong pin setup...

> One thing that I really don't get with hda-verb, is the last parameter.
> I used hda-emu for finding out an example call:
> 
> Front Playback Volume:0
> MIN/MAX: 0/64,  VAL: [39] [39]
> dB min/max: -48.00/0.00,  [-18.-75dB] [-18.-75dB]
> > set 1 64 64
> send: NID=0x10, VERB=0x3a0(set_amp_gain_mute,O:L#0), PARM=0x7f
> receive: 0x0
> send: NID=0x10, VERB=0x390(set_amp_gain_mute,O:R#0), PARM=0x7f
> receive: 0x0
> > set 1 63 63
> send: NID=0x10, VERB=0x3a0(set_amp_gain_mute,O:L#0), PARM=0x7e
> receive: 0x0
> send: NID=0x10, VERB=0x390(set_amp_gain_mute,O:R#0), PARM=0x7e
> receive: 0x0
> 
> I can easily understand that I'm calling set_amp_gain_mute VERB for NID
> 0x10 with a level value 0x7f and 0x7e.
> 
> Now when I run hda-verb without parameter, it gives me a bunch of
> possible values for PARM:
> 
>   VENDOR_ID, SUBSYSTEM_ID, REV_ID, NODE_COUNT, FUNCTION_TYPE
>   AUDIO_FG_CAP, AUDIO_WIDGET_CAP, PCM, STREAM, PIN_CAP, AMP_IN_CAP
>   CONNLIST_LEN, POWER_STATE, PROC_CAP, GPIO_CAP, AMP_OUT_CAP
>   VOL_KNB_CA

These are for PARAMETERS verb, e.g.

	% hda-verb /dev/... 0x0a PARAMETERS PIN_CAP

> I can't easily understand which one I have to choose for example to send
> the verb SET_UNSOLICITED_ENABLE or SET_PIN_SENSE.

For normal verbs, just pass numbers.  You can pass numbers to PARAMETERS
verb, too, of course.  Also, the verb itself can be a number.

> I've found the widget below in HP DV6 (OUT HP Detect grabbed my
> attention and I've seen that the unsolicited events has something to do
> with HP sense/automute, just playling blindly),
> 
> Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
>   Pincap 0x0000001c: OUT HP Detect                         **
>   Pin Default 0x40f100f0: [N/A] Other at Ext N/A
>     Conn = 1/8, Color = Unknown
>     DefAssociation = 0xf, Sequence = 0x0
>   Pin-ctls: 0x00:
>   Unsolicited: tag=0c, enabled=0
>   Connection: 3
>      0x10 0x11 0x17*
> 
> and say that I want to send SET_UNSOLICITED_ENABLE to 0x0a, which PARM
> should I choose?

For SET_UNSOLICITED_ENABLE verb, you need to a value (TAG | AC_USRSP_EN).
in the case of above, suppose the tag to be 0x0c, pass 0x8c.


Takashi


More information about the Alsa-devel mailing list