LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-15-2023, 03:18 PM   #1
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Rep: Reputation: 0
Unhappy Please to Help Resolving Quirky Audio Issue running on Debian 12 32-bit


I recently installed Debian bookworm on my tablet and I thought the installation went smoothly - Wi-Fi was detected out of the box, so when the installer told me that it needed Intel Firmware to install, it did so automagically when it was able to connect to the internet during installation to access the missing files that were not available in the installer.

I am planning on using this tablet as a developmental device for an application I have been working on, written almost entirely in C, with some ASM inserted here an there, but when I was finally able to build and run my code, there was no audio output whatsoever. My app is utilising the SDL2_mixer library to facilitate audio output.

I then dashed to the sound settings and in Sounds, I had the volume scrubber, and that didn't do much. I had a vague recollection with the PulseAudio app, and from just that point, everything semed okay. I then performed some quick research and I discovered these things:

I can play and listen to music playing from Audacious, which is my first choice go-to app under different operating systems. Music plays just fine

I can watch videos and listen to the audio via FirefoxESR through Youtube.

Music can play simultaneously from audacious and firefox

If I am playing music using Audacious, or watching and listening to a video from Youtube under FirefoxESR, the audio cuts out abruptly as soon as I run my app.

and resumes as soon as I kill my app.

to compare , and to prove that my app was not the primary cause of this no sound problem, I used app to install the game Burgerspace, which does not play any sound and does the same comparing the two apps that can actually play sound

Here's the output regarding my audio hardware:

asus@debian:~$ pactl list | grep -E "\s\s+output:"
output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: no)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
asus@debian:~$ aplay -L ?
null
Discard all samples (playback) or generate zero samples (capture)
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library


speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pipewire
PipeWire Sound Server
pulse
PulseAudio Sound Server
speex
Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
default
Default ALSA Output (currently PipeWire Media Server)
hw:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Direct hardware device without any conversions
hw:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Direct hardware device without any conversions
plughw:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Hardware device with all software conversions
plughw:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Hardware device with all software conversions
sysdefault:CARD=Audio
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Default Audio Device
hdmi:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
HDMI Audio Output
hdmi:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
HDMI Audio Output
dmix:CARD=Audio,DEV=0
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Direct sample mixing device
dmix:CARD=Audio,DEV=1
Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audi
Direct sample mixing device
usbstream:CARD=Audio
Intel HDMI/DP LPE Audio
USB Stream Output
hw:CARD=bytcrrt5640,DEV=0
bytcr-rt5640,
Direct hardware device without any conversions
hw:CARD=bytcrrt5640,DEV=1
bytcr-rt5640,
Direct hardware device without any conversions
plughw:CARD=bytcrrt5640,DEV=0
bytcr-rt5640,
Hardware device with all software conversions
plughw:CARD=bytcrrt5640,DEV=1
bytcr-rt5640,
Hardware device with all software conversions
sysdefault:CARD=bytcrrt5640
bytcr-rt5640,
Default Audio Device
dmix:CARD=bytcrrt5640,DEV=0
bytcr-rt5640,
Direct sample mixing device
dmix:CARD=bytcrrt5640,DEV=1
bytcr-rt5640,
Direct sample mixing device
usbstream:CARD=bytcrrt5640
bytcr-rt5640
USB Stream Output

asus@debian:~$aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audio [Intel HDMI/DP LPE Audio], device 0: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 1: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: bytcrrt5640 [bytcr-rt5640], device 0: 3 []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: bytcrrt5640 [bytcr-rt5640], device 1: 4 []
Subdevices: 0/1
Subdevice #0: subdevice #0
asus@debian:/etc/pulse$


So, I've been continuing my research, and through the various apps I've been testing and monitoring the activity within the PulseAudio Application, it appears that the Audacious music player is playing directly through ALSA with the pipewire intermediary, and Firefox is just using the audio stream. my app and the BurgerSpace app are also using these audio streams, which is curious, because no sound is heard through my app and the BurgerSpace app, but is heard through the Firefox and youtube playback. I found this link here, which provides an alternative method of telling ALSA to use PulseAudio for the default output, but the post creator also explained my frusturation that pulseaudio seems to be so amazing and excellent, but doesn't provide any troubleshooting help or show any error output when things go wrong. If I could have seen some realtime output for all audio streams this wouldn't have been much of an issue. in my opinion. Here's the link that I am referencing: https://superuser.com/questions/1157...utput-via-alsa

I don't know how to view how audio is being processed to diagnose the issue. nothing is showing me any errors. nothing is telling me why audio is not playing. It's just not playing.
 
Old 07-15-2023, 04:40 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,833

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
I don't have a definitive answer here, but please show the output from
Code:
ps -ef | egrep "wire|pulse"
Code:
pactl info
Code:
wpctl status
* The last command can be run while using apps generating sound and current streams will also be shown.

Pipewire also provides a 'pw-mon' utility that can monitor objects on a pipewire instance in realtime. That might be useful.
 
Old 07-15-2023, 07:39 PM   #3
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
Thank you so very much for responding to my post. I admit that I am a little embarrassed because I've not been able to get the tag system to work, I received this error when I tried to paste the output:


