Optical / S/PDIF appears to work, but no sound

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Joseph_in_Cincinnati

Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

We got a Cambridge Audio system (AXR100 for the stereo receiver) for Christmas, and so we then purchased a TOSLINK/optical cable to connect the computer to the receiver. The computer has optical audio out, and the receiver has optical audio in. There is no sound through the receiver. When I use desktop speakers through analog, the sound works fine, as it always has, when I choose the analog option. For the past week, I've researched and experimented, and I cannot figure out the problem. It looks like the system recognizes the optical out, but no sound occurs. When testing, the receiver eventually "gets bored" and shuts off, which means, I think, that it's not getting anything informative by optical in.

The motherboard is an EVGA Z370 Classified K (134-KS-E379), the CPU is Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz. The EVGA brochure states, "The Z370 Classified K uses a 5.1 Creative Labs CA0132 audio controller," but the downloadable software only works in Windows, which I do not have.

I've used alsamixer, pavucontrol, and amixer, and nothing has worked. In pavucontrol, I can see the volume bar moving with the digital output when it's selected . . . and I've made sure, through trial and error, that the same S/PDIF device/selection is unmuted in alsamixer. So, everything looks like it's working, but there is no audio. Again, analog works fine with the desktop speakers. I thought that perhaps the desktop speakers "trumped" optical when plugged in, the way headphones trump the speakers, but that isn't the issue. I've unplugged the speakers and rebooted my system, and the optical sound still doesn't work.

I upgraded to Linux Mint Cinnamon 20 (64) this past week, hoping that would be an answer. It didn't resolve the problem.

Device-1: Intel 200 Series PCH HD Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.4.0-65-generic
active profile: <output:iec958-stereo>
sinks: alsa_output.pci-0000_00_1f.3.iec958-stereo/#2: Built-in Audio Digital Stereo (IEC958)
sources: alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor/#3: Monitor of Built-in Audio Digital Stereo (IEC958)

Code: Select all

$ inxi -Fxxxrz
System:    Kernel: 5.4.0-65-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 dm: LightDM 1.30.0 
           Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: EVGA product: N/A v: N/A serial: <filter> Chassis: type: 3 
           serial: <filter> 
           Mobo: EVGA model: 134-KS-E379 v: 1.0 serial: <filter> UEFI: American Megatrends 
           v: 1.07 date: 03/15/2018 
CPU:       Topology: 6-Core model: Intel Core i7-8700 bits: 64 type: MT MCP arch: Kaby Lake 
           rev: A L2 cache: 12.0 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 76799 
           Speed: 800 MHz min/max: 800/4600 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 799 
           5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:3e92 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1680x1050~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.2.6 
           direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: eVga.com. driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:a2f0 
           Sound Server: ALSA v: k5.4.0-65-generic 
Network:   Device-1: Qualcomm Atheros Killer E2500 Gigabit Ethernet 
           vendor: Acer Incorporated ALI driver: alx v: kernel port: e000 bus ID: 02:00.0 
           chip ID: 1969:e0b1 
           IF: enp2s0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros Killer E2500 Gigabit Ethernet 
           vendor: Acer Incorporated ALI driver: alx v: kernel port: d000 bus ID: 0a:00.0 
           chip ID: 1969:e0b1 
           IF-ID-1: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-2: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 2.27 TiB used: 500.51 GiB (21.5%) 
           ID-1: /dev/sda vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: 022 scheme: GPT 
           ID-2: /dev/sdb vendor: Seagate model: ST2000DM009-2G4100 size: 1.82 TiB 
           speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: DN03 scheme: MBR 
Partition: ID-1: / size: 456.96 GiB used: 135.78 GiB (29.7%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 33.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-beta.list 
           1: deb [arch=amd64] https://brave-browser-apt-beta.s3.brave.com/ stable main
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 290 Uptime: 46m Memory: 15.42 GiB used: 1.74 GiB (11.3%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 7/9 Shell: bash v: 5.0.17 
           running in: gnome-terminal inxi: 3.0.38 
I took a DVD player and connected it, instead of the computer, to the same TOSLINK, and the sound worked fine through the receiver. So, the TOSLINK, the receiver, and the speakers are not the problem. Also, when hooked to the computer, the light does come out the other end of the TOSLINK. So, I don't think that it's the optical port on the computer.

I tried to follow every forum discussion of digital sound problems and follow the advice, and I've attached the "big gun" diagnostic report from Mr. Een. From what I can tell, I've seen no evidence of blacklisting, but I might not know where to look. Again, the analog works OK. I don't know if that would matter.

Are optical signals "universal"? I'm sorry for asking a stupid question, but I'm pretty ignorant of all this. Could the "language" of the pulses be incompatible between the computer and the receiver -- or is that standard? I also wondered whether it was a driver problem, as there used to be problems, it seems, getting certain Intel soundcards to work on Linux. However, it looks like that was resolved years ago. From what I've been able to follow from web searches, I think that the sink/profile/device/etc. are all correct, but I really don't know. Help me, Mr. Saxophone and his legion of penguin friends; you're my only hope.
Attachments
sound_diagnostic.txt.tar.gz
(15.09 KiB) Downloaded 40 times
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

Hi Joseph_in_Cincinnati, and welcome to the forum.

First, you added this to a file in /etc/modprobe.d:

Code: Select all

options snd_hda_intel model=pch position_fix=1
Was that to try to fix this? If so, remove it and reboot. If it was to get analog sound working, you can leave it as is.

Does this produce any sound through the system:

Code: Select all

aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Right.wav
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Thank you for the quick response. I had added that line, following online advice and not knowing what I was doing. I just removed it and restarted the computer. I still heard no sound when trying to play a video. I then tried your command, and I got:

Code: Select all

$ aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Right.wav
aplay: main:830: audio open error: Device or resource busy
So, I stopped the video and tried again:

Code: Select all

$ aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Right.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
I heard nothing, however.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

Damn! S/PDIF is a weak spot for me. Can you make a Live ISO of Mint 20 and see if it works there?
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Do you mean burn LM 20 onto a disk and run the system from the disk? Like what we do before a clean installation?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

Exactly. And it can be 20.1 that you're using, or 20, whichever.
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Thank you for your patience. I burnt the CD and am currently running Linux Mint 20.1 from the CD. I played a video and couldn't hear anything. I downloaded Pulse Control to verify that S/PDIF was selected, and it still didn't work. I also looked at alsamixer. I ran your test and have attached it to this post. I also played the .wav file, and I heard nothing.
Attachments
live_sound_diagnostic.txt.tar.gz
(14.7 KiB) Downloaded 58 times
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

Damn.

Back in your installed version, suspend the machine then wake it back up and see if that "fixes" this.

I'm sorry but at this point it's all going to be guesses. Your outputs look normal so I can't understand what the issue is. And your Creative sound card is often an issue for others trying to get analog output, where it defaults to digital and claims the analog is not available.

Assuming the above doesn't help, we can take a wild shot with this:

Code: Select all

sudo tee /etc/modprobe.d/blacklist-ca0132.conf <<<'blacklist snd_hda_codec_ca0132'
Fully shut down for a few minutes after running that. Power up and test, and if it makes things worse undo it with this and another reboot:

Code: Select all

sudo rm /etc/modprobe.d/blacklist-ca0132.conf
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Suspension did not do anything.

I added the blacklist and rebooted. Neither digital nor analog would work. Interestingly, the analog line-out looked just like the optical digital output in pavucontrol -- the volume meter was moving, but I could hear nothing. When I removed the blacklist and rebooted, analog worked again. Optical digital still doesn't.

I'm going to contact Cambridge Audio to see whether they have any experience with Linux problems. I don't think that I have any other optical line in devices to test to see whether the issue is simply an incompatibility between the computer and the receiver.

I am using an HDMI connection to the monitor. Could that be a cause of problems? Of course, HDMI isn't chosen for audio output.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

I just don't know enough about digital output to know what's wrong here. I doubt the receiver nor HDMI is the issue.

Try to play a song or video and run pacmd list-sinks to see if there's anything there obvious.
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Here it is:

Code: Select all

$ pacmd list-sinks
1 sink(s) available.
  * index: 8
	name: <alsa_output.pci-0000_00_1f.3.iec958-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9038
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 23.83 ms
	max request: 4 KiB
	max rewind: 4 KiB
	monitor source: 8
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 1
	configured latency: 23.22 ms; range is 0.50 .. 371.52 ms
	card: 0 <alsa_card.pci-0000_00_1f.3>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "CA0132 Digital"
		alsa.id = "CA0132 Digital"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "1"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xdf420000 irq 152"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a2f0"
		device.product.name = "200 Series PCH HD Audio"
		device.form_factor = "internal"
		device.string = "iec958:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "iec958-stereo"
		device.profile.description = "Digital Stereo (IEC958)"
		device.description = "Built-in Audio Digital Stereo (IEC958)"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
	active port: <iec958-stereo-output>
"iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)"

Why would the S/PDIF port availability be "unknown"? How can the system detect sound (as shown by the volume meter in pavucontrol) but not the port? Could this be the issue?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

You've nailed the issue there. But knowing what causes that is a mystery. We've already done a few things that we try for people having that available: unknown with analog output.

You have a ton of options in alsamixer. Maybe playing with those will find some magic. For example, Smart Volume is on. Maybe that's causing this. Some column can be turned off with the down arrow, while others need the m key pressed to mute them. Muted columns show MM at the bottom. Play around with those and see if you can make something there work.

Is Window 10 on this machine? That can cause issues similar to this that we might be able to fix.
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

No Windows or other OS besides LM 20.1. I'll fiddle with the different choices in alsamixer. Thank you for your help. I'll report what I find.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

You're welcome. And I'll try to come up with other ideas to try as well. But my well is running dry quickly on this one. The blacklist, suspension/wake cycle and Win10 are the main culprits/workarounds for that available: unknown garbage.

If I didn't ask already, look at sudo fuser -v /dev/snd/* and any lines that don't have pulseaudio and your username in them could be the cause as well.
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

Code: Select all

$ sudo fuser -v /dev/snd/*
[sudo] password for joseph:             
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  joseph     1372 F.... pulseaudio
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

Yeah, that looks clean. Timidity and speech-dispatcher sometimes cause issues like this, but they should show up there if they were the cause.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

One other test:

Code: Select all

speaker-test -t wav -c 6
Any output? Use Ctrl+C to stop it.
Joseph_in_Cincinnati

Re: Optical / S/PDIF appears to work, but no sound

Post by Joseph_in_Cincinnati »

No. Wow, that test goes on for some time. I finally cancelled it. I'll continue to play with alsamixer. Do you have to reboot the whole system after each change, or is there some other way that takes less time?

I also have noticed that each time that I review the optical/digital output on pavucontrol, the EAC3 is unchecked. I check it, and then it will be unchecked, again, later. So, perhaps I need to do something to save the settings, or maybe optical just won't take that setting. I don't know whether that is significant. Also, I just now noticed that the PCM option is checked (like always) but faded out . . . as if it were muted (image attached). I'll have to follow up on that this coming week.

I feel that we're closer to an answer than before. At least, I believe that I have some sense of the land's lay now. Thank you and good night.
Attachments
Screenshot from 2021-01-31 23-55-40.png
banshee10

Re: Optical / S/PDIF appears to work, but no sound

Post by banshee10 »

ca0132 is notorious how shity chip is especially in linux. Some days audio works, some days - not. And I tried more than 10 distros, plenty of useless ''fixes'' which I found in internet. When Audio stopped working there are two fixes:
1. Restart>boot to Windows 10 and then restart again, But load linux distro - audio working
2. Full shutdown of PC, wait a minute, power ON - audio works.
You can keep search for fixes - there is not permanent fix for creative sound cards and linux. You will have always problems with their cards under any linux distro. Period.
Tested with any kernel up to 5.10.7 in manjaro - zero effect.
Just change the sound card.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Optical / S/PDIF appears to work, but no sound

Post by MrEen »

No need for rebooting when using alsamixer. Only some of the commands I had you run required it.

As banshee10 hinted at, Creative cards have a bad history on Linux. Certain models still don't work pretty much at all. But yours is the built-in sound card which usually can be made to work, but almost all experience I've had with it is for Analog output, not Digital. And of course, your analog output is fine from the same card.

I believe the PCM is faded out simply because you can't deselect it, but I could be wrong. I assume you've tried having all the others unchecked and testing?

If you get nowhere in the next day or two, we can try changing the digital pin to see if that helps. This is a software change only and completely reversible. I've never had someone try it for digital before, but I would assume it's the same impact as changing analog pins.
Locked

Return to “Sound”