HP Laptops in the series dv-5, dv-6, dv-7 and some HP minis have a strange problem in Fedora 10. When you plug in headphones, the sound still continues to come out the speakers as well as out the headphone jack. And In Fedora 11, no sound actually comes out of the plugged in headphones. In this article we will tell you how to fix the problem in two different ways.
The Long Method
Download and unzip a package called hda-verb. Now use the following command line switches with hda-verb to turn on and off your headphone.
To activate the sound on the speaker:
sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_data 1
sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_dir 1
sudo ./hda-verb /dev/snd/hwC0D0 0x1 set_gpio_mask 1
To activate the sound on the headset:
sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_CONNECT_SEL 1
To mute the speaker:
sudo ./hda-verb /dev/snd/hwC0D0 0x0d SET_PIN_WIDGET_CONTROL 0
To unmute the speaker:
sudo ./hda-verb /dev/snd/hwC0D0 0x0d SET_PIN_WIDGET_CONTROL 0x40
To mute the headphones:
sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0
To unmute the headphones:
sudo ./hda-verb /dev/snd/hwC0D0 0x0f SET_PIN_WIDGET_CONTROL 0x40
The Short Method
The method described above is very long indeed and becomes quite weird when you have to use it again and again. So you can use this package called hda-hp developed by a guy called vwbusguy. You can download the packages from here. The commands can be run as root as shown below:
headphone-on – Mutes the laptop speakers, and unmutes the headphone jacks.
headphone-off – Mutes the headphone jacks, and unmutes the laptop speakers.