Hd-audio codec setup in Virtual Box

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Hd-audio codec setup in Virtual Box

Post by Kamal123 »

Hi,
I am trying to implement hd-audio driver. Finally I have the first output stream running. First I setup the output stream descriptor than setup an output converter with stream I'd, format, cleared mute bit, power on (D0 state),eapd/btl. In Qemu, if I set the volume of output converter to 0 which is 0x80 the mute bit, it doesn't produce sound and if I set the volume to some value (e.g:20) it produces sound, but in virtual box if I don't setup any output converter than also, after running the stream it produces sound. I tried using the mute bit in all output converters than also it produces sound from the first output stream. Also I cannot control the volume using amplifier gain verb in virtual box.

Here's my code - https://github.com/manaskamal/aurora-xe ... da/hda.cpp

Thanks in advance
Klakap
Member
Member
Posts: 297
Joined: Sat Mar 10, 2018 10:16 am

Re: Hd-audio codec setup in Virtual Box

Post by Klakap »

Also I cannot control the volume using amplifier gain verb in virtual box.
There is no guarantee that nodes can produce sound of other volume, or that they can be muted. You have to find it by verb 0xF00 command 0x12/0x0D

Also, it sounds like you are not setting any pin node, only output converter. It works in QEMU, but it may be problem when you come to Virtualbox.
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Re: Hd-audio codec setup in Virtual Box

Post by Kamal123 »

Hi,
Thanks for your reply!!

Finally, I can control the codec in virtual box, I can mute the output also I can increase or decrease volume. I directly used the registers (verb) of STAC9220 codec to control the output and it worked for me!! Currently I am thinking to write a separate driver for Sigmatel hda codec.
Klakap
Member
Member
Posts: 297
Joined: Sat Mar 10, 2018 10:16 am

Re: Hd-audio codec setup in Virtual Box

Post by Klakap »

It should not work only in this way, did you try to change volume on pins connected to converter?
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Re: Hd-audio codec setup in Virtual Box

Post by Kamal123 »

Yes I did.. it didn't worked. I first checked if the pin was for output, than I tried sending VERB_SET_AMP_MUTE verb to pin node with mute bit cleared, left and right channel bit on and the volume, it still didn't worked. But using this method I am also able to play an wave file with different volumes. I am not cleared with pin widgets, I realised!! :(
Klakap
Member
Member
Posts: 297
Joined: Sat Mar 10, 2018 10:16 am

Re: Hd-audio codec setup in Virtual Box

Post by Klakap »

I checked it out with my code and found that no converter or pin in virtualbox have caability to change volume. Strange. I hope they will fix it in future.
Kamal123
Member
Member
Posts: 99
Joined: Fri Nov 01, 2019 1:17 am

Re: Hd-audio codec setup in Virtual Box

Post by Kamal123 »

Yes, exactly. I can control volume either with pin or direct output node in Qemu but not in VBox. I reported the bug to virtual box bug tracker.
Post Reply