Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Audio is working but not in X-Plane
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
TomaLars
n00b
n00b


Joined: 30 Jul 2019
Posts: 44

PostPosted: Mon Jul 05, 2021 9:12 am    Post subject: Audio is working but not in X-Plane Reply with quote

Hi gentoonians the story goes like this:
I have ALSA installed and everything was fine.
I have installed two weeks ago JACK audio server because I play sometimes with an audio interface and everything is fine.

Yesterday, after a month or so, I run X-Plane (the simulator game) and the audio didn't work.
I have checked my ~/.asoundrc file, the audio interfaces, I have run the speaker-test, checked alsamixer, played some music with ncmpcpp, played a couple of audio files from the browser....everything works.
I run X-Plane again...no sound even if the audio settings in the simulator are correct.
I have updated X-Plane...no sound.

I have mentioned the JACK audio server because this is the only change that I have done in the last month. But the audio server is off and the audio interface is not plugged in when I am at the simulator.

Does anybody know how I can find the error? Maybe I use JACK wrong (it might be..). Maybe there is some kind of conflict with X-Plane and I need support from them.
Thanks for your support.
Code:
$ lspci | grep -i audio
2f:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio
31:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

Code:
$ cat ~/.asoundrc
defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.ctl.!card Generic

Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA ATI HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA ATI HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 3
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
    HDA ATI HDMI, HDMI 4
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
    HDA ATI HDMI, HDMI 5
    HDMI Audio Output
default:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Digital
    IEC958 (S/PDIF) Digital Audio Output
default:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
sysdefault:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
front:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Front output / input
surround21:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3874

PostPosted: Mon Jul 05, 2021 9:18 am    Post subject: Reply with quote

Most probably X-Plane needs pulseaudio.
Try appending
Code:

USE="....pulseaudio"

in make.conf
followed by
Code:

emerge -uDUav @world
emerge -av pavucontrol

I suppose you have
Code:

media-libs/openal

installed no?
I didnt know you can install XP in Gentoo.
How did you do it?
_________________
:)
Back to top
View user's profile Send private message
TomaLars
n00b
n00b


Joined: 30 Jul 2019
Posts: 44

PostPosted: Mon Jul 05, 2021 11:46 am    Post subject: Reply with quote

Hi alamahant,
to be honest I have never had pulse audio on my gentoo system.
Audio worked from day one in X-Plane with ALSA only.
I don't really know if X-Plane needs OpenAL because it didn't complain about it...I have to check.

Thanks for the tip about Pulse Audio.
I am going to keep it as last chance because I have also JACK on my system and I don't want to run into problems.
The JACK community suggests to use JACK along Pulse Audio only in few cases and it seems that I am not in one of those.
Let's see..

Regarding your question: I have downloaded X-Plane demo installer and launched it as a script. Of course chmod +x to the file first.
The installation folder must be in your home directory to stay away from root permissions.
Yoke, joystick and rudder work pretty good. At the beginning I had to write a udev rule and I asked help to the gentoo community.
Give it a try if you want. With the demo you can fly for just 15 minutes.
Back to top
View user's profile Send private message
i4dnf
Apprentice
Apprentice


Joined: 18 Sep 2005
Posts: 271
Location: Bucharest, Romania

PostPosted: Wed Jul 07, 2021 6:48 am    Post subject: Reply with quote

X-Plane 11 uses/needs both openal and pulseaudio. In particular the fmod sound system/effects needs pulseaudio.
Unfortunately it needs real pulseaudio, apulse won't work.
You can make a wrapper script to launch pulseaudio just for X-Plane, for example i have the following in my launch_xp11 script:
Code:
echo "starting PulseAudio"
pulseaudio --start --exit-idle-time=30

echo "fixing default pa sink"
pactl set-default-sink alsa_output.0.analog-stereo


This launches pulseaudio, and tells it to quit if there are no clients for 30s.
The fix is needed in case pulseaudio decides to use a different random sink by default (it does that here), so I set it to that, should be set according to your own system.

I also have the following lines uncommented/added to /etc/pulse/daemon.conf:
Code:
enable-remixing = false
flat-volumes = no


There are probably proper/cleaner ways of doing it, but I was never interested in messing with pulseaudio.

HTH
_________________
"The only difference between me and a madman is that I am not MAD" (SALVATOR DALI)
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 466

PostPosted: Wed Jul 07, 2021 10:37 am    Post subject: Reply with quote

i4dnf wrote:
There are probably proper/cleaner ways of doing it
That's pretty clean TBH mate, keeping pulse in it's place. Only thing, there is an 'autospawn' line in /etc/pulse/client.conf that needs to be set to 'no', you can put the default sink in there too.
Back to top
View user's profile Send private message
i4dnf
Apprentice
Apprentice


Joined: 18 Sep 2005
Posts: 271
Location: Bucharest, Romania

PostPosted: Wed Jul 07, 2021 7:49 pm    Post subject: Reply with quote

I think the default for client is autospawn=no, since the line is commented here and there's no autospawning whatsoever for pulseaudio.
_________________
"The only difference between me and a madman is that I am not MAD" (SALVATOR DALI)
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 466

PostPosted: Thu Jul 08, 2021 5:40 am    Post subject: Reply with quote

