SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This may be a futile effort ... I have an older 32 bit Sony Vaio VGN-P530H running Slackware 14.2. I use this "computer" as a backup device for several other computers. It also monitors various clients' computers to verify that they're running.
I would like to add speaker output so I get an audible notice when something goes wrong. I've tried "mplayer StarTrekKlaxon.wav" which plays on other system, but on this one I get:
Code:
MPlayer 1.2.1-5.3.0 (C) 2000-2016 MPlayer Team
Playing StarTrekKlaxon.wav.
libavformat version 56.40.101 (internal)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 11025 Hz, 1 ch, u8, 88.2 kbit/100.00% (ratio: 11025->11025)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [alsa] 11025Hz 1ch u8 (1 bytes per sample)
Video: no video
Starting playback...
A: 0.0 (00.0) of 5.0 (05.0) ??,?% $<50>
Audio device got stuck!
but then it does run the .wav, however no sound. I do have external speakers plugged into the headphone port.
The sound card is
Code:
# lspci
00:1b.0 Audio device: Intel Corporation System Controller Hub (SCH Poulsbo) HD Audio Controller (rev 06)
This device does not have X or KDE running, so I can't use System Settings or pavucontrol. Is there some other way to configure audio? Certainly this device is capable.
Do you get a list of options in the top-right: F1 Help; F2: System information; F6: Select soundcard? etc.
If so, maybe you can get some pointers from F2 or F6.
I am on 15.0, so I don't know if 14.2 will react differently, but... For me,
alsamixer -c 0 gets me the HDMI output on my video card.
alsamixer -c 1 gets me the audio on my motherboard's audio chip (Realtek ALC1220).
alsamixer -c 2 gets me an "invalid card index" error.
Do you just have the one sound card showing up if you try different index numbers?
...and lastly, you said "I do have external speakers plugged into the headphone port." How many ports are on the card? Speakers and headphones don't necessarily have the same output voltage specifications and probably should not be mixed. In your alsamixer output, you say that there are headphone channels that are displaying 0 (for both audio output and microphone input), while the "speaker" channel also exists and is at 100%.
Perhaps there is a speaker port that you should be using (best bet)? If not, then perhaps you need to figure out how to get the headphone output increased above 0%?
I see the F2, F6 options that brobr mentions. F2 will list all cards that exist (not just the one you chose with -c), and F6 will let you switch to any other ones in the system.
...and the bar graphs do not respond to changing audio output - they are just the current settings of the (software) volume control. So 0 means "off".
Last edited by dhalliwe; 09-12-2022 at 02:18 PM.
Reason: Additional information.
If you have external speakers plugged into the headphone jack, and alsamixer says volume for headphone is 0, that could be why you are not hearing anything.
FYI, in alsamixer, left/right arrows keys will switch which output you are working with. PgUp/PgDn will make large changes in levels (for the current output), and up/down arrow keys will make single-digit changes in output.
Hit F1 or H in alsamixer and then Page Down/Page Up.
OK - figured that out and was able to change the Headphone to 100%. The Speaker was already at 100%. I plugged actual earphones into the jack. Still no sound. This is not looking hopeful
Quote:
Originally Posted by SW64
pavucontrol might be easier if your computer is not headless. XFCE, Plasma, etc.
This device won't run X.
Quote:
Originally Posted by dhalliwe
FYI, in alsamixer, left/right arrows keys will switch which output you are working with. PgUp/PgDn will make large changes in levels (for the current output), and up/down arrow keys will make single-digit changes in output.
If your system is using pulseaudio, which was the default in 14.2 (iirc), then its possible that the audio output in pulseaudio is muted. In this case, adjusting the alsa mixer wont change audio volume until you unmute the sink in pulseaudio. The design is that applications send audio to pulseaudio, then pulseaudio sends audio to the alsa device, so when pulse is muted its not sending an output signal at its part in the chain.
The 'pactl' tool is useful to look at for working with pulseaudio from the command line. The 'pactl help' command and man page explain all of pactl's command line usage and is helpful to reference.
You can check if pulseaudio is in use with:
Code:
pactl info
E.g. My system reports info like this, key things I've highlighted (and I removed some id stuff). This is also on Slackware 15.0 instead of 14.2 so the version will differ.
Code:
$ pactl info
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 18
Tile Size: 65472
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
Default Source: alsa_input.pci-0000_00_1f.3.analog-stereo
If you confirm you are using pulseaudio then you should check if the sink is muted with the 'get-sink-mute' command. I use the following line to save typing out the full name of the default sink:
Code:
pactl get-sink-mute $(pactl get-default-sink)
Which should report yes/no to whether its muted. If it is muted, you can unmute by setting it to '0' (or 'toggle'), e.g:
Code:
pactl set-sink-mute $(pactl get-default-sink) 0
With that unmuted and alsamixer turned up, you should get a signal output. Good luck.
Edit: Looks like index 0 is also the default sink, so you can just address it with something like 'pactl get-sink-mute 0', instead of getting the string of the full name.
I looked up the manual for your computer. It apparently has a speaker/headphone switch. To turn it on and off, hold down FN and press F2. Volume Down and Volume Up is FN+F3 and FN+F4. Here's the manual link. The URL should take you directly to page 30.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.