Solved I can't hear any sound when I use a media player,but I can when I watch a video on youtube.

Hello.

I would like to know why I can't hear sound if I use a media player,but I can if I want to watch a video on youtube. I played with different parameters on rc.conf and on /boot/loader.conf (not all together :D) but they didn't work. For example :

Code:
kld_load="snd_hda"

or

Code:
snd_hda_load="YES"
snd_load="YES"

I have also tried to remove everything. But,as I said,if I want to watch and hear a video on youtube (or in any other place on the net),I can. Where is the mistery,here ? (I'm using FreeBSD 13.1-RELEASE).
 
If I can hear the sounds when I watch a video on youtube,everything is good,don't you think ? anyway :

mario@marietto:/home/marietto # mixer

Code:
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to   1:1
Mixer mic      is currently set to  67:67
Mixer mix      is currently set to  74:74
Mixer rec      is currently set to  37:37
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic

and the default channel is set to USB audio and it works when I hear a sound originating from the net,but it doesn't if it originates from any media player stored on my system. This is the device that I'm using :

Code:
mario@marietto:/home/marietto # usbconfig
ugen1.6: <C-Media Electronics Inc. USB Audio Device> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=
ON (100mA)

mario@marietto:/home/marietto # dmesg | grep C-Media
ugen1.6: <C-Media Electronics Inc. USB Audio Device> at usbus1
uaudio0: <C-Media Electronics Inc. USB Audio Device, class 0/0, rev 1.10/1.00, addr 5> on usbus1

I'm using xfce4.
 
If you can hear audio on your browser and not the media player, then the issue is with the media player, not system audio. You didn't specify the media player you are using, so it's a bit difficult to guess what's wrong.
 
Try
Code:
cat /dev/sndstat

cat /dev/random >> /dev/dsp0
cat /dev/random >> /dev/dsp1
cat /dev/random >> /dev/dsp2
cat /dev/random >> /dev/dsp3
 
This is on bare metal correct? I saw USB and know you experiment with bhyve.

Also I have seen cases where headphone and speaker jack is backwards. Try both when testing.

The very old manual entry says try this:
cat /dev/sndstat
That will show default device. For example: PCM0 is mine
Code:
Installed devices:
pcm0: <IDT 92HD90BXX (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <IDT 92HD90BXX (Analog)> (play/rec)
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.
 
In case pulseaudio was/is running in the background, kill it and remove all files in ~/.config/pulse/ and reboot, especially when you where playing with different parameters.

Or maybe first, check with pavucontrol if your browser and your mediaplayers are using the same output.
 
Try
Code:
cat /dev/sndstat

cat /dev/random >> /dev/dsp0
cat /dev/random >> /dev/dsp1
cat /dev/random >> /dev/dsp2
cat /dev/random >> /dev/dsp3

Code:
mario@marietto:/home/marietto # cat /dev/sndstat

Installed devices:
pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec) default
pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)
pcm2: <Realtek ALC1220 (Rear Digital)> (play)
pcm3: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
pcm4: <USB audio> (play/rec)
No devices installed from userspace.

I've attached the headphones on pcm4 and I'm on baremetal. Now I have attached the headphones to "pcm0" and I can hear sounds from both places,internet and media player. But I want to hear them from "pcm4". I see that "pcm4" is not set as default. Maybe this is the reason. What's the command to set it as default ? thanks.
 
ok :

Code:
sysctl hw.snd.default_unit=4

Code:
mario@marietto:/home/marietto/.config # cat /dev/sndstat

Installed devices:
pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> (play/rec)
pcm1: <Realtek ALC1220 (Front Analog)> (play/rec)
pcm2: <Realtek ALC1220 (Rear Digital)> (play)
pcm3: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
pcm4: <USB audio> (play/rec) default

but now I don't hear any sounds neither with the media player nor with internet.
 
I'd forgot to reattach the headphones cable to the USB sound device. Now it works as it should. Thanks to everyone. It's solved.
 
Back
Top