LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-21-2017, 10:13 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Sound on hdmi & earphone jack


Back in early 2015 I had a problem with getting a sound setup for a projector in a hall. Usually, I needed to stream to hdmi, but to accommodate translation, I needed video on hdmi and sound on the earphone jack. Some kind soul sent me an alsa config piece on resampling the hdmi, (mine had digital going to audio giving fierce noise) and gave me an explanation (digital --> analogue) and I had an ~/.asoundrc which I put in via a script that switched from jack to hdmi.

Now I have updated, deleted the resampling config not realising what it was, and only this morning cleared the backup. It's intel hda. Does anyone have the resampling config magic for alsa, or pulseaudio. I think I found the .asoundrc with a thread searchhttp://www.linuxquestions.org/questi...io-4175533450/

Last edited by business_kid; 02-21-2017 at 10:14 AM.
 
Old 02-22-2017, 06:07 AM   #2
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Rep: Reputation: 40
Are you using 14.1 from 2015, 14.2 or current? You could use apulse to manage sound interfaces instead of .config files from alsa.
 
Old 02-23-2017, 04:55 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I have 14.2 installed, with no sound on hdmp at the moment, nor does it show in pavucontrol. I don't run pulseaudio, and have been relying on alsa, but that can change. The soundcard shows this way:
Code:
bash-4.3$ 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
ATM, everything goes to speakers. When I open vlc, it mutes headphones and S/PDIF (Whatever that is). In the past, HDMI sounded absolutely congenitally deformed until I resampled it. It's a bottom quality sound chip, but I'm not stressed as long as I can get some control of it again. Despite rc.pulseaudio not being executable, something is starting it :-o. To put it mildly, it's not set up :-P.
Can it be done with pulse audio? I'll drag my sound system into the 21st century if necessary.

EDIT: My ideal would be to have hdmi take the sound when plugged in unless I did something to send it to speakers/earphones.

I set up a luser back in 2015 for use in the hall, in case others had to use my pc. As it turned out, they did because people couldn't configure m$ windows or MacOS as well as LQ helped me to configure linux. I played a video as that user. I lost X immediately, froze the pc, nobbled keyboards, but the audio worked perfectly in speakers - earphones. I presume vlc was running that. That means vlc's oddities are related to my user config.

Last edited by business_kid; 02-23-2017 at 05:27 AM.
 
Old 02-23-2017, 05:37 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Solved this. A copy of the resampling config turned out to be buried in the extra luser's directory, and I attach it here. The rest of this is basic housekeeping, and if I have an issue I'll post.
Code:
pcm.hdmi_hw {
  type hw
  card 0     # <--- card number
  device 3   # <--- device number = my hdmi device
}

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hdmi_hw"
buffer_size 32768
rate 48000
period_time 0
period_size 1024
buffer_time 0
}} 

pcm.rate_convert {
type plug
slave { pcm "dmixer" 
      }
}

pcm.hdmi_complete {
  type softvol
  slave { pcm "rate_convert" } 
  control.name "Master"
  control.card 0
}

pcm.null_capture {
  type null
}
pcm.!default {
  type asym
  playback.pcm {
    type plug
    slave { pcm "hdmi_complete" }
  }
  capture.pcm {
    type plug
    slave { pcm "null_capture" }
  }
}
This is switched in to give sound on hdmi. It is switched out to give sound on speakers. No autodetect, but great for the distortion issue I was having.
 
1 members found this post helpful.
  


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
[SOLVED] Impedance of earphone jack on standard PC? business_kid Linux - Hardware 5 03-15-2015 04:59 AM
[SOLVED] Laptop speaker NO sound but earphone jack got!?? gabytf Linux - Hardware 16 05-06-2012 03:44 AM
How come i can't get sound thru hdmi only audio jack? UNIXSOLDIER187 Linux - Newbie 7 12-28-2010 10:49 AM
Trashed my laptop earphone jack... software fix to swap microphone - earphone output? setine Linux - Hardware 2 05-11-2006 11:25 AM

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

All times are GMT -5. The time now is 08:28 AM.

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
Open Source Consulting | Domain Registration