The following errors occurred with your submission:

You have included 26 images in your message. You are limited to using 10 images so please go back and correct the problem and then continue again.

Images include use of smilies, the BB code [img] tag and HTML <img> tags. The use of these is all subject to them being enabled by the administrator.


I instead put the output in a pastebin, and have provided the link below. I ran the 'wpctl status' command twice, once with audio output, working, through audacious, and again, with audacious and my code running simultaneously, with no audio output whatsoever.








https://bpa.st/26ZA
 
Old 07-15-2023, 10:01 PM   #4
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
if you're using gnome, its likely a probme with pipewire-audio that GNOME decided to use

all the other desktops using pulesaudio tho and that's more proven and likely to work automatically...

does speaker-test seem to work? or silence? try running alsamixer while speaker-test is running and unmute stuff (m) and turn it up.
 
Old 07-16-2023, 01:37 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,833

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Quote:
Originally Posted by Sabotender View Post
Thank you so very much for responding to my post. I admit that I am a little embarrassed because I've not been able to get the tag system to work, I received this error when I tried to paste the output:
For short output, simply copy the to the forum editor and enclose within CODE tags (refer to the '#' button in the forum editor).

It is interesting that the app kills the other audio sources when active. I note that it appears in the wireplumber output like this
Code:
126. main
            109. output_FR       > Pro:playback_FR      [active]
            127. output_FL       > Pro:playback_FL      [active]
Not sure why they both don't effectively play concurrently as expected.

Something else that I thought odd is seeing the left and right channels for Audacious and Firefox connected differently...
Code:
104. PipeWire ALSA [audacious]
            103. output_FR       > PulseAudio Volume Control:input_FR   [active]
            115. output_FL       > Pro:playback_FL      [active]
       108. Firefox
             98. output_FL       > PulseAudio Volume Control:input_FL   [paused]
            106. output_FR       > Pro:playback_FR      [paused]
...rather than like this...
Code:
104. PipeWire ALSA [audacious]
            103. output_FR       > Pro:Playback_FR      [active]
            115. output_FL       > Pro:playback_FL      [active]
I'm not sure if this hints at the underlying issue or not, but it doesn't look right to me.
 
Old 07-16-2023, 01:43 AM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,833

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Quote:
Originally Posted by enigma9o7 View Post
all the other desktops using pulesaudio tho and that's more proven and likely to work automatically...
That's not true. KDE is using pipewire happily. No need for any pulseaudio components. However, many use the wrapper pipwire-pulse for compatibility with certain older apps.

Quote:
does speaker-test seem to work? or silence? try running alsamixer while speaker-test is running and unmute stuff (m) and turn it up.
The OP only has a sound issue when their 'main' app is running. (It appears to wireplumber as if it is generating an audio stream.)
 
Old 07-16-2023, 11:35 AM   #7
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
For short output, simply copy the to the forum editor and enclose within CODE tags (refer to the '#' button in the forum editor).

It is interesting that the app kills the other audio sources when active. I note that it appears in the wireplumber output like this
Code:
126. main
            109. output_FR       > Pro:playback_FR      [active]
            127. output_FL       > Pro:playback_FL      [active]
Not sure why they both don't effectively play concurrently as expected.

Something else that I thought odd is seeing the left and right channels for Audacious and Firefox connected differently...
Code:
104. PipeWire ALSA [audacious]
            103. output_FR       > PulseAudio Volume Control:input_FR   [active]
            115. output_FL       > Pro:playback_FL      [active]
       108. Firefox
             98. output_FL       > PulseAudio Volume Control:input_FL   [paused]
            106. output_FR       > Pro:playback_FR      [paused]
...rather than like this...
Code:
104. PipeWire ALSA [audacious]
            103. output_FR       > Pro:Playback_FR      [active]
            115. output_FL       > Pro:playback_FL      [active]
I'm not sure if this hints at the underlying issue or not, but it doesn't look right to me.

Is there a method to use the information with how Firefox and Audacious is piping audio to the speakers, and have that applied globally for the entire system so that all applications use it as a default? Treating these applications as an audio stream might be the problem. I wish I could force all apps to point to ALSA output.
 
Old 07-16-2023, 12:35 PM   #8
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Quote:
Originally Posted by ferrari View Post
That's not true. KDE is using pipewire happily.
Not in Debian 12, which this thread is about (see title). Only desktop that depends on pipewire-audio is gnome. Run "apt rdepends pipewire-audio" to see.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2023-07-16 10-38-06.jpg
Views:	51
Size:	45.1 KB
ID:	41342  

Last edited by enigma9o7; 07-16-2023 at 12:40 PM.
 
Old 07-16-2023, 03:35 PM   #9
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by enigma9o7 View Post
Not in Debian 12, which this thread is about (see title). Only desktop that depends on pipewire-audio is gnome. Run "apt rdepends pipewire-audio" to see.
Here's the output of the requested command:

Code:
asus@debian:~$ apt rdepends pipewire-audio
pipewire-audio
Reverse Depends:
 |Depends: gnome-settings-daemon
  Depends: gnome-core
  Recommends: gnome-settings-daemon
asus@debian:~$

During the installation of Debian 12, I chose all Desktops offered because I wasn't certain which one would be best appropriate for use on a tablet PC. KDE Plasma was constantly glitching with the speaker icon vanishing and then reappearing, as if something was interfering with the audio streams. I'm not sure if that is important.
 
Old 07-16-2023, 03:46 PM   #10
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,389

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
@sabotender That command returns the same thing for everyone (on debian 12), I just mentioned it to show only gnome depends on pipewire-audio after ferrari incorrectly claimed KDE Plasma was also using it.

I could be on the wrong path here, but your problem could be related to some conflict between pulse and pipewire as a result of installing multiple desktop environments each configuring things differently. One way to verify that would be to reinstall without GNOME.... or only GNOME. But of course the gurus here may help you find a way to fix what you got too.

Plus, if you selected every desktop on this list, you have ridiculous amount of duplicate function applications, tons of x-terminals and file managers and text editors, etc.

Last edited by enigma9o7; 07-16-2023 at 03:50 PM.
 
Old 07-16-2023, 10:17 PM   #11
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
I promise there was a method to my madness. Gnome would have been the last Desktop I would have chosen... I typically go for XFCE or LXDE because I prefer the minimalistic look because, well, I'm a programmer and really don't need all the pizazz and shiny features that Gnome offers. I've never seen Straight Linux running on a tablet before and I could have made a crazy choice of Desktop and be very disappointed. I'd rather view them all and then remove the offending additions. Also, the Gnome UI has changed so many times, that I've gotten dizzy over it all. I would eventually, probably keep with Mate Desktop, even if it doesn't offer an on screen virtual keyboard. I've also noticed issues with other Desktops that are beyond the scope of this thread, which is why I'm not delving into detail. I really need to fix this audio problem. This ASUS tablet is almost perfect for my needs. Almost.
 
Old 07-18-2023, 10:20 AM   #12
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
I've been using the 'pw-mon' command to monitor the audio output from various running applications, namely, the ones that I know to provide real audio output, Firefox and Audacious, and comparing the ones that I've been having issues with, the BurgerSpace game and my 'main' app, but there was a lot of data which I do not understand and am unable to discern. Would it be helpful if I pasted the output here?


I sincerely believe that there's some missing link that needs to be discovered and would be integral in coming up with a valid solution, perhaps with making modifications to certain configuration files...for ALSA, PipeWire, and/or PulseAudio, so I can get from here to there with audio output.

Last edited by Sabotender; 07-18-2023 at 10:23 AM.
 
Old 07-18-2023, 10:59 AM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,400

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
It's most unlikely that Debian have even one 32bit machine to test their Debian 32bit offering on, and pipewire was written in a totally 64bit world. There's a limit to how long you can continue to update software on an old box without trouble.

It's about time you laid out the full hardware spec of your 32 bit box, and soundcard. Post a full lspci & lsusb. Some of us have memories that go back to 32bit days. Why do you need Debian 12?

Lastly don't be in a rush to copy & paste data, thinking we will read it, and figure all your problems for you. We're volunteers, using the info you give us to help you fix or narrow down your issues. Don't give us homework!
 
Old 07-18-2023, 02:13 PM   #14
Sabotender
LQ Newbie
 
Registered: Dec 2022
Posts: 23

Original Poster
Rep: Reputation: 0
...

Please forgive my impertinence.

I will leave.
 
Old 07-18-2023, 02:38 PM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,400

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Quote:
Originally Posted by Sabotender View Post
...

Please forgive my impertinence.

I will leave.
Sorry, There's definitely crossed wires here. 32bit won't last forever, and the more up to date distros will provide more issues.

Everyone who posted is trying to help. It would help us if you shared the lspci & lsusb to see what you have. Machines vary in quality. We don't even know whether it's x86, Arm, or something else.

Just looking at post #1, red flags jump out at me when I see you used Assembler in your app. Just because you still can use Assembler doesn't mean you should. And I only know Assembler as a hardware guy! Everything is position independent these days. I'd also examine the early code in that app. It's customary to 'clear the decks' initially and set up. But that clean up is killing your sound. I'm not going to involve myself in any way with your app. But check that nothing you set up or clear is being used by firefox or audacious. Personally, I'd leave the sound alone - it looks fine.

Rule #1 of maintenance: If it works, don't fix it!
 
  


Reply



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
DNS resolving IP but not resolving hostnames; ping unknown host google.com mattlyons Linux - Networking 15 02-26-2017 04:01 AM
How to convert 24-bit audio files to 16-bit .wav and be able to create audio CD. stf92 Linux - Software 13 06-29-2012 01:21 AM
A bit quirky (C++ under Linux) Jeebizz Programming 15 02-20-2009 12:41 PM
/etc/hosts resolving before DNS resolving ? markraem Linux - Networking 4 11-02-2003 04:54 AM

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

All times are GMT -5. The time now is 12:51 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
Open Source Consulting | Domain Registration