Jump to content

VoodooHDA 3.0.2


Slice
714 posts in this topic

Recommended Posts

It is because of this line in VoodooHDA.xcodeproj/project.pbxproj

		E5A3BD951E7095C100F91F3D /* PCMBlitterLibX86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEF7C0A70EF74C2700A14C68 /* PCMBlitterLibX86.cpp */; settings = {COMPILER_FLAGS = "-I ${DT_TOOLCHAIN_DIR}/usr/lib/clang/8.1.0/include -fvisibility=hidden"; }; };
/* End PBXBuildFile section */
It contains compiler flags for PCMBlitterLibX86.cpp with explicit path of Include dir to find xmmintrin.h

${DT_TOOLCHAIN_DIR}/usr/lib/clang/8.1.0/include

 

For Xcode 8.2.1 it should be

${DT_TOOLCHAIN_DIR}/usr/lib/clang/8.0.0/include

 

There is also an xmmintrin.h under tranc.

 

The error has something to do with version of xmmintrin.h it's using.

 

Hi Zenith432,

I can successfully compile VodooHDA in Xcode4.4.1 but not 8.2.1. Do you?

attachicon.gifScreen Shot 2017-04-03 at 20.30.32.png

  • Like 1
Link to comment
Share on other sites

Thanks! Now succeeded.

/Volumes/Sierra/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Clang/include/xmmintrin.h
/Volumes/Sierra/Library/Developer/CommandLineTools/usr/lib/clang/8.0.0/include/xmmintrin.h
/Volumes/Sierra/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/2.0/include/xmmintrin.h
/Volumes/Sierra/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/A/Libraries/lib/clang/3.5/include/xmmintrin.h

They are different.


With 2.8.10 I have 5.1 device

Снимок экрана 2017-04-04 в 7.43.37.png

w00t.png

Link to comment
Share on other sites

Should be the one under ${DT_TOOLCHAIN_DIR}/usr/lib/clang/8.0.0/include.  For the command line tools I guess DT_TOOLCHAIN_DIR is /Library/Developer/CommandLineTools.  For XCode 8.2.1 full install it's under Developer/Toolchain folder in the Xcode.app tree.

They are different.

Multichannel pin associations are now operational. They didn't work before because a bug in the hpredir logic caused every multi-pin association to be treated as headphone-redirect instead of multichannel :rofl:.

You can set the format for analog multichannel engine in Audio Midi setup.  It still has only L-R volume control, but setting the volume sets L-R on all three pins.  As I said in previous post, I'm not sure that channels 0 - 5 are sent to Green-Orange-Black in that order.  I'm sure channels 0-1 are sent to Green.  I'm not sure about channels 2-5.

Link to comment
Share on other sites

There is AutumnRain's old patch to switch channels. He was needed it because of mono-mic had only R channel.

			//Меняю местами значения для левого и правого канала
			if(mDevice && mDevice->mSwitchCh && (streamFormat->fNumChannels > 1)) {
				UInt32 i;
				Float32 tempSamples;
				
				for(i = 0; i < numSamples; i+= streamFormat->fNumChannels) {
					tempSamples = floatDestBuf[i];
					floatDestBuf[i] = floatDestBuf[i+1];
					floatDestBuf[i+1] = tempSamples;
				}
			}

I think you can do something similar to exchange channels.

Link to comment
Share on other sites

I have Yosemite 10.3 fully working on a HP dv4-2160us laptop. I intend to install Sierra.

 

On the Yosemite, I inserted the follow lines to the info.plist file of the voodoo HDA kext in order to get the volume slider and mute touch working.

 

<key>VoodooHDAEnableMuteFix</key>

<true/>
<key>VoodooHDAEnableVolumeChangeFix</key>
<true/>
 
Will I be able to get this function working on Sierra?
Link to comment
Share on other sites

I want to say : THANKS!
Installed V 2.88 on my Laptap Medion 6612 (C2D, ALC 263, Yosemite) and worked. NO reboot required, i heared an "krrrk" on the end of the installation and audio was working :)

Installing V 2.8.9 kext would be usefull or "never touch an working system"? :)

Link to comment
Share on other sites

@Slice:

With rev 129 I hope Analog Multichannel works now, including channels output in right order to pins.

HDMI is still limited to stereo.

Bumped version to 2.8.10d4.

 

Green - FL/FR

Orange - FC/LFE

Black - RL/RR

Grey (only in 7.1) - SL/SR

 

UPDATE: I tested analog multichannel - it works.  Tested as follows:

Made an 8-channel WAV file at 48KHz/16-bit with Audacity, on each channel recorded the channel name.  Channel order FL/FR/FC/LFE/RL/RR/SL/SR.

Play the WAV file with QuickTime, plugged headphones into each of the four pins Green/Orange/Black/Grey and heard the correct channel names.

When I play AC3 file with QuickTime, it gets mixed down to Stereo, so I couldn't test that way.

iTunes couldn't play either AC3 or 8-channel WAV file.

 

Hey Zenith432,

Multichannel sound is bad. Like a saw, sound then pause then again.

  • Like 2
Link to comment
Share on other sites

Thanks Zentih432! I will test and report on monday evening.

And did you even encounter dump-log overflow? In this case sound chokes and restores after pause-play.

Link to comment
Share on other sites

I don't get sound chokes and restores.

There is no overflow in getdump.

In dmesg there is a huge amount of debug prints from IOAudioFamily like debugging is turned on.  I don't know why.  But it doesn't degrade playback.

And did you even encounter dump-log overflow? In this case sound chokes and restores after pause-play.

Link to comment
Share on other sites

When I play AC3 file with QuickTime, it gets mixed down to Stereo, so I couldn't test that way.

I figured out how to play multichannel AC3 in QuickTime.

In Audio-Midi Setup, click on the 8-channel device, then choose Configure Speakers.

In Configuration, choose 5.1 surround, or 7.1 surround, or 7.1 rear surround, and configure which channel is which speaker.

Finally, click apply and done.

After this, QuickTime will know how to play multichannel audio on this device.

iTunes doesn't seem to know how to play multichannel. It doesn't let me add AC3 or multichannel WAV to the library.

Link to comment
Share on other sites

Would it be possible to add some code to VoodooHDA to read the ELD and use the "Monitor_Name_String" instead of just "Digital-out (HDMI)" for the display output devices? This would allow the user to see which output is actually connected and to what display it is connected to.

Link to comment
Share on other sites

In Audio-Midi Setup, click on the 8-channel device, then choose Configure Speakers.

In Configuration, choose 5.1 surround, or 7.1 surround, or 7.1 rear surround, and configure which channel is which speaker.

Finally, click apply and done.

After this, QuickTime will know how to play multichannel audio on this device.

@Slice,

In Rev 130, I added code to set a default Speaker Configuration to be used with 5.1 and 7.1 audio for CoreAudio to use if it is not manually programmed in Audio-Midi Setup - to enable surround sound (at least in QuickTime). I checked the channels are output in right order in analog multichannel with this setup. [The setup says that in 7.1 rear come after after side, but actually they come before side.]

Would it be possible to add some code to VoodooHDA to read the ELD and use the "Monitor_Name_String" instead of just "Digital-out (HDMI)" for the display output devices? This would allow the user to see which output is actually connected and to what display it is connected to.

Read my post.  It is not possible to rely on Apple's video driver to make the ELD available to HDA.  I'm using Intel HD Graphics 630 with AppleIntelSKLGraphicsFramebuffer, and the ELD buffer passed to the HDMI codec is empty.

  • Like 1
Link to comment
Share on other sites

For my mind this is major update. We should change version to 2.9.0.  :wink_anim:

:thumbsup_anim: 

But not done yet...

  • Still need to do HDMI multichannel.  Now HDMI looks multi to macos, but only sends stereo to device.
  • The volume control for multichannel is binary (L/R).  The left volume controls all three or four "lefts".  The right volume controls all three or four "rights".  This is reasonable for FL/FR, RL/RR, SL/SR, but for FC/LFE pair it doesn't make sense.

Do you still get choppy sound with chokes and log overflow when playing analog multichannel?

Link to comment
Share on other sites

  1. Click on the configure speakers at the bottom right and make sure it's configured for 5.1 surround.
  2. Please upload getdump for codec.  Choppy sound seems like a bug, but maybe it depends on codec.  I don't get choppy sound (ALC 887).
  3. Can you load a sample of the original multichannel audio you're playing?  I'll try play it see if I get choppy sound.

Hi Zenith432!

My test is bad

attachicon.gifСнимок экрана 2017-04-17 в 20.50.31.png

I catch the sound from left speaker by iPhone. Hear!

attachicon.gif20170417 205724.m4a.zip

 

 

Other Update: rev 133 supports HDMI multichannel.  I cannot test it because A/V receiver is too far from HDMI port to connect.  HDMI stereo still works so no regression.

 

@Slice: I think the problem may be with IOAudioEngine::setMixClipOverhead.  In 6-channel input, it has convert 3 times as many floats ->ints, so maybe on slower systems the default is not enough and mix buffer is underrun.

Another thing to look at is setSampleOffset or setSampleLatency.  Not sure what those do.

Choppy sound is from buffer overrun or underrun.

Edited by Zenith432
Link to comment
Share on other sites

Departed.m4a is stereo source.

Plays ok on my system.  Tried various formats - 16-bit, 24-bit, 44.1 KHz, 48KHz, in 7.1CH analog and HDMI (8CH).  All work ok.

I looked at codec dump - looks ok.

I think I know what's going on.

The problem is clipOutputSamples() is called too late, and causes buffer underrun in conversion from float->int samples.

Why is this?

On Headphone (pure stereo) output - it's a 2-channel device.  So convert float->int for 2 channels.

On 5.1CH device, input is 6 channels.  Channels 0-1 are from source, channels 2-5 are zero-filled by CoreAudio.

All 6 channels are converted float->int by clipOutputSamples.  So need more time to process.  On older system there's not enough time - leads to underrun.  On my Kabylake it's fast enough, so no problem doing float->int conversion for 8 channels instead of 2.

Tomorrow I'll look at IOAudioFamily to see how to increase the amount of time available for clipOutputSamples to find a fix.

 

Edit: try reducing sample bit-width to 16-bit, conversion float->16 slightly faster than float->24, so maybe it'll work by coincidence :)

 

This is original sound track

attachicon.gif02 Departed.m4a.zip

I tested all setting in Audio-MIDI with different speed of chopping. But sound always bad.

The dump is here

attachicon.gifALC1150-2.8.10d5.txt.zip

up to rev 132, but not 133 yet.

 

PS. Sound in Headphone, pure stereo, is very good.

Edited by Zenith432
Link to comment
Share on other sites

My system is Skylake 3.3GHz, not so slow! And yes, I tested 16-24bit and 44-48-96kHz. I got different speed of choping but never good sound.

I noticed that 2.8.10d1 requires more CPU load then 2.8.9. Why? 


I think I hear all 6 channels but mixed in stereo like 0,2,4 into left, 1,3,5 into right but consequently. Sound_1, then Sound_3 (silence), then sound_5 (silence), and then period.

Link to comment
Share on other sites

×
×
  • Create New...