LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-07-2019, 08:22 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Pulseaudio With HDMI & Volumes


This is really 2 questions:

1. My pulseaudio playback volumes come set wrong every time. I found a file to fiddle with online, but it doesn't exist at that location here.

2. I need to get pulseaudio talking to hdmi. I did it on this box on 14.1(?) and my solution involved no pulseaudio, a global /etc/asound.conf, which sent stuff to hdmi if hdmi was there, and resampled it @48000hz to overcome nastiness in hdmi sound. I also had a per user ~/.asoundrc, which mapped hdmi sound to the jack-plug - this dodge was to allopw for live translators.

I just need hdmi sound in Pulse. A reboot doesn't sort it, and pulse doesn't see hdmi. Alsamixer only shows 1 control @100%. Any ideas of grappling with pulse?

Last edited by business_kid; 09-07-2019 at 12:41 PM.
 
Old 09-08-2019, 03:20 AM   #2
RadicalDreamer
Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 979

Rep: Reputation: 472Reputation: 472Reputation: 472Reputation: 472Reputation: 472
Have you tried pavucontrol?
 
1 members found this post helpful.
Old 09-08-2019, 01:10 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Yes, it's basically useless.

In problem 1, the playback is set by default about 30% volume. I have to open pavucontrol & fix it manually.

In Problem 2,pavucontrol never shows a hdmi input/output. It shows input streams, recording devices, & output devices (headphones or speakers).

In alsamixer, I fiddled with the menus, and got up loads of columns. I decided hdmi was the PCM, adjusted that. I'm pessimistic, but I'll go looking for my old config stuff.
 
Old 09-08-2019, 02:01 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,416

Rep: Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759
Quote:
Originally Posted by business_kid View Post
Yes, it's basically useless.

In problem 1, the playback is set by default about 30% volume. I have to open pavucontrol & fix it manually.

In Problem 2,pavucontrol never shows a hdmi input/output. It shows input streams, recording devices, & output devices (headphones or speakers).

In alsamixer, I fiddled with the menus, and got up loads of columns. I decided hdmi was the PCM, adjusted that. I'm pessimistic, but I'll go looking for my old config stuff.
Did you look at the pavucontrol configuration tab?
 
Old 09-08-2019, 02:07 PM   #5
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,122

Rep: Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600
For your problem 1 try:

- to reset your user pulseaudio profile:
https://www.linuxquestions.org/quest...9/#post5865962
https://www.linuxquestions.org/quest...9/#post5867337
- some inspiration for setting up the volume manually:
https://www.linuxquestions.org/quest...rt-4175623273/

For your second problem, some hints, checks & docs:

- set the default output - in this case it was the analogue-out, but you can choose HDMI:
https://www.linuxquestions.org/quest...ue-4175633510/
- your ALSA related files (on -current) should look like:
https://www.linuxquestions.org/quest...4/#post5863029
- docs - official pulseaudio "Perfect Setup" documentation:
https://www.freedesktop.org/wiki/Sof.../PerfectSetup/
- one of the few (if not the only one) good sources for details and practical examples about pulseaudio:
https://wiki.archlinux.org/index.php/PulseAudio
- and to troubleshoot the pulseaudio launch & state (check if it's happy), kill all existing pulseaudio sessions and run it manually with extra verbose output:
Code:
pulseaudio -vvvv
I'm not sure I understand your actual sound configuration state, because in your first post you mentioned some changes you did. Was that just an example about a past configuration? Is "this box" still on 14.1 ?
It'll be useful if you could provide the output of:
Code:
cat /proc/asound/cards
cat /proc/asound/pcm
 
1 members found this post helpful.
Old 09-08-2019, 03:02 PM   #6
0XBF
LQ Newbie
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 29

Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Did you look at the pavucontrol configuration tab?
I second trying this. In the past I've just switched from Analog Stereo to HDMI output from the drop down menu on the configuration tab and everything worked fine.
 
Old 09-09-2019, 04:39 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
Originally Posted by Richard Cranium View Post
Did you look at the pavucontrol configuration tab?
Yep - hdmi doesn't appear in pavucontrol. Although I found defaults set in /etc/rc.d/rc.alsa, which were overriding anything set & being stored, and I adjusted them It seems a bit better. Problem 1 appears sorted.

@agba: Thanks very much for the links. You've obviously suffered yourself, or done your own research. There's SO MUCH bloaty hand holding on pulse with so little info.

I'm on Slackware64-Current with the iso of 16-07-2019 downloaded, as Current is a moving target. That way I can add or delete from the correct version. It got problematic staying in 14.2.

I'm going off to examine those links and see what comes of it. I'll also shift to the huge kernel in case I'm missing something in there.

As for pavucontrol, in the output ports, there's a choice of speakers or headphones(unplugged). No hdmi. The "Show" tab gives me Virtual devices(none) or speakers/headphones on the other two options (Output devices or all devices)
 
Old 09-09-2019, 06:19 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
No different on the huge kernel; no hdmi in pavucontrol. From experience, I know this is bitchy in this laptop.

EDIT: aplay -l lists the HDMI as device 3, but pacmd list-sinks doesn't see it.

Last edited by business_kid; 09-09-2019 at 06:37 AM.
 
Old 09-09-2019, 11:12 AM   #9
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,122

Rep: Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600
Quote:
Originally Posted by business_kid View Post
No different on the huge kernel; no hdmi in pavucontrol. From experience, I know this is bitchy in this laptop.

EDIT: aplay -l lists the HDMI as device 3, but pacmd list-sinks doesn't see it.
If your hdmi output doesn't appear in the sinks list, then you might find it in the card profiles list. Run:
Code:
/usr/bin/pacmd list-cards
- and look in the section profiles: -> outputs (analog-mono/stereo ... hdmi-stereo)
- to set the hdmi output, given your card is 0 (change it accordingly if you have more cards), just instruct pulseaudio to use the output:hdmi-stereo (it might be different - change it) card profile:
Code:
/usr/bin/pactl set-card-profile 0 output:hdmi-stereo
And to put it back on analogue, run:
Code:
/usr/bin/pactl set-card-profile 0 output:analog-stereo+input:analog-stereo
Source/Inspiration:
https://wiki.archlinux.org/index.php..._audio_to_HDMI
 
Old 09-09-2019, 11:57 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
/Later in the day: It's working! Why I don't really know
Right, even on my own kernel, I get the following:
Code:
bash-5.0$ lsmod |grep -i hdmi
snd_hda_codec_hdmi     57344  1
snd_hda_codec         122880  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           69632  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_pcm                90112  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd                    81920  14 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm

bash-5.0$ sudo dmesg |grep -iC2 hdmi
[    0.185809] ACPI: Added _OSI(Processor Aggregator Device)
[    0.186332] ACPI: Added _OSI(Linux-Dell-Video)
[    0.186424] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.193888] ACPI: 5 ACPI AML tables successfully acquired and loaded
[    0.197274] ACPI: Dynamic OEM Table Load:
--
[    5.390712] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[    5.393084] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[    5.394652] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[    5.447259] Bluetooth: Core ver 2.22
[    5.449729] NET: Registered protocol family 31
bash-5.0$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

bash-5.0$ pactl  list short sinks
0	alsa_output.0.analog-stereo	module-alsa-sink.c	s16le 2ch 44100Hz	RUNNING
1	alsa_output.pci-0000_00_1b.0.hdmi-stereo	module-alsa-card.c	s16le 2ch 44100Hz	IDLE
Pavucontrol's "Output Devices" now shows a top half, and a bottom half. In the top half, I have 'Built in Audio Analog Stereo, with front (right & left) sliders, and the bottom has a 'menu' with one entry, HDMI display. What prevented this was that I has a 'microphone' (my headphones plugged into the laptop's microphone socket. A casualty is the laptop's earphone socket, but I don't mind, because the monitor has an earphone socket, and better speakers.

Sadly, Like most of agba's industriously researched threads, it's a meandering thread where I have no real clue what fixed it. Most of the clever things I tried to do were rejected on some technicality by pulse. I hope this helps the next poor sod grappling with this. The cure seems to be to plug everything except speakers out, plug hdmi in, & reboot. Pulse apparently see hdmi with an earphone or mic plugged in :-//. Also, it's not necessary to resample @48khz, which I had to do with alsa
 
1 members found this post helpful.
Old 09-09-2019, 01:00 PM   #11
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,122

Rep: Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600
Quote:
Originally Posted by business_kid View Post
/Later in the day: It's working! Why I don't really know
I remember "warning" you in a recent thread that deductive reasoning (or any other form of hypothetical reasoning) doesn't always work with pulseaudio. In this respect, I moved all my multimedia needs on a few 5EUR/GBP Raspberry Pi Zero boards (Kodi & Slackware ARM 14.2 & pulseaudio 9) so I don't need to bother and spend afternoons/weekends in fixing the sound on pulseaudio updates.
To give you an example (bragged about it in the Slackware ARM subforum) pulseaudio 9 is working OK, whereas starting with pulseaudio 11 I got into issues on the same system, same audio card, same kernel (including audio driver) and the same alsa & pulseaudio conf files:
Code:
# pulseaudio 9.0-rebootstrapped (Slackware 14.2 ARM)
        profiles:
                output:analog-mono: Analog Mono Output (priority 200, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
                off: Off (priority 0, available: unknown)
# pulseaudio 12.2-rebootstrapped (Slackware -current ARM) - no stereo analog output, but the sound itself is stereo :) 
        profiles:
                output:analog-mono: Analog Mono Output (priority 700, available: unknown)
                off: Off (priority 0, available: unknown)
I noticed that the pulseaudio profiles from /usr/share/pulseaudio/alsa-mixer/paths/ are slightly different and tried to learn more about them, found some "documentation":
https://www.freedesktop.org/wiki/Sof...ALSA/Profiles/
Not really helpful and it also contains a typo:
Code:
udevadm info -qall -p /sys/class/sound/card0/
# should be
udevadm info -qall -p /sys/class/sound/card0
Then I learned that there were some bugs with pulseaudio handling profiles (fixed) and also with the detection of jacks (incl HDMI), the outputs will appear only when the connector is plugged and pulseaudio restarted.
https://bugs.launchpad.net/ubuntu/+s...86/comments/14

Happy to hear you have it working now, even if you have no clue how/what you did
As for me, I'm very happy with my Raspberry Pi Zero toys and pulseaudio 9.
 
Old 09-10-2019, 04:34 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
The only thing I did different to get it working was to extract a 'microphone' whose existence pulse wouldn't acknowledge (and still doesn't) out of it's socket. I believe the same madness applied to earphones. No form of reasoning (deductive or otherwise) brings me to that as a cause. But I changed no files. Maybe a full restart instead of a reboot? They're different inside a pc. I learned that in the early days.
 
Old 09-10-2019, 04:39 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Interesting. Pulse & alsa respawn here - like agetty. If you kill 'pgrep pulse', kill it, and pgrep it again, it's still there, with a different PID. Ditto alsa. Perhaps you need a restart to get a clean config to be read…
 
Old 09-10-2019, 03:52 PM   #14
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,122

Rep: Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600Reputation: 600
Quote:
Originally Posted by business_kid View Post
Interesting. Pulse & alsa respawn here - like agetty. If you kill 'pgrep pulse', kill it, and pgrep it again, it's still there, with a different PID. Ditto alsa. Perhaps you need a restart to get a clean config to be read…
If the autospawning is enabled (I believe it is by default in Slackware - have no default configs at hand) and the pulse server is in use (sound requested by an app) it will just restart automatically - check the Autospawning secton:
https://www.freedesktop.org/wiki/Sof.../User/Running/
You should leave it on and just make sure that no app is requesting sound when you do config modifications and need to restart pulseaudio.

You could restart pulseaudio in the "normal" way, without explicitly killing the process:
Code:
/usr/bin/pulseaudio -k
/usr/bin/pulseaudio -D
 
Old 09-11-2019, 05:16 AM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,482

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
This (predictably) has gone from solved --> unsolved --> solved again, and this time I know what made the difference.

The laptop got moved into position to a bigger screen, and the sound went again. The kernel dmesg, 'aplay -l' & pulseaudio list-sinks all tell me about hdmi. Pavucontrol has lost the bottom half and only saw the internal stuff.

The solution proved to be:
Code:
pgrep pulse #& note pid
pulseaudio -D
pgrep pulse #showed 2 pids
kill <old pid>
WHY that worked and a restart or reboot didn't I don't know

I then had two halves in pavucontrol and the external speakers work. Now I have pulse in system mode since slackware landed that way. I only basically use 1 user anyhow, although there is two.

Pulseaudio is really a POS. What irritates me is that I've been farting about for hours trying to sort this, and yesterday as well. You stop messing when it works, but you're no wiser.

EDIT: Suspend screws up the screens royally, but I suppose that's ok? It comes back quite unaware it's doing a left/right thing with the video. Pulse takes advantage of the pretext to raise a middle finger at my wishes. But the trick detailed above sorts it.

Last edited by business_kid; 09-11-2019 at 02:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[ProLiant MicroServer, ATI R6xx HDMI, Digital Out, HDMI] No HDMI sound at all vnatius Linux - Hardware 15 08-16-2012 01:09 PM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Gotta love those &#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration