Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. [...]
  2. Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
  3. Control: name="Speaker Phantom Jack", index=0, device=0
  4. Pincap 0x00000014: OUT Detect
  5. Pin Default 0x90170110: [Fixed] Speaker at Int N/A
  6. Conn = Analog, Color = Unknown
  7. DefAssociation = 0x1, Sequence = 0x0
  8. Misc = NO_PRESENCE
  9. Pin-ctls: 0x00:
  10. [...]
  11.  
  12. [...]
  13. Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
  14. Control: name="Speaker Phantom Jack", index=0, device=0
  15. Pincap 0x00000014: OUT Detect
  16. Pin Default 0x90170110: [Fixed] Speaker at Int N/A
  17. Conn = Analog, Color = Unknown
  18. DefAssociation = 0x1, Sequence = 0x0
  19. Misc = NO_PRESENCE
  20. Pin-ctls: 0x40: OUT
  21. [...]
  22.  
  23. jack/microphone MICROPHONE plug
  24. jack/headphone HEADPHONE plug
  25. jack/microphone MICROPHONE unplug
  26. jack/headphone HEADPHONE unplug
  27.  
  28. ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0x40
  29.  
  30. ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0
  31.  
  32. root@brix:/etc/acpi# evtest
  33. No device specified, trying to scan all of /dev/input/event*
  34. Available devices:
  35. /dev/input/event0: Power Button
  36. /dev/input/event1: Power Button
  37. /dev/input/event2: Logitech Logitech BT Mini-Receiver
  38. /dev/input/event3: CM Storm QuickFire Rapid keyboard
  39. /dev/input/event4: CM Storm QuickFire Rapid keyboard
  40. /dev/input/event5: PixArt Microsoft USB Optical Mouse
  41. /dev/input/event6: Logitech Logitech BT Mini-Receiver
  42. /dev/input/event7: Video Bus
  43. /dev/input/event8: HDA Intel HDMI HDMI/DP,pcm=3
  44. /dev/input/event9: HDA Intel HDMI HDMI/DP,pcm=7
  45. /dev/input/event10: HDA Intel HDMI HDMI/DP,pcm=8
  46. /dev/input/event11: HDA Intel PCH Front Mic
  47. /dev/input/event12: HDA Intel PCH Rear Mic
  48. /dev/input/event13: HDA Intel PCH Line
  49. /dev/input/event14: HDA Intel PCH Line Out
  50. /dev/input/event15: HDA Intel PCH Front Headphone
  51. Select the device event number [0-15]: 14
  52. Input driver version is 1.0.1
  53. Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
  54. Input device name: "HDA Intel PCH Line Out"
  55. Supported events:
  56. Event type 0 (EV_SYN)
  57. Event type 5 (EV_SW)
  58. Event code 6 (SW_LINEOUT_INSERT)
  59. Properties:
  60. Testing ... (interrupt to exit)
  61. Event: time 1465927534.591787, type 5 (EV_SW), code 6 (SW_LINEOUT_INSERT), value 0
  62. Event: time 1465927534.591787, -------------- EV_SYN ------------
  63. Event: time 1465927536.618428, type 5 (EV_SW), code 6 (SW_LINEOUT_INSERT), value 1
  64. Event: time 1465927536.618428, -------------- EV_SYN ------------
  65.  
  66. #!/bin/bash
  67. #
  68. # Switching on or off your headphone speaker and mic jacks
  69. # and at the same time switching off or on your laptop front speakers.
  70. # requires hda-verb-0.3-6-mdv2011.0.x86_64
  71. #
  72. # Before putting it in place make sure to test your PIN_WIDGET_CONTROL's
  73. # with su -c 'python2 hda-analyzer.py' available here :
  74. # http://www.alsa-project.org/hda-analyzer.py
  75. #
  76. PIN_CONFIGS=/sys/class/sound/hwC0D0/init_pin_configs
  77. if [ ! -f $PIN_CONFIGS ]; then
  78. echo "Your kernel is missing CONFIG_SND_HDA_HWDEP=y"
  79. exit 0
  80. fi
  81. if [ ! -f /usr/sbin/hda-verb ]; then
  82. echo "This script requires hda-verb-0.3-6-mdv2011.0.x86_64"
  83. exit 0
  84. fi
  85. PINS_PRESENT=`cat $PIN_CONFIGS | awk '{print $1}'`
  86. if [ `basename $0` = "speakers-off.sh" ]; then
  87. # Headset (Mic (Node 0x1b) + Headphone Drive (Node 0x19)) : ON
  88. # Laptop Speaker (Node 0x1f) : OFF
  89. [ `echo "$PINS_PRESENT" | grep 0x19` ] &&
  90. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x19 SET_PIN_WIDGET_CONTROL 0x40
  91. [ `echo "$PINS_PRESENT" | grep 0x1f` ] &&
  92. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x1f SET_PIN_WIDGET_CONTROL 0
  93. [ `echo "$PINS_PRESENT" | grep 0x1b` ] &&
  94. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x1b SET_PIN_WIDGET_CONTROL 0x64
  95. fi
  96.  
  97. if [ `basename $0` = "speakers-on.sh" ]; then
  98. # Headset (Mic (Node 0x1b) + Headphone Drive (Node 0x19)) : OFF
  99. # Laptop Speaker (Node 0x1f) : ON
  100. [ `echo "$PINS_PRESENT" | grep 0x19` ] &&
  101. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x19 SET_PIN_WIDGET_CONTROL 0
  102. [ `echo "$PINS_PRESENT" | grep 0x1f` ] &&
  103. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x1f SET_PIN_WIDGET_CONTROL 0x40
  104. [ `echo "$PINS_PRESENT" | grep 0x1b` ] &&
  105. /usr/sbin/hda-verb /dev/snd/hwC0D0 0x1b SET_PIN_WIDGET_CONTROL 0x24
  106. fi
  107.  
  108. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement