View previous topic :: View next topic |
Author |
Message |
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Tue Jun 14, 2016 10:00 pm Post subject: Support for adjusting headphones volume on the headphones. |
|
|
Hi.
I have headphones with a control of volume on the cable, but when I press the buttons nothing happens. Is there a particular driver I have to install in the kernel to support that? Or do I have to set some key event binding?
Thanks for you help ,
rozyk |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Wed Jun 15, 2016 5:14 am Post subject: |
|
|
It's working when connected to other devices, it must be the case of handling some key event? |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Sun Jun 19, 2016 2:42 pm Post subject: |
|
|
@up |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sun Jun 19, 2016 3:31 pm Post subject: |
|
|
You should check the mixer during you press the button to see if something move/appear with Alsamixer and Pulseaudio if you use both. A common problem can be that the input/output headphones volumes are lock/mute.
Even Aumix can help you if the headphones volumes depend on OSS compatiblity. The appropriate sound modules must be loaded, snd-pcm-oss and snd-mixer-oss.
If you have several headphone connectors you can use like line-in, line-out, headhpones and speakers, not all may work by default. You have to make a test with each of them with your headphones. Some tweaks may need to be done on Linux side to make all them work properly. Of course I think about a desktop computer. _________________ Paul |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Sun Jun 19, 2016 10:20 pm Post subject: |
|
|
It's a laptop, does it make any difference?
Code: |
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_CROSS_COMPILE=""
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_TUN_VNET_CROSS_LE is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
CONFIG_SSB_POSSIBLE=y
CONFIG_BCMA_POSSIBLE=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
|
I checked with alsamixer and nothing is muted and nothing is changing when I press the buttons on the headphones. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Jun 19, 2016 11:09 pm Post subject: |
|
|
Just to make sure: these are USB headphones and not some proprietary phone connector, right? |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Mon Jun 20, 2016 7:33 pm Post subject: |
|
|
When Alsamixer is open press the F6 button. It will show you the available mixers for every sound card. If your headsets appear, choose this sound card and look a the states of the channels. Headsets for USB are consider as separate sound card who have it's own mixer for volume.
I have Logitech wireless headsets in dual mode connection USB or Bluetooth. In USB mode, I cannot change the volume level from the headsets. I can only from Linux. In Bluetooth mode I can. I don't understand why, I need to search for this. _________________ Paul |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Mon Jun 20, 2016 8:57 pm Post subject: |
|
|
But those are not usb headphones. They have mini jack.
Nothing particular appears there in alsamixer upon pressing F6. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Tue Jun 21, 2016 1:47 am Post subject: |
|
|
I found a solution for myself and I think it should work for a lot a USB headsets wire or wireless. It appear, thank's to my Google search, that the USB headsets buttons volumeup, volumedown, cdplay, cdprev and cdnext in my case are detected as ACPI events by Linux.
So, the acpid daemon must be up and running first. If the acpid actual configuration do not know what to do with a button event or do the wrong thing, it must be associate explicitely to an action that correspond or not to it function. If you start listenning to ACPI events in a terminal with the command
and than press your up and down the volume buttons, the events should be detected and reported as button/volumeup and button/volumedown. So with these informations you can create an action like I did in the file /etc/acpi/events/volumeup
Code: |
event=button/volumeup
action=amixer -c 0 set PCM 1+ |
and /etc/acpi/events/volumedown:
Code: | event=button/volumedown
action=amixer -c 0 set PCM 1- |
Just be sure that the -c parameter value of amixer correspond to your USB sound card number as best reported by the command
You cant take any action you want for each event reported for any button of your headsets.
Than restart the acpid daemon. You should be able to increase and decrease your USB headsets volume with it's buttons. It work correctly with my
Code: | Bus 004 Device 003: ID 046d:0a29 Logitech, Inc. H600 [Wireless Headset] |
I do not have any wire USB headsets to see if buttons are detected as ACPI events too. _________________ Paul |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Tue Jun 21, 2016 4:56 am Post subject: |
|
|
acpi_listen only detects the press of the microphone button, but doesn't detect the press of the volume up/down. (there are three buttons, microphone, volume up, volume down)
Code: | acpi_listen
jack/microphone MICROPHONE unplug
jack/microphone MICROPHONE plug
jack/microphone MICROPHONE unplug
jack/microphone MICROPHONE plug
jack/microphone MICROPHONE unplug
jack/microphone MICROPHONE plug
jack/microphone MICROPHONE unplug
jack/microphone MICROPHONE plug |
https://sourceforge.net/p/ibm-acpi/mailman/message/28430708/
Can this be related? I also have level unsupported. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Tue Jun 21, 2016 10:10 am Post subject: |
|
|
If you have a Thinkpad, the package tpb may help you. You can configure the Thinkpad integrated buttons with it.
You need to configure Gentoo for the Thinkpad first than, with the appropriate kernel support, maybe the headsets buttons will be detected as ACPI events. I cannot say more for the moment. On my side, of six buttons, only the microphone mute is not detected as an ACPI event, but it work as it should. All others I have are now correctly configure to be use properly.
The fact that those buttons where not usable was boring me since I had the Logitech headsets. Thank's to your thread, I am happy to have found a solution that may apply to a lot of USB headsets. You need to make searches as I did.
_________________ Paul |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Tue Jun 21, 2016 10:26 pm Post subject: |
|
|
tpb didn't help. |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Sat Jun 25, 2016 10:11 am Post subject: |
|
|
@up |
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Sat Jun 25, 2016 12:10 pm Post subject: |
|
|
you could try
to see if xbindkeys see the
key presses ... (on my thinkpad some key presses that
acpi listen does not see, are seen by xbindkeys). If
xbindkeys registers the presses you can then assign
vol up or down scripts _________________ .... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme) |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sat Jun 25, 2016 12:55 pm Post subject: |
|
|
Thank's albright for this answer. I haven't think to use xbindkeys. It detect some of my buttons. However, xev detect all the buttons except the microphone mute button like acpi_listen.
So, xev can be use too to know the keycode of a button and the keysym associated with it. Than you can use xmodmap to associate the appropriate keysym to the keycode if needed. In final, with Xfce4 I can associate a command to execute for each keysym of my headsets buttons in Menu Xfce4/Parameters/Keyboard/Application shortcuts. _________________ Paul |
|
Back to top |
|
|
rozyk n00b
Joined: 07 May 2010 Posts: 44
|
Posted: Sat Jun 25, 2016 11:18 pm Post subject: |
|
|
Thanks guys for your answers.
Unfortunately, it didn't help. I've tried each of the three: acpi_listen, xev, xbindkeys.
xbindkeys and xev didn't detect anything (no volume up/down, no microphone mute/unmute)
acpit_listen detects only microphone mute/unmute.
None of the tools detects volume
Do you have any other ideas? |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sun Jun 26, 2016 9:47 am Post subject: |
|
|
Is the acpid daemon up and running? One of the last tries for me is to watch the Linux kernel messages during pressing the buttons.
Code: | watch -d -n 2 'dmesg | tail' |
I would prefer to do this one at the console and not in X.
Try all the tests you have done so far with a binary distribution, in live can be enough. An other kernel configuration can give other results.
I am sorry to tell you this, try other USB headsets. _________________ Paul |
|
Back to top |
|
|
|