Date: Wed, 10 Aug 2016 21:51:03 +0300 From: Alex Teaca <ionutalex.teaca@gmail.com> To: soc-status@freebsd.org Subject: Re: [GSOC 2016] HD Audio Emulation For Bhyve Status Message-ID: <CAP0yNuo5w=PbJ1zOS6cWiB_nWDSxWmSf3MG3yH%2BdK=AWoQe=Tg@mail.gmail.com> In-Reply-To: <CAP0yNupBJWGvdO4C7_L7yjWbtsVC0EtwN3d9qa7ewmnWYD08CQ@mail.gmail.com> References: <CAP0yNupzDmLnaEPLL91FEf72V_LRRasD2FpexmkF6NaGrtt1kw@mail.gmail.com> <CAP0yNuoUmU_Xhj5sY-L-G--_PkzgWWNQ-5D7ub-Jn6jvM_EhJg@mail.gmail.com> <CAP0yNurOFWzEN3oxewsTPMrFV6EzxKnHEp45XPpBdgd8jk7LuQ@mail.gmail.com> <CAP0yNupBJWGvdO4C7_L7yjWbtsVC0EtwN3d9qa7ewmnWYD08CQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi I finished to implement the ADC feature so I am able to record samples from a mic. I tested in both Linux and Windows (arecord from alsa, and Sound Recorder from windows) and it goes well. Redesigned the hda_codec that it allows to provide either ADC, DAC or both of them by config. Basically, if you want only playback emulation just add: -s 5:0,hda,play=/dev/dsp[%d] The general configuration is: -s 5:0,hda,rec=/dev/dsp[%d],play=/dev/dsp[%d] I want to fix some coding style issues, write the documentation and prepare the Work Product Submission required by Google. Thanks, Alex On Sat, Jul 30, 2016 at 10:56 AM, Alex Teaca <ionutalex.teaca@gmail.com> wrote: > Hi, > > Meanwhile I have added some small functionalities in order to make it work > with Linux and Windows virtual machines. The difficult part was rather to > find the right setup to run Windows properly. > > Now, it works playing audio on FreeBSD, Linux (ubuntu 14.04 server) and > Windows 2k8 server guests. One limitation I still have is the necessity to > use hw.snd.latency=0 when play with Windows. > > I am working at the input features in order to capture audio. > > Thanks, > Alex > > > On Sun, Jun 26, 2016 at 8:49 PM, Alex Teaca <ionutalex.teaca@gmail.com> > wrote: > >> Hi, >> >> Short update. >> >> - implement the stream management operations (stream_start, stream_stop, >> hda stream interrupts, hda_transfer) in the hda and hda codec >> - create one thread per stream in the initialization of the codec which >> runs as long as the stream is started and waits on a conditional variable >> when the stream is stopped. >> - implement the Audio Player used to play samples to the sound device >> (/dev/dsp) (3 functions: audio_init, audio_set_params and audio_playback) >> >> Results: manage to play music in a bhyve virtual machine :) >> >> Thanks, >> Alex >> >> >> On Fri, Jun 17, 2016 at 9:52 PM, Alex Teaca <ionutalex.teaca@gmail.com> >> wrote: >> >>> Hi, >>> >>> I added a pin widget (Line-out) and now the Audio Output Widget is >>> enabled. The codec is installed as pcm0: >>> root@vm_hda:~ # cat /dev/sndstat >>> Installed devices: >>> pcm0: <Generic (0x8086) (Analog Line-out)> (play) default >>> >>> The next step is to implement the stream management operations such as >>> start_stream and stop_stream. I have taken a look on the Stream management >>> chapter from the HDA specification in order to get familiar with these >>> operations and study the driver implementation (hdaa_audio_setup, >>> hdac_stream_start, hdac_stream_stop) to see what registers are programmed >>> and what commands are sent to the codec. >>> >>> Together with Peter and Alexander we chose the design of the interaction >>> between the HDA controller, codecs and Audio player regarding the stream >>> management. >>> >>> Thanks, >>> Alex >>> >>> >>> On Mon, Jun 6, 2016 at 10:01 PM, Alex Teaca <ionutalex.teaca@gmail.com> >>> wrote: >>> >>>> Hi, >>>> >>>> Here is the status with the features I have implemented so far. >>>> >>>> - set up the HDA controller as a PCI device in bhyve >>>> - design the layout of registers and implement the read and write >>>> access to the registers >>>> - implement the CORB and RIRB mechanisms in order to get commands from >>>> driver and respond back >>>> - add the hdac_codec module and implement the interface of >>>> communication between the hda controller and codec >>>> - describe the hda codec parameters for each node (ROOT, FG and AUDIO >>>> OUTPUT) >>>> - handle the GET_PARAMETER verb >>>> >>>> At the moment there is only one widget: the Autio Output Widget and the >>>> hda driver has disabled it because it does not find any Pin widget. >>>> >>>> The plan is to add the Pin output widget and to continue with the >>>> streams data in order to play some samples. >>>> >>>> Thanks, >>>> Alex >>>> >>>> >>> >> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP0yNuo5w=PbJ1zOS6cWiB_nWDSxWmSf3MG3yH%2BdK=AWoQe=Tg>