OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:06 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Hd-audio codec setup in Virtual Box
PostPosted: Wed Dec 08, 2021 2:38 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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-xeneva/blob/master/Aurora/Aurora/drivers/hda/hda.cpp

Thanks in advance


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Thu Dec 09, 2021 1:06 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
Quote:
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.

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Thu Dec 09, 2021 7:14 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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.


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Tue Dec 14, 2021 3:16 am 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
It should not work only in this way, did you try to change volume on pins connected to converter?

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Tue Dec 14, 2021 11:39 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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!! :(


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Tue Dec 14, 2021 1:17 pm 
Offline
Member
Member

Joined: Sat Mar 10, 2018 10:16 am
Posts: 296
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.

_________________
https://github.com/VendelinSlezak/BleskOS


Top
 Profile  
 
 Post subject: Re: Hd-audio codec setup in Virtual Box
PostPosted: Tue Dec 14, 2021 11:14 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], mrjbom and 64 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group