WASAPI not used even when hard-coded

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
damonbrodie Offline
Member
Posts: 60
Joined: May 2014
Reputation: 0
Post: #1
My setup:

Kodi 17.1
HDMI to Yamama Amp (and then on to a projector)

I have my advancedsettings.xml set to hardcode the WASAPI GUID for my HDMI interface.
I have passthru enabled.
I've set the Audio Keep-Alive timer to Always/None/1 Minute and 10 minutes, and I've alternated the "Low volume noise" on/off.

I've read though several threads and it seems to be a common issue:

http://forum.kodi.tv/showthread.php?tid=...ght=wasapi
http://forum.kodi.tv/showthread.php?tid=...pid1357945
http://forum.kodi.tv/showthread.php?tid=133755

Typically I will startup my Amp (the HTPC is always runnning) and then proceed to start a movie, and typically I end up with DirectSound because the Amp shows PCM instead of whatever the native format is. If I stop the movie and restart it will typically be correctly set to WASAPI after that.

Here is the log:
https://pastebin.com/ZteTG4E0


At 20:26 I start Star Wars:

Code:
20:26:50.436 T:7368  NOTICE: VideoPlayer: Opening: smb://10.0.0.7/movies/Star Wars - Episode IV - A New Hope (1977).mkv
20:26:50.436 T:7368 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:26:50.439 T:7368   ERROR: DXVA::CProcessorHD::IsFormatSupported: Unsupported format 104 for 1.
20:26:50.439 T:7368   ERROR: DXVA::CProcessorHD::IsFormatSupported: Unsupported format 105 for 1.
20:26:50.440 T:5820  NOTICE: Creating InputStream
20:26:50.557 T:5820  NOTICE: Creating Demuxer
20:26:50.663 T:5820  NOTICE: Opening stream: 0 source: 256
20:26:50.663 T:5820  NOTICE: Creating video codec with codec id: 28
20:26:50.663 T:5820  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
20:26:50.663 T:5820  NOTICE: Creating video thread
20:26:50.663 T:5820  NOTICE: Opening stream: 2 source: 256
20:26:50.663 T:6332  NOTICE: running thread: video_thread
20:26:50.664 T:5820  NOTICE: Finding audio codec for: 86020
20:26:50.664 T:5820  NOTICE: Creating audio thread
20:26:50.664 T:5820  NOTICE: Opening stream: 4 source: 256
20:26:50.664 T:2180  NOTICE: running thread: CVideoPlayerAudio::Process()
20:26:50.664 T:6332  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating DXVA(1920x1080)
20:26:50.674 T:2180  NOTICE: Creating audio stream (codec id: 86020, channels: 7, sample rate: 48000, no pass-through)

I do it again at 20:27 with the same result, and then at 20:29 I try again:

Code:
20:29:19.368 T:7368  NOTICE: VideoPlayer: Opening: smb://10.0.0.7/movies/Star Wars - Episode IV - A New Hope (1977).mkv
20:29:19.368 T:7368 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:29:19.368 T:7368   ERROR: DXVA::CProcessorHD::IsFormatSupported: Unsupported format 104 for 1.
20:29:19.368 T:7368   ERROR: DXVA::CProcessorHD::IsFormatSupported: Unsupported format 105 for 1.
20:29:19.368 T:6824  NOTICE: Creating InputStream
20:29:19.423 T:6824  NOTICE: Creating Demuxer
20:29:19.480 T:6824  NOTICE: Opening stream: 0 source: 256
20:29:19.480 T:6824  NOTICE: Creating video codec with codec id: 28
20:29:19.480 T:6824  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
20:29:19.480 T:6824  NOTICE: Creating video thread
20:29:19.480 T:6824  NOTICE: Opening stream: 2 source: 256
20:29:19.480 T:6824  NOTICE: Finding audio codec for: 86020
20:29:19.480 T:6824  NOTICE: Creating audio thread
20:29:19.480 T:7932  NOTICE: running thread: video_thread
20:29:19.480 T:6824  NOTICE: Opening stream: 4 source: 256
20:29:19.481 T:6864  NOTICE: running thread: CVideoPlayerAudio::Process()
20:29:19.482 T:7932  NOTICE: CDVDVideoCodecFFmpeg::GetFormat - Creating DXVA(1920x1080)
20:29:19.491 T:6864  NOTICE: Creating audio stream (codec id: 86020, channels: 6, sample rate: 48000, pass-through)

This time it works and I had passthru.

What can I do (config/hack/workaround) to get WASAP playback everytime? Is there something else I can do configuration wise to ensure I get WASAPI?
find quote
PatK Offline
Team-Kodi Member
Posts: 8,072
Joined: Mar 2010
Reputation: 196
Location: Canada
Post: #2
Typically the HDMI handshake is needed for waspi to hold, otherwise the default DirectSound is used. Windows audio (wiki) and Audio quickstart guide (wiki) the pin 19 trick sometimes is used http://forum.kodi.tv/showthread.php?tid=...pid1357945

