Bug 103620 - pulseaudio automatically unmutes S/PDIF on every new stream
Summary: pulseaudio automatically unmutes S/PDIF on every new stream
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: pavucontrol (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-08 15:21 UTC by mail
Modified: 2018-07-30 09:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description mail 2017-11-08 15:21:43 UTC
Hello,
I use Debian 9.2 (stretch) with the default PulseAudio 10.0 installed. My soundcard is a Realtek ALC892 onboard chip. I use the optical S/PDIF output on my mainboard.

Whenever I mute my audio via keyboard shortcut, only currently playing audio is muted. As soon as a new audio stream starts (new tab in browser, terminal-ping, etc.) the audio device is automatically unmuted and then audio is played. 

I have tried to set "flat-volumes = no" in daemon.conf, without any change in behaviour.

Below is the log of muting and automatic unmute:

(  10.728|   4.983) D: [pulseaudio] protocol-native.c: Client gnome-settings-daemon changes mute of sink alsa_output.pci-0000_00_14.2.iec958-stereo.
(  10.728|   0.000) D: [pulseaudio] sink.c: The mute of sink alsa_output.pci-0000_00_14.2.iec958-stereo changed from no to yes.
(  10.728|   0.000) I: [pulseaudio] module-device-restore.c: Storing volume/mute for device+port sink:alsa_output.pci-0000_00_14.2.iec958-stereo:iec958-stereo-output.
(  20.142|   9.413) D: [pulseaudio] core-scache.c: Created sample "bell-window-system" (#0), 24604 bytes with sample spec s16le 2ch 44100Hz
(  20.142|   0.000) D: [pulseaudio] core-scache.c: Playing sample "bell-window-system" on "alsa_output.pci-0000_00_14.2.iec958-stereo"
(  20.142|   0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=24604, tlength=0, base=4, prebuf=1, minreq=1 maxrewind=0
(  20.142|   0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=24604, tlength=24604, base=4, prebuf=4, minreq=4 maxrewind=0
(  20.142|   0.000) D: [pulseaudio] module-stream-restore.c: Not restoring device for stream sink-input-by-media-role:event, because already set to 'alsa_output.pci-0000_00_14.2.iec958-stereo'.
(  20.142|   0.000) D: [pulseaudio] module-intended-roles.c: Not setting device for stream bell-window-system, because already set.
(  20.142|   0.000) D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
(  20.142|   0.000) I: [pulseaudio] module-stream-restore.c: Restoring volume for sink input sink-input-by-media-role:event.
(  20.142|   0.000) I: [pulseaudio] module-stream-restore.c: Restoring mute state for sink input sink-input-by-media-role:event.
(  20.142|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_14.2.iec958-stereo becomes busy, resuming.
(  20.142|   0.000) D: [pulseaudio] sink.c: Suspend cause of sink alsa_output.pci-0000_00_14.2.iec958-stereo is 0x0000, resuming
(  20.142|   0.000) D: [pulseaudio] reserve-wrap.c: Successfully acquired reservation lock on device 'Audio0'
(  20.142|   0.000) I: [alsa-sink-ALC892 Digital] alsa-sink.c: Trying resume...
(  20.143|   0.000) I: [alsa-sink-ALC892 Digital] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-util.c: Maximum hw buffer size is 11888 ms
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-util.c: Set buffer size first (to 88192 samples), period size second (to 44096 samples).
(  20.143|   0.000) I: [alsa-sink-ALC892 Digital] alsa-util.c: ALSA period wakeups disabled
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: hwbuf_unused=0
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: setting avail_min=87310
(  20.143|   0.000) I: [alsa-sink-ALC892 Digital] alsa-sink.c: Time scheduling watermark is 20.00ms
(  20.143|   0.000) I: [alsa-sink-ALC892 Digital] alsa-sink.c: Resumed successfully...
(  20.143|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_14.2.iec958-stereo becomes idle, timeout in 5 seconds.
(  20.143|   0.000) I: [alsa-sink-ALC892 Digital] alsa-sink.c: Starting playback.
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] ratelimit.c: 612 events suppressed
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Cutting sleep time for the initial iterations by half.
(  20.143|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Cutting sleep time for the initial iterations by half.
(  20.143|   0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_14.2.iec958-stereo becomes idle, timeout in 5 seconds.
(  20.143|   0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
(  20.143|   0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
(  20.143|   0.000) I: [pulseaudio] sink-input.c: Created input 0 "bell-window-system" on alsa_output.pci-0000_00_14.2.iec958-stereo with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     media.name = "bell-window-system"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     event.id = "bell-window-system"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     media.role = "event"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.id = "3056"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.name = "gnome-terminal-server"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     event.description = "Klangereignis"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     media.filename = "/usr/share//sounds/freedesktop/stereo/bell.oga"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     native-protocol.peer = "UNIX socket client"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     native-protocol.version = "32"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.id = "org.gnome.Shell"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.icon_name = "start-here"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.language = "de_DE.UTF-8"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     window.x11.screen = "0"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     window.x11.display = ":0"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.user = "*******"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.host = "****"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.binary = "gnome-shell"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.machine_id = "ea36cd1203114403a03e683d7a3e7d3b"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     application.process.session_id = "2"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     window.x11.xid = "18875453"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     window.name = "*******@****: ~"
(  20.143|   0.000) I: [pulseaudio] sink-input.c:     module-stream-restore.id = "sink-input-by-media-role:event"
(  20.144|   0.000) D: [pulseaudio] core-util.c: posix_madvise() worked fine!
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Cutting sleep time for the initial iterations by half.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Requested to rewind 352768 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Limited to 352456 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: before: 88114
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: after: 88114
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Rewound 352456 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: Processing rewind...
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] source.c: Processing rewind...
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327920 bytes ago (24840 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327920 bytes ago (24836 bytes ahead in playback buffer)
(  20.144|   0.000) D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327920 bytes ago (24808 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327920 bytes ago (24804 bytes ahead in playback buffer)
(  20.144|   0.000) D: [pulseaudio] sink.c: The mute of sink alsa_output.pci-0000_00_14.2.iec958-stereo changed from yes to no.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327920 bytes ago (24800 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Requested to rewind 352768 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Limited to 352460 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: before: 88115
(  20.144|   0.000) I: [pulseaudio] module-device-restore.c: Storing volume/mute for device+port sink:alsa_output.pci-0000_00_14.2.iec958-stereo:iec958-stereo-output.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: after: 88115
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] alsa-sink.c: Rewound 352460 bytes.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: Processing rewind...
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink-input.c: Have to rewind 352460 bytes on render memblockq.
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] source.c: Processing rewind...
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24772 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24768 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24764 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24760 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24760 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24756 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24752 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24748 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24744 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24740 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24736 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24736 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24732 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24732 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24728 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24728 bytes ahead in playback buffer)
(  20.144|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24724 bytes ahead in playback buffer)
(  20.146|   0.001) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24496 bytes ahead in playback buffer)
(  20.146|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24488 bytes ahead in playback buffer)
(  20.146|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24484 bytes ahead in playback buffer)
(  20.146|   0.000) D: [alsa-sink-ALC892 Digital] sink.c: alsa_output.pci-0000_00_14.2.iec958-stereo: Found underrun 327984 bytes ago (24480 bytes ahead in playback buffer)
(  20.729|   0.583) I: [pulseaudio] module-device-restore.c: Synced.
Comment 1 Tanu Kaskinen 2017-11-09 12:06:18 UTC
This is weird behaviour. I suspect that the kernel driver is automatically unmuting itself. Try commenting out the contents of /usr/share/pulseaudio/alsa-mixer/paths/iec958-stereo-output.conf, does that fix the problem?
Comment 2 mail 2017-11-09 13:27:03 UTC
Wow yes, that did fix it. Thank you :-)
Can I help with any additional info?
Comment 3 Tanu Kaskinen 2017-11-30 19:18:48 UTC
Sorry for the long delay in replying...

Could you report this to the kernel driver developers? Instructions here: http://alsa-project.org/main/index.php/Bug_Tracking

If your bug report is ignored, then I think we should add a workaround in PulseAudio.
Comment 4 GitLab Migration User 2018-07-30 09:31:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/41.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.