Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] No sound - Alsa
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
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Wed Nov 22, 2023 10:13 pm    Post subject: [SOLVED] No sound - Alsa Reply with quote

I have not been playing music very often on my fitlet2 home desktop machine, but in the past it worked. My system is completely updated and works fine. However, today I did some CD ripping and mp3 comversion, so when I tryed to play az audio file there was no sound. Some relevant xterm command outputs:
Code:
janos@andraslinux ~ $ lspci | grep -i audio
00:0e.0 Audio device: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster (rev 0b)
janos@andraslinux ~ $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
    HDA Intel PCH, ALC1150 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC1150 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC1150 Analog
    Front output / input
    4.1 Surround output to Front, Rear and Subwoofer speakers
...
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
janos@andraslinux ~ $ cat /sys/class/sound/card*/id
PCH
janos@andraslinux ~ $ speaker-test -t wav -c 2

speaker-test 1.2.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 2.685985
...
janos@andraslinux ~ $
and it keeps going 0 - 1.. without any sound. I ran out of troubleshooting ideas. Can anyone please help?
Could it be that my fitlet2 sound output hardware became defective?

jankom


Last edited by jankom on Sat Nov 25, 2023 2:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
wanne32
n00b
n00b


Joined: 11 Nov 2023
Posts: 69

PostPosted: Thu Nov 23, 2023 6:56 am    Post subject: Reply with quote

Code:
unalias grep
ps -ef  | grep -E '(pipe|pulse|X)'

Does the fallowing help?
Code:
gentoo-pipewire-launcher
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Thu Nov 23, 2023 3:17 pm    Post subject: Reply with quote

Code:
janos@andraslinux ~ $ unalias grep
janos@andraslinux ~ $ ps -ef  | grep -E '(pipe|pulse|X)'
root      1845  1840  3 09:52 tty7     00:00:11 /usr/bin/X :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-zopWdh
janos     2074  1994  0 09:52 ?        00:00:00 /bin/bash --login /usr/lib64/X11/xdm/Xsession
janos     2571  2568  0 09:57 pts/2    00:00:00 grep -E (pipe|pulse|X)
janos@andraslinux ~ $ gentoo-pipewire-launcher
bash: gentoo-pipewire-launcher: command not found
janos@andraslinux ~ $
I do not have pulseaudio installed, I have alsa as slected:
Quote:
media-libs/alsa-lib-1.2.9
media-libs/alsa-oss-1.1.8
media-libs/alsa-topology-conf-1.2.5.1
media-libs/alsa-ucm-conf-1.2.9
media-sound/alsa-utils-1.2.9
One thing I noticed that when I turn on or off the computer I do hear a click in the speakers, therefore the computer hardware (audio out) is probably not defective.
I did folllow (checked again) the gentoo alas instructions. Do I need pulseaudio on top of alsa?

jankom
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22634

PostPosted: Thu Nov 23, 2023 4:22 pm    Post subject: Reply with quote

PulseAudio is only required if you have usage requirements that cannot be met by simple ALSA. More importantly for this thread, PulseAudio cannot work unless ALSA works, so if ALSA is currently broken for you, PulseAudio will also be silent.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Thu Nov 23, 2023 4:52 pm    Post subject: Reply with quote

Understood.
Strange thing: is alsa running?
Code:
janos@andraslinux ~ $ rc-status
Runlevel: default
 sysklogd                                                          [  started  ]
 ntpd                                                              [  started  ]
 dovecot                                                           [  started  ]
 avahi-daemon                                                      [  started  ]
 netmount                                                          [  started  ]
 display-manager                                                   [  started  ]
 apache2                                                           [  started  ]
 cronie                                                            [  started  ]
 cupsd                                                             [  started  ]
 postfix                                                           [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 dbus                                                              [  started  ]
 display-manager-setup                                             [  started  ]
Dynamic Runlevel: manual
 iwd                                                               [  started  ]
 dhcpcd                                                            [  started  ]
janos@andraslinux ~ $ su -c "rc-service alsasound stop"
Password:
 * WARNING: you are stopping a boot service
 * Storing ALSA Mixer Levels ...                                          [ ok ]
janos@andraslinux ~ $
Alsa does not show in services at current run level. Should I add it to "default" run level?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Thu Nov 23, 2023 5:12 pm    Post subject: Reply with quote

jankom,

What does
Code:
lspci -nnk
show for your audio devices?

What is the content of /proc/asound/devices?

It looks like you have several audio devices.
Which one do you want to use?

The alsasound service saves and restores alsa settings across boots.
If its not started you sound will be muted at boot time.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Thu Nov 23, 2023 6:04 pm    Post subject: Reply with quote

Code:
00:0e.0 Audio device [0403]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster [8086:5a98] (rev 0b)
   DeviceName: Onboard - Sound
   Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster [8086:7270]
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
is the only audio or snd related output of "lspci -nnk". On the otherhand,
Code:
janos@andraslinux ~ $ lsmod | grep snd
snd_hda_codec_hdmi     65536  1
snd_hda_codec_realtek   135168  1
snd_hda_codec_generic    77824  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          40960  0
snd_intel_dspcfg       16384  1 snd_hda_intel
snd_hda_codec         122880  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core           86016  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_pcm               135168  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
led_class              16384  4 snd_hda_codec_generic,sdhci,input_leds,iwlmvm
snd_timer              32768  1 snd_pcm
snd                    94208  8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
soundcore              16384  1 snd
janos@andraslinux ~ $
and
Code:
janos@andraslinux ~ $ cat ~/.assoundrc
pcm.!spdif {
    type hw
    card 0
    device 0
}

pcm.!default {
    type plug
    slave {
        pcm "spdif"
    }
}

# Share a single card with multiple applications
#pcm.!default {
#    type plug
#    slave.pcm "dmix:CARD=0,DEVICE=1,RATE=48000"
#}
janos@andraslinux ~ $
I do not have /etc/asound.conf file.

jankom
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Thu Nov 23, 2023 7:38 pm    Post subject: Reply with quote

jankom,

Your chipset requires SND_SOC_INTEL_SKYLAKE together with the SND_SOC_codecs and the sys-firmware/sof-firmware package to provide the firmware.

You did not post the content of /proc/asound/devices.
I suspect that its almost empty.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Thu Nov 23, 2023 9:25 pm    Post subject: Reply with quote

@Neddy Seagoon
Sorry, I missed that:
Code:
janos@andraslinux ~ $ cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0- 1]: digital audio playback
  5: [ 0- 3]: digital audio playback
  6: [ 0- 7]: digital audio playback
  7: [ 0- 8]: digital audio playback
  8: [ 0- 0]: hardware dependent
  9: [ 0- 2]: hardware dependent
 10: [ 0]   : control
 33:        : timer
janos@andraslinux ~ $
The funny thing that sound worked fine a few months ago, and all I did was occasional eix-sync and some network related stuff.
Yes, I did compile the most recent kernel but did not change kerenel configuration.

EDIT - add'l info:
Code:
janos@andraslinux ~ $ su -c "alsactl init"
Password:
Found hardware: "HDA-Intel" "Realtek ALC1150" "HDA:10ec0900,00000000,00100001 HDA:8086280a,80860101,00100000" "0x8086" "0x7270"
Hardware is initialized using a generic method
janos@andraslinux ~ $ amixer sset Master unmute
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 60 [69%] [-20.25dB] [on]
  Front Right: Playback 60 [69%] [-20.25dB] [on]
jaamixer: Unable to find simple control 'Headphone',0

janos@andraslinux ~ $ amixer sset Speaker unmute
amixer: Unable to find simple control 'Speaker',0

janos@andraslinux ~ $ speaker-test -c 2

speaker-test 1.2.9

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
Time per period = 5.651390
 0 - Front Left
^CWrite error: -4,Interrupted system call
xrun_recovery failed: -4,Interrupted system call
Transfer failed: Interrupted system call
janos@andraslinux ~ $
I guess the Headphone is where I plug in my external speakers. I do not have internal speakers in the tiny fitlet2 box. So apparently the Headphone is not working.

jankom
Back to top
View user's profile Send private message
gorg86
Guru
Guru


Joined: 20 May 2011
Posts: 309

PostPosted: Thu Nov 23, 2023 11:24 pm    Post subject: Reply with quote

Start up alsamixer, select the device with F6 and crank up + unmute everything. Sometimes the names of the outputs are just inaccurate.
Back to top
View user's profile Send private message
APolozov
Apprentice
Apprentice


Joined: 28 Sep 2006
Posts: 194
Location: Voronezh, Russia

PostPosted: Fri Nov 24, 2023 7:54 pm    Post subject: Reply with quote

I see in your .asoundrc mixed "spdif" (digital output) and "card 0 device 0" (analog output), IMHO it is wrong.
Try rename this config (to .asoundrc.bak for example) and run "sudo /etc/init.d/alsasound restart"
_________________
Excuse my bad English, I only study it.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Fri Nov 24, 2023 10:48 pm    Post subject: Reply with quote

Thank you all for offering ideas. Here is the latest (and this also corrects one of my earlier "code" posting):
Code:
janos@andraslinux ~ $ su -c "/etc/init.d/alsasound restart"
Password:
 * WARNING: you are stopping a boot service
 * Storing ALSA Mixer Levels ...                                          [ ok ]
 * Restoring Mixer Levels ...                                             [ ok ]
janos@andraslinux ~ $ amixer sset Master unmute                           
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 83 [95%] [-3.00dB] [on]
  Front Right: Playback 83 [95%] [-3.00dB] [on]
janos@andraslinux ~ $ amixer sset Headphone unmute
amixer: Unable to find simple control 'Headphone',0

janos@andraslinux ~ $ amixer sset Speaker unmute
amixer: Unable to find simple control 'Speaker',0

janos@andraslinux ~ $
Still no sound, no assound or .assound file after restartting alsasound daemon

jankom
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Sat Nov 25, 2023 10:54 am    Post subject: Reply with quote

jankom,

Code:
janos@andraslinux ~ $ cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback


That's you front stereo analogue output the [ 0- 0] means card 0 device 0, which is what alsa will use by default.
There is no remapping.or anything required, so no /etc/asound.conf or ~/asoundrc.
Hide those files if you have them.

Open alsamixer and mute everything.

Unmute only Front, Mastar, Headphones and PCM then set the sliders to 70%

snd_hda_intel can operate at the 48kHz or 44.1kHz sample rates but only one at a time.
If any digital outputs are enabled only digital outputs work.
Digital controls have IEC or S/PDIF in their names. Hence mute everything, then only unmutes what yo may need.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 362
Location: USA

PostPosted: Sat Nov 25, 2023 2:04 pm    Post subject: Thanks NeddySeagoon Reply with quote

SOLVED!

That was it. So simple yet frustrating. S/PDIF controls were not muted in alsamixer.
Back to listening to good music on my favorite linux computer.

Lessons learned:
* There is no ~/.asoundrc or /etc/asasound.conf file, sound works fine without it.
* "speaker-test -c 2" command works and you can hear which side is Right or Left.
* alsa daemon "/etc/init.d/alsasound" starts at boot level and it is running, but rc-status command (current, default run level) does not show it.

Thanks again,

jankom
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