windows fresh start -> delete C:\Users\User Name\AppData\Roaming\Kodi First time user (wiki) Log file (wiki) Video management (wiki) Artwork (wiki) Supported hardware (wiki) Releases (wiki) Database versions (wiki) Skin features compatibility list (wiki) http://xbmc-skins.com
find quote
damonbrodie Offline
Member
Posts: 60
Joined: May 2014
Reputation: 0
Post: #3
Thanks for the links to the wikis. I understand that HDMI handshaking is required. When is that done? In my scenario, I turn on the Amp and projector I see the windows audio device goes from "unplugged" state to being the default and enabled audio device. Does Kodi do something at that point, or is it only once I start playback. Given that it seems to fix it self sometimes with multiple attempts, I guess it is making this determination at media playback time?

Is there a way to set a number of retries so that the WASAPI negotiation has a higher success rate?
find quote
nickr Offline
Team-Kodi Member
Posts: 17,646
Joined: May 2009
Reputation: 355
Location: Christchurch NZ
Post: #4
Try restarting kodi when the amplifier is on.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
damonbrodie Offline
Member
Posts: 60
Joined: May 2014
Reputation: 0
Post: #5
(2017-05-20 01:08)nickr Wrote:  Try restarting kodi when the amplifier is on.

Yup, that works. I'm hoping to have a stable solution that works for the family though. If this isn't considered a bug in Kodi then I will move on to hacky workaround solutions.
find quote
nickr Offline
Team-Kodi Member
Posts: 17,646
Joined: May 2009
Reputation: 355
Location: Christchurch NZ
Post: #6
The conventional wisdom has always to turn on other devices before your kodi computer. Is there a reason to turn off your amp?

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
damonbrodie Offline
Member
Posts: 60
Joined: May 2014
Reputation: 0
Post: #7
(2017-05-20 01:23)nickr Wrote:  The conventional wisdom has always to turn on other devices before your kodi computer. Is there a reason to turn off your amp?

This install is in my home theatre so it is used regularly, but might be a day or two between uses. I would not want to keep my amp on 24/7.
find quote
jjd-uk Offline
Team-Kodi Member
Posts: 6,111
Joined: Oct 2011
Reputation: 146
Post: #8
Could you copy your xml code in advancedsettings.xml to pastebin and share the link to it here? just want to sanity check what you've done as other people have had success with doing what you've done. If what you've done is right and it really is failing in your case then the only option is an edid override to fool your pc into thinking the amp is always on, see http://forum.kodi.tv/showthread.php?tid=251833
find quote
damonbrodie Offline
Member
Posts: 60
Joined: May 2014
Reputation: 0
Post: #9
(2017-05-20 10:31)jjd-uk Wrote:  Could you copy your xml code in advancedsettings.xml to pastebin and share the link to it here? just want to sanity check what you've done as other people have had success with doing what you've done. If what you've done is right and it really is failing in your case then the only option is an edid override to fool your pc into thinking the amp is always on, see http://forum.kodi.tv/showthread.php?tid=251833

Hi,

Here is my advancedsettings.xml:

Code:
<advancedsettings>
  <audiooutput>
    <audiodevice>WASAPI:{F8DCDE74-0531-432D-AB26-CA31B0DCC46A}</audiodevice>
    <passthroughdevice>WASAPI:{F8DCDE74-0531-432D-AB26-CA31B0DCC46A}</passthroughdevice>    
  </audiooutput>
</advancedsettings>

Thanks for posting the edid hack. I guess I have 3 kludgy hacks to choose from: 1) restart Kodi as necessary 2) try the pin 19 hack, 3) the EDID driver hack. It frustrates me that there isn't a cleaner solution to this seemly common problem that could be implemented entirely with Kodi.

Nevertheless I'm not willing at this point to dive into Kodi's internals to try and figure out a solution. I will investigate each of the workarounds and see if one works.

Thanks for your assistance,

Damon
find quote
PatK Offline
Team-Kodi Member
Posts: 8,072
Joined: Mar 2010
Reputation: 196
Location: Canada
Post: #10
Quote: It frustrates me that there isn't a cleaner solution to this seemly common problem that could be implemented entirely with Kodi.
Frustrates all of us when High-bandwidth Digital Content Protection was implemented. https://en.wikipedia.org/wiki/High-bandw...Protection

If you come up with the solve, please share.

windows fresh start -> delete C:\Users\User Name\AppData\Roaming\Kodi First time user (wiki) Log file (wiki) Video management (wiki) Artwork (wiki) Supported hardware (wiki) Releases (wiki) Database versions (wiki) Skin features compatibility list (wiki) http://xbmc-skins.com
find quote
nickr Offline
Team-Kodi Member
Posts: 17,646
Joined: May 2009
Reputation: 355
Location: Christchurch NZ
Post: #11
Edid is not really what I'd call a hack.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote