[wdmaudiodev] Re: AVStream virtual audio driver: different sound quality dependently on the number of CPU cores.

  • From: Alexander Ivash <elderorb@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 22 Jul 2016 14:28:48 +0300

I've wrapped the places of writing to and reading from the ring buffer
with KScopedMutex (taken from avscamera sample), but still hear sound
distortion. From the first looks it seems like on multi-core VMs
Windows is 'requesting' data with a different speed. Which means most
likely Tim Roberts is absolutely right - I should stop using VM and
check on real hardware.

Another possibility - I'm misusing PIN flags. I thought that in my
scenario Windows will take care of frame size & speed of frames
delivery etc. In other words all I need to do - is provide the data
all the time Windows is asking for them. Is it correct or I'm missing
something?

Regards, Alexander

2016-07-22 5:04 GMT+03:00 若水 <shlikewater@xxxxxxxxx>:

I think that is problem of thread synchronization. There are some difference
between one cpu and two cups for thread synchronization.


2016-07-21 22:37 GMT+08:00 Matthew van Eerde <dmarc-noreply@xxxxxxxxxxxxx>:

Race condition which is mitigated in the one-CPU case by only having a
single active thread at a time?



From: Alexander Ivash
Sent: Thursday, July 21, 2016 3:31 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] AVStream virtual audio driver: different sound
quality dependently on the number of CPU cores.



What could be the reason for the following behaviour:

On one Windows 7 x64 VM (with 1 CPU) driver works fine (well, with
rare audio artifacts)
On the SAME VM but with 2 CPUs driver works awfully, sound is heavily
distorted.

Behaviour seems to not depend (or influence is very low) on using

KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL or
KSPIN_FLAG_ASYNCHRONOUS_PROCESSING

What other things can I check?

Regards, Alexander
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: