Headphones

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Kaye

Re: Headphones

Post by Kaye »

I had the same problem, however it is different for me because I use OSS rather than ALSA (which is the default). I ended up having to write a small bash script to change my mixer values and I just run that script to put my laptop in "headphone mode." Unless there is some ALSA trick I'm unaware of, which is very possible, you'll just have to mess with the mixer until you achieve the desired results. I honestly don't even know what the ALSA mixer looks like, but I would advise looking for something along the lines of the input-mode or speaker-mode, anything like that. For me, the bash script is:

Code: Select all

 #!/bin/bash

 MODE=$(ossmix jack.int-speaker.mode) 
 if [ "$MODE" = "Value of mixer control jack.int-speaker.mode set to mix2" ]; then
	 ossmix jack.int-speaker.mode input
 else
	 ossmix jack.int-speaker.mode mix2
 fi
So, this communicates with OSS, telling it to change the int-speaker mode. For me, hitting <Control> h runs the script, changing my audio output to speakers or to the headphones jack. Hopefully you can modify that script to suit your needs.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Kaye

Re: Headphones

Post by Kaye »

If you want to use <Control> h as a shortcut, go into the Keyboard Shortcuts menu and set <Control> h to run the command sh ~/.headphones.sh
Kaye

Re: Headphones

Post by Kaye »

That means you don't have the OSS package installed. Look for the package in Synaptic, install it, then try again.
Kaye

Re: Headphones

Post by Kaye »

Sorry, that output you posted has confused me. What exactly are you trying to run as a terminal command? As a quick test just type

Code: Select all

ossmix

in a terminal and post the output of that here.
Kaye

Re: Headphones

Post by Kaye »

It was as I thought, for some reason your system is not recognizing OSS. Switching you to OSS just for this if ALSA is working perfectly for everything else might be a little bit of overkill. If you would like to switch to OSS, you can follow this guide to make it happen. Otherwise, wait for someone who knows about ALSA to come in here and solve the problem, because I know nothing about it :?
Kaye

Re: Headphones

Post by Kaye »

No problem. I had serious sound issues when I first started out with Linux so I never mind helping others fix theirs (when I can :P ). Good luck!
Locked

Return to “Hardware Support”