Summary: | Assertion '!s->thread_info.rewind_requested' failed at pulsecore/sink.c:1271, function pa_sink_render_into_full(). Aborting. | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Matthijs Kooijman <matthijs> |
Component: | core | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | major | ||
Priority: | high | CC: | lennart, olivier.crete |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
pulseaudio -vv output
another log |
The latency change that is caused by the underrun can apparently cause a rewind request at a bad time. It seems a bit odd that this crash isn't reported much more often, since it looks like the underrun handling is clearly broken, and underruns are a quite common occurrence. Maybe the rewind request happens only in some rare cases (the code path isn't simple, so it's not easy to figure out). Thanks for reporting this. I won't promise a quick fix, but this seems like a clear case that can be fixed once someone finds the time to figure out the correct way to handle the underrun (i.e. avoid any rewind requests in the process, or in some other way make sure that there are no rewind requests pending when pa_sink_render_into_full() is called). Created attachment 114838 [details]
another log
Here is another log with the same assertion.. I suspect that with PA 4.0, it instead resulted in bad playback.
alsa-sink] alsa-sink.c: Latency set to 1.00ms D: [alsa-sink] alsa-sink.c: hwbuf_unused=383808 D: [alsa-sink] alsa-sink.c: setting avail_min=95977 https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/usb?id=a7d9c0990d5503775784fef7ff44d74d7e3294fd how do pulseaudio latency related to period size for those usb audio devices ? can aplay use 1 ms buffer time with hw device of your usb audio devices? aplay -v --buffer-time=1000 -D hw:0,0 stereo.wav (In reply to Olivier Crête from comment #2) > Created attachment 114838 [details] > another log > > Here is another log with the same assertion.. I suspect that with PA 4.0, it > instead resulted in bad playback. any reason to use s32le , seem your combined sink not support 32 bits http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=28&Level=5&Conn=4&ProdID=284 Primary 16/20/24-bit SPDIF-OUT supports 32k/44.1k/48k/88.2k/96k/192kHz sample rate Secondary 16/20/24-bit SPDIF-OUT supports 32k/44.1k/48k/88.2k/96k/192kHz sample rate do your motherboard have internal spdif out connector and spdif out at rear panel post the output of alsa-info.sh which sinks are used by the combined sink ? The combined sink is HDMI + SPDIF. The board is a Asrock H61TM-ITX, I don't have it here, but the spec page on the asrock website seems to say that there is a single spdif connector, but the connections in this machine are a bit strange, so I can double check the physical connections tomorrow. I also have no idea why the s32le, it's generated by application code I don't have the source to right now. http://www.alsa-project.org/db/?f=13394becf97124311d9febe374f62195a4207756 the stream id of two audio output are different (7 and 6) , it is multistreaming of two digital devices but only one converter support 32 bits http://www.intel.com/support/motherboards/desktop/sb/CS-034206.htm The ALC892 provides ten DAC channels that simultaneously support 7.1 channel sound playback, plus 2 channels of independent stereo sound output (multiple streaming) through the front panel stereo outputs. you can enable by hint using early patching to get device 2 ALC892 alt analog playback for the headphone indep_hp (bool): provide the independent headphone PCM stream and the corresponding mixer control, if available https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt APLAY **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 most likely you need to use the format, rate and channel supported by both devices Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital Control: name="IEC958 Playback Con Mask", index=16, device=0 Control: name="IEC958 Playback Pro Mask", index=16, device=0 Control: name="IEC958 Playback Default", index=16, device=0 Control: name="IEC958 Playback Switch", index=16, device=0 Control: name="IEC958 Default PCM Playback Switch", index=0, device=0 Device: name="ALC892 Digital", type="SPDIF", device=1 Converter: stream=7, channel=0 Digital: Enabled Digital category: 0x0 IEC Coding Type: 0x0 PCM: rates [0x5f0]: 32000 44100 48000 88200 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 0x03 [Audio Output] wcaps 0x6611: 8-Channels Digital Device: name="HDMI 1", type="HDMI", device=7 Converter: stream=6, channel=0 Digital: Enabled Digital category: 0x0 IEC Coding Type: 0x0 PCM: rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000 bits [0x1e]: 16 20 24 32 formats [0x5]: PCM AC3 Power states: D0 D3 EPSS Power: setting=D0, actual=D0 Simple mixer control 'IEC958 Default PCM',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=9a08160bdbe3148a405f72798f76e2a5d30bd243 Added a new mixer switch to enable/disable the sharing of the default PCM stream with analog and SPDIF outputs. When "IEC958 Default PCM" switch is on, the PCM stream is routed both to analog and SPDIF outputs. This is the behavior in the earlier version. Turning this switch off has a merit for some codecs, though. Some codec chips don't support 24bit formats for SPDIF but only for analog outputs. In this case, you can use 24bit format by disabling this switch. audio output node 0x02 and node 0x06 should use same stream id Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out Control: name="Front Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Device: name="ALC892 Analog", type="Audio", device=0 Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0 Amp-Out vals: [0x40 0x40] Converter: stream=8, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 seem bug in driver , since audio output 0x02 and nodev0x06 should use same stream id when 'IEC958 Default PCM' is on and device 0 is playing digital device 1 cannot be open seem driver don't report error when there are five line out jack at ext rear bug in parser , hp at node 0x1b is also missng are you using 17 pins analog surround header ? 6.791557] sound hdaudioC0D0: autoconfig: line_outs=4 (0x1a/0x15/0x16/0x17/0x0) type:line [ 6.791563] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 6.791565] sound hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 6.791567] sound hdaudioC0D0: mono: mono_out=0x0 [ 6.791569] sound hdaudioC0D0: dig-out=0x1e/0x0 [ 6.791571] sound hdaudioC0D0: inputs: Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out Control: name="Front Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Front Jack", index=0, device=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00003736: IN OUT Detect Trigger Vref caps: HIZ 50 GRD 80 100 Pin Default 0x01013020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0x40: OUT VREF_HIZ Unsolicited: tag=01, enabled=1 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x0001373e: IN OUT HP EAPD Detect Trigger Vref caps: HIZ 50 GRD 80 100 EAPD 0x2: EAPD Pin Default 0x0221411f: [Jack] HP Out at Ext Front Conn = 1/8, Color = Green DefAssociation = 0x1, Sequence = 0xf Misc = NO_PRESENCE Pin-ctls: 0x20: IN VREF_HIZ Unsolicited: tag=00, enabled=0 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 sys/class/sound/hwC0D0/init_pin_configs: 0x11 0x40028008 0x12 0x90a60150 0x14 0x01014010 0x15 0x01011012 0x16 0x01016011 0x17 0x01012014 0x18 0x01a19040 0x19 0x02a19141 0x1a 0x01013020 0x1b 0x0221411f 0x1c 0x411111f0 0x1d 0x4037e629 0x1e 0x90460130 0x1f 0x411111f0 /sys/class/sound/hwC0D0/driver_pin_configs: /sys/class/sound/hwC0D0/user_pin_configs: 0x11 0x40028008 0x12 0x40f000f0 0x14 0x40f000f0 0x15 0x01011012 0x16 0x01016011 0x17 0x01014413 0x18 0x40f000f0 0x19 0x40f000f0 0x1a 0x01014410 0x1b 0x40f000f0 0x1c 0x411111f0 0x1d 0x4037e629 0x1e 0x014b1180 0x1f 0x411111f0 seem you override pin defaults but there are no internal speaker connector, hdmi spdif what are the setting in asrock uefi setup ? 3.4.3 South Bridge Coniguration Onboard HD Audio Select [Auto], [Enabled] or [Disabled] for the onboard HD Audio. If you select [Auto], the onboard HD Audio will be disabled when a Sound Card is plugged. Front Panel Select [Auto] or [Disabled] for the onboard HD Audio Front Panel. External Panel Select [Auto] or [Disabled] for the External Audio Panel. Onboard HDMI HD Audio This allows you to enable or disable the Onboard HDMI HD Audio. 6.713730] snd_hda_intel 0000:00:1b.0: Applying patch firmware 'hda-mmsos.fw' [ 6.722501] snd_hda_intel 0000:00:1b.0: firmware: direct-loading firmware hda-mmsos.fw any reason to use hda-mmsos.fw ? seem it try to remove all input pins and disable audio mixer nid using hint mixer_nid (int): specifies the widget NID of the analog-loopback mixer but driver still create capture devices without any input pins ARECORD **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_auto_parser.c?id=9b7564a64999597844513604df4a206fa4da3b69 the driver already inform the fifth line out was ignored because of different def assosciation with the other four line out pin of the analog surround audio header of you thin mini itx motherboard you have to file bug report at kernel bugzilla to debug this issue, you need to enable DEBUG_TIMING to check the debugged info or call pa_alsa_dump after pulseaudio print "Unerrun!" and check whether the appl_ptr is behind hw_ptr /* We got a dropout. What a mess! */ left_to_play = 0; underrun = TRUE; #if 0 PA_DEBUG_TRAP; #endif if (!u->first && !u->after_rewind) - if (pa_log_ratelimit(PA_LOG_INFO)) + if (pa_log_ratelimit(PA_LOG_INFO)) { pa_log_info("Underrun!"); + pa_alsa_dump(PA_LOG_INFO, u->pcm_handle); + } } #ifdef DEBUG_TIMING pa_log_debug("%0.2f ms left to play; inc threshold = %0.2f ms; dec threshold = %0.2f ms", (double) pa_bytes_to_usec(left_to_play, &u->sink->sample_spec) / PA_USEC_PER_MSEC, (double) pa_bytes_to_usec(u->watermark_inc_threshold, &u->sink->sample_spec) / PA_USEC_PER_MSEC, (double) pa_bytes_to_usec(u->watermark_dec_threshold, &u->sink->sample_spec) / PA_USEC_PER_MSEC); #endif The internal 17 oin onnector is connected to a panel that has 4 separate connections (which we "split" using pulse). And the internal SPDIF connector is also connected. I didn't setup the fw file, but I think it was to disable other things to prevent noise and enable those that are actually in use. In the UEFI menu, everything is either on "auto" or "enabled. When doing the aplay command without pulseaudio running, I get a bunch of underruns. I'm not sure why the s32le, or the 96000 sinks, it's the application creating those, and I don't have the source code to it right now. I'm not sure I followed everything, but I should rebuild pulse with DEBUG_TIMING and your patch and post the log? Here is the "firmware" file: # ASRock H61TM_ITX (Realtek ALC892) # Vendor Id, Subsystem Id, Address # See /proc/asound/card0/codec#0 [codec] 0x10ec0892 0x1849e892 0 # Prevent the AA-loopback from being enabled which can pull in white noise (ACI#380) [hint] mixer_nid = 0 # Disable everything except for: # 0x1e = Main S/PDIF # 0x1a = Output A (Front) # 0x16 = Output B (Center/LFE) # 0x15 = Output C (Rear) # 0x17 = Output D (Side) [pincfg] 0x11 0x40028008 0x12 0x40f000f0 0x14 0x40f000f0 0x15 0x01011012 0x16 0x01016011 0x17 0x01014413 0x18 0x40f000f0 0x19 0x40f000f0 0x1a 0x01014410 0x1b 0x40f000f0 0x1c 0x411111f0 0x1d 0x4037e629 0x1e 0x014b1180 And the matching pulse profile: [General] auto-profiles = no [Mapping analog-surround-71] device-strings = surround71:%f channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right description = Analog Surround 7.1 paths-output = analog-output priority = 100 direction = output [Mapping analog-stereo] description = Analog Stereo device-strings = front:%f hw:%f channel-map = left,right paths-output = analog-output priority = 90 direction = output [Mapping digital-stereo] device-strings = iec958:%f channel-map = left,right description = Digital Stereo paths-output = iec958-stereo-output priority = 50 direction = output [Mapping hdmi-stereo-7] device-strings = hw:%f,7 channel-map = left,right description = Digital Stereo (HDMI) paths-output = hdmi-output-1 priority = 40 direction = output [Profile output:analog-surround-71+output:digital-stereo+output:hdmi-stereo-7] description = ASRock output-mappings = analog-surround-71 digital-stereo hdmi-stereo-7 priority = 100 why do the firmware remove the pink mic jack and green jack ? do you mean the following jack state are the status of jacks at the external panel connected to 17 pins analog surround audio header ? four line out jacks were plugged control.18 { iface CARD name 'Line Out Front Jack' value true comment { access read type BOOLEAN count 1 } } control.19 { iface CARD name 'Line Out Surround Jack' value true comment { access read type BOOLEAN count 1 } } control.20 { iface CARD name 'Line Out CLFE Jack' value true comment { access read type BOOLEAN count 1 } } control.21 { iface CARD name 'Line Out Side Jack' value true comment { access read type BOOLEAN count 1 } } your alsa info indicate that the three devices are open/playing with different streams this may mean that you may need to check whether the three streams does not exceed the maixmum bandwidth as you are using 96000Hz and s32le do this error also happen when you change the dedault sample rate to 48000Hz and s16le ? APLAY **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 0/1 Subdevice #0: subdevice #0 The only "visible" jacks on the machine are the 4 stereo outputs connected from the 17-pin, the sdpif and the hdmi out. The analog part is opened at 48khz s16le if I read this correctly? Then software remapped to this stupid 96khz s32le ? pactl list short sinks 0 alsa_output.pci-0000_00_1b.0.analog-surround-71 module-alsa-card.c s16le 8ch 48000Hz RUNNING 1 alsa_output.pci-0000_00_1b.0.digital-stereo module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 2 alsa_output.pci-0000_00_1b.0.hdmi-stereo-7 module-alsa-card.c s16le 2ch 44100Hz SUSPENDED 3 null module-null-sink.c s16le 2ch 44100Hz IDLE 4 digital-96000_s32le._.alsa_output.pci-0000_00_1b.0.digital-stereo module-alsa-sink.c s32le 2ch 96000Hz RUNNING 5 hdmi-96000_s32le._.alsa_output.pci-0000_00_1b.0.digital-stereo module-alsa-sink.c s32le 2ch 48000Hz RUNNING 6 96000_s32le._.alsa_output.pci-0000_00_1b.0.digital-stereo module-combine-sink.c s32le 2ch 96000Hz IDLE 7 96000_s32le._.analog-stereo-a module-remap-sink.c s32le 2ch 96000Hz RUNNING 8 96000_s32le._.analog-stereo-b module-remap-sink.c s32le 2ch 96000Hz RUNNING 9 96000_s32le._.analog-stereo-c module-remap-sink.c s32le 2ch 96000Hz RUNNING 10 96000_s32le._.analog-stereo-d module-remap-sink.c s32le 2ch 96000Hz RUNNING pactl list source do any available port in alc892 capture source ? it is bug of alsa driver to create analog capture device and alt analog capture device when there is no input pin complex (e.g. internal mic) ? ARECORD **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 do your aio have internal mic , digital mic , webcam mic ? Fixing the rate and format to what alsa_output.pci-0000_00_1b.0.analog-surround-71 is setup for does not change anything. (In reply to Nicolas Dufresne from comment #21) > Fixing the rate and format to what > alsa_output.pci-0000_00_1b.0.analog-surround-71 is setup for does not change > anything. you have to provide stacktrace , pulseaudio verbose log and output of alsa-info.sh -- 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/pulseaudio/issues/207. |
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.
Created attachment 67112 [details] pulseaudio -vv output This assertion occured when playing an audio stream and starting pavucontrol halfway through the stream. I happened to have pulseaudio running with -vv, so I'm attaching that log output. I unfortunately don't have a stacktrace, nor have I succeeded in reproducing this particular assert. This assertion was observed running pulseaudio 2.0 from Debian (2.0-3). Here's the tail of the log: D: [pulseaudio] protocol-native.c: Client pavucontrol changes volume of sink input 'A Night Like This' by 'Caro Emerald'. D: [alsa-sink] alsa-sink.c: Requested to rewind 384000 bytes. D: [alsa-sink] alsa-sink.c: Limited to 3584 bytes. D: [alsa-sink] alsa-sink.c: before: 896 D: [alsa-sink] alsa-sink.c: after: 896 D: [alsa-sink] alsa-sink.c: Rewound 3584 bytes. D: [alsa-sink] sink.c: Processing rewind... D: [alsa-sink] sink-input.c: Have to rewind 3584 bytes on render memblockq. D: [alsa-sink] module-equalizer-sink.c: Rewind callback! D: [alsa-sink] sink-input.c: Have to rewind 3584 bytes on render memblockq. D: [alsa-sink] source.c: Processing rewind... I: [pulseaudio] module-stream-restore.c: Storing volume/mute/device for stream sink-input-by-media-role:music. I: [alsa-sink] alsa-sink.c: Underrun! I: [alsa-sink] alsa-sink.c: Increasing minimal latency to 1.00 ms D: [alsa-sink] alsa-sink.c: Latency set to 1.00ms D: [alsa-sink] alsa-sink.c: hwbuf_unused=383808 D: [alsa-sink] alsa-sink.c: setting avail_min=95977 D: [alsa-sink] alsa-sink.c: Requesting rewind due to latency change. D: [alsa-sink] alsa-sink.c: Latency set to 1.00ms D: [alsa-sink] alsa-sink.c: hwbuf_unused=383808 D: [alsa-sink] alsa-sink.c: setting avail_min=95977 D: [alsa-sink] alsa-sink.c: Latency set to 1.00ms D: [alsa-sink] alsa-sink.c: hwbuf_unused=383808 D: [alsa-sink] alsa-sink.c: setting avail_min=95977 D: [alsa-sink] alsa-sink.c: Latency set to 1.00ms D: [alsa-sink] alsa-sink.c: hwbuf_unused=383808 D: [alsa-sink] alsa-sink.c: setting avail_min=95977 E: [alsa-sink] sink.c: Assertion '!s->thread_info.rewind_requested' failed at pulsecore/sink.c:1271, function pa_sink_render_into_full(). Aborting.