i4dnf wrote:
I think the default for client is autospawn=no, since the line is commented here and there's no autospawning whatsoever for pulseaudio.

You might be right, not sure use to be though, but my pulse has been shackled for years now.
Oh, I may be getting confused with some DE's proclivity to start it on login, but that's obviously DE dependant.
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2566
Location: Heidelberg - Germany

PostPosted: Mon Jan 24, 2022 1:43 pm    Post subject: Reply with quote

I have the same issue unfortunately. Here are my questions:

Are you sure that X-Plane really needs pulseaudio even if openal is between the backend and the application layer? Why can´t openal just been configured to use alsa als backend? Why does this have influence on Xplane which is on top of openal?
Background: I want to avoid using pulse in any case because I am worried that it will disturb the rest of my system which is running flawless for a very long time. In fact I did configure .alsoftrc without success so far. If I am wrong I would be able to understand why pulseaudio cannot be avoided. If this is clear I will cancel all ambitions concerning X-Plane.

BTW I ran the test version 1 year ago flawless and today nothing works anymore. XPlane seems to have changed their sound architecture recently.
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
Back to top
View user's profile Send private message
i4dnf
Apprentice
Apprentice


Joined: 18 Sep 2005
Posts: 271
Location: Bucharest, Romania

PostPosted: Mon Jan 24, 2022 2:10 pm    Post subject: Reply with quote

Yes, unfortunately X-plane (actually the fmod sound system it uses complementing openal) needs a real, running instance of pulseaudio. Configuring openAL to work with ALSA works, but just for some of the sounds (IIRC the ATC comms are via openAL).
_________________
"The only difference between me and a madman is that I am not MAD" (SALVATOR DALI)
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2566
Location: Heidelberg - Germany

PostPosted: Thu Mar 03, 2022 8:03 am    Post subject: Reply with quote

I had already given up, but if there is any workaround, please inform me. I am not willing to install pulse on my system, which works flawless without it for many years.
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
Back to top
View user's profile Send private message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Mon Mar 07, 2022 1:04 am    Post subject: Reply with quote

X-Plane 11 works fine with ALSA (no PulseAudio) for me, but note that it *only* seems to use the highest number ALSA device. I cannot convince it to use any other device using ALSA or OpenAL configuration files.

So in my case I have three ALSA outputs:

- The correct sound card (ALSA card 0) which uses kernel module snd-ens1371
- The wrong sound card (ALSA card 1) which uses kernel module snd-hda-intel
- ALSA's aloop (ALSA card 2) which uses kernel module snd-aloop

So before starting X-Plane I just rmmod snd-hda-intel && rmmod snd-aloop, start the game, then modprobe snd-hda-intel && modprobe snd-aloop.

If anyone does figure out how to pick an ALSA device in X-Plane, I'd love to know!
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2566
Location: Heidelberg - Germany

PostPosted: Wed Mar 23, 2022 8:29 am    Post subject: Reply with quote

Code:

 aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: NVidia [HDA NVidia], Gerät 3: Generic Digital [Generic Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: Generic [HD-Audio Generic], Gerät 0: ALCS1200A Analog [ALCS1200A Analog]
  Sub-Geräte: 0/1
  Sub-Gerät #0: subdevice #0
Karte 1: Generic [HD-Audio Generic], Gerät 1: ALCS1200A Digital [ALCS1200A Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: CODEC [USB Audio CODEC], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0


how should I remove nvidia, there is no kernel module dedicated to it (except the video driver I don´t want to get rid)


BTW: I just ordered a cheap hdmi to analoge audio device as a workaround. This is easy to use because I am using an analoge mixing console for all my audio cards and I just could route it to an additional input. Maybe that will work ..
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
Back to top
View user's profile Send private message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Wed Mar 23, 2022 9:34 am    Post subject: Reply with quote

Erdie wrote:
how should I remove nvidia, there is no kernel module dedicated to it (except the video driver I don´t want to get rid)
Get rid of snd_hda_codec_hdmi (CONFIG_SND_HDA_CODEC_HDMI=n) to remove HDA NVidia.

Which card in that list do you want to use for X-Plane?
Back to top
View user's profile Send private message
Erdie
Advocate
Advocate


Joined: 20 May 2004
Posts: 2566
Location: Heidelberg - Germany

PostPosted: Wed Mar 23, 2022 9:58 am    Post subject: Reply with quote

l_bratch wrote:
Erdie wrote:
how should I remove nvidia, there is no kernel module dedicated to it (except the video driver I don´t want to get rid)
Get rid of snd_hda_codec_hdmi (CONFIG_SND_HDA_CODEC_HDMI=n) to remove HDA NVidia.

Which card in that list do you want to use for X-Plane?


I already removed from the kernel:

Code:

rmmod snd_hda_codec_hdmi
rmmod: ERROR: Module snd_hda_codec_hdmi is not currently loaded


Nevertheless aplay -l shows it


Code:
 lsmod | grep -i hdmi
kellerkind ~ #


gives an empty output.
_________________
Desktop AMD Ryzen 9 5900X 32GB RAM, Asus GF GTX 1060.
Notebook Tuxedo Pulse 15 Gen1 AMD Ryzen 7 4800H mit Radeon Vega 7
Raspberry Pi 1 + 2 + 3B+ + Zero W
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum