Re: Cant Use External mic, using hw mic jack
Posted: Wed Jan 23, 2019 7:06 pm
MrEen thanks a lot! i was out of town, i will try those! at this point i want to learn hda-verb too!
Welcome to the Linux Mint forums!
https://forums.linuxmint.com/
plugged or not its always showing the same outputMrEen wrote: ↑Fri Jan 18, 2019 3:47 pmI'm trying to learn some of this hda-verb stuff to possibly help you with that. I might actually learn enough to be helpful before Mint 23 comes out!![]()
Anyway, I've learned one thing and it will help to determine the NID for you. In this case, you believe 0x07 is the correct NID, and you can test that this way:When the mic is not connected it'll return 0x0 for the value and when it is connected it'll return 0x80000000 for the value.Code: Select all
sudo hda-verb /dev/snd/hwC0D0 0x07 GET_PIN_SENSE 0
At least that will get us one step closer.
Code: Select all
nid = 0x7, verb = 0xf09, param = 0x0
value = 0x0
Code: Select all
cat /proc/asound/card*/codec\#*
Code: Select all
Node 0x10 [Pin Complex] [Jack] HP Out at Ext Front
Code: Select all
emi@machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 GET_PIN_SENSE 0
nid = 0x10, verb = 0xf09, param = 0x0
value = 0x0
emi@maachine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 GET_PIN_SENSE 0
nid = 0x10, verb = 0xf09, param = 0x0
value = 0x80000000
Code: Select all
emi@machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 SET_AMP_GAIN_MUTE AMP_IN_UNMUTE
No key matching with 'AMP_IN_UNMUTE'
Code: Select all
known verbs:
GET_STREAM_FORMAT
GET_AMP_GAIN_MUTE
GET_PROC_COEF
GET_COEF_INDEX
PARAMETERS
GET_CONNECT_SEL
GET_CONNECT_LIST
GET_PROC_STATE
GET_SDI_SELECT
GET_POWER_STATE
GET_CONV
GET_PIN_WIDGET_CONTROL
GET_UNSOLICITED_RESPONSE
GET_PIN_SENSE
GET_BEEP_CONTROL
GET_EAPD_BTLENABLE
GET_DIGI_CONVERT_1
GET_DIGI_CONVERT_2
GET_VOLUME_KNOB_CONTROL
GET_GPIO_DATA
GET_GPIO_MASK
GET_GPIO_DIRECTION
GET_GPIO_WAKE_MASK
GET_GPIO_UNSOLICITED_RSP_MASK
GET_GPIO_STICKY_MASK
GET_CONFIG_DEFAULT
GET_SUBSYSTEM_ID
SET_STREAM_FORMAT
SET_AMP_GAIN_MUTE
SET_PROC_COEF
SET_COEF_INDEX
SET_CONNECT_SEL
SET_PROC_STATE
SET_SDI_SELECT
SET_POWER_STATE
SET_CHANNEL_STREAMID
SET_PIN_WIDGET_CONTROL
SET_UNSOLICITED_ENABLE
SET_PIN_SENSE
SET_BEEP_CONTROL
SET_EAPD_BTLENABLE
SET_DIGI_CONVERT_1
SET_DIGI_CONVERT_2
SET_VOLUME_KNOB_CONTROL
SET_GPIO_DATA
SET_GPIO_MASK
SET_GPIO_DIRECTION
SET_GPIO_WAKE_MASK
SET_GPIO_UNSOLICITED_RSP_MASK
SET_GPIO_STICKY_MASK
SET_CONFIG_DEFAULT_BYTES_0
SET_CONFIG_DEFAULT_BYTES_1
SET_CONFIG_DEFAULT_BYTES_2
SET_CONFIG_DEFAULT_BYTES_3
SET_CODEC_RESET
known parameters:
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_CAP
Code: Select all
emi@Machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 SET_AMP_GAIN_MUTE 0x64
nid = 0x10, verb = 0x300, param = 0x64
value = 0x0
emi@<Machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x11 SET_AMP_GAIN_MUTE 0x64
nid = 0x11, verb = 0x300, param = 0x64
value = 0x0
ad1988_6stack_fp_init_verbs[]
on that page as you'll see what I mean. I just now realized they are doing AMP_IN_MUTE(0) immediately followed by AMP_IN_MUTE(1) on the same node which I assume is mute then unmute maybe to wake it up?cat /proc/asound/card*/codec\#*
output:
This just confuses me more!! Is it IN or OUT? Is it a multi-jack?Node 0x11 [Pin Complex] wcaps 0x40058b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Pincap 0x00000134: IN OUT Detect
Vref caps: HIZ
Pin Default 0x02012014: [Jack] Line Out at Ext Front
Conn = 1/8, Color = Grey
DefAssociation = 0x1, Sequence = 0x4
Pin-ctls: 0x20: IN VREF_HIZ
its marked with the mic simbol, and function as a mic a lot of years ago when this machine has windows....This just confuses me more!! Is it IN or OUT? Is it a multi-jack?
Code: Select all
0x0b 0x01014010
0x0c 0x014580f0
0x0d 0x014570f0
0x0e 0x01c530f0
0x0f 0x0221401f
0x10 0x02216011
0x11 0x02012014
0x12 0x37a791f0
0x13 0x908700f0
0x18 0x500000f0
No, I got confused from that page I linked to. AMP_IN_MUTE exists, and AMP_OUT_UNMUTE exists (at least on that page that is a patch for a different sound card.)
Code: Select all
emi@Machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 SET_AMP_GAIN_MUTE 0x64
Code: Select all
- {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
- {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
Code: Select all
#define AC_PAR_AMP_IN_CAP 0x0d
in the souce code, there are the words and the corresponding hexa values defined as constantsMrEen wrote: ↑Wed Jan 23, 2019 10:43 pmHere's a question I have for you. Take the most recent example:How do you determine that 0x64 is something worth trying? In the little I've been able to find, I have found posts saying you can use numbers or words, but nowhere can I find what number correspond to what words. The only number that I can understand is 0x0 is the equivalent of off.Code: Select all
emi@Machine~ $ sudo hda-verb /dev/snd/hwC0D0 0x10 SET_AMP_GAIN_MUTE 0x64
Code: Select all
- {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
- {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
Understand that he is not using hda-verb there.eMINT wrote: ↑Fri Jan 25, 2019 6:28 pmNotice on the page I liked how they turn it off then on like this:I wonder if trying it that way might help you, assuming we're doing it to the correct node.Code: Select all
- {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x29, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
i need to take a look at his code, cause thats not a command, but that functions must end executing a command
i think its just a constant, that you must send the 0x0d hexadecimal value to the system, to some file or memory to activate the option AC_PAR_AMP_IN_CAPMrEen wrote: ↑Wed Jan 23, 2019 10:59 pmTo add to my confusion. From the source code:Now I know that param can have 2 settings (at least) so what does 0x0d mean?Code: Select all
#define AC_PAR_AMP_IN_CAP 0x0d
Other than the defines, there's almost nothing else about the params in the source code nor the headers.![]()
yes u are right!! there is no documentation at all