From owner-soc-status@freebsd.org Wed Aug 10 18:51:05 2016 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B1F3BB5C6B for ; Wed, 10 Aug 2016 18:51:05 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3CB1A4E for ; Wed, 10 Aug 2016 18:51:05 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: by mail-oi0-x236.google.com with SMTP id 4so71710780oih.2 for ; Wed, 10 Aug 2016 11:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=y8P1CTzjLwxiUqCzZwYkEkVRMwk9gEQsqP1G0VxqnS0=; b=vjcJ1pKXNZncMnAQr4+B9werpb3ZFQnWYIpV2dxkpWYEmCHvcs7f69VWMNdS+UqVgS vmBnQpIT3x7FOcZRulbNA29qEIqxOlEraKuXSHqqqUT+HVaAdSWc+JfubjwgYs482Jeg uJr6HMPaWzwIgrnd73OqlcMYAut1emvRgYT3l2vKyPxoR+0lNOr5rUBEWp2B2ibWYdNr msFldFYIPPAV3KPeCfC04RH+Ze9+vohfMfQrNu49U6t4f0jg480rvwxKAqik4QyP1AYw ytUxuKXywT/ITkc2A7tLmbX7Z21SPJOSIAfZmqHKURGli3KTbqc/HbBJpsgBnZpwXxPd gVEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=y8P1CTzjLwxiUqCzZwYkEkVRMwk9gEQsqP1G0VxqnS0=; b=ZznWg6QyK9xnJVNuw+sJtB9EeFji2tfKBCnwyU61LlYzGqnAFMipTs0CNidHpUc5Wa b7cN2r4GJN8mdP2col6k15RC7tKvQ73WQRpKho4pj+n3xHkqu4AWdNZsFM/WCZ7s5j7t ZGaMnmYEmRb+VUIN8CF1wWg07p2hzOwsxJNYW5hGQvGCDNhMdJkm+5M5uW+3H766mMoP mzCkm36wt03j/PqXl0SYelwypnZHWBaFh92leJQI7VyaygRxuWLf7wLJ79XyzjS9z/a7 xbN0i5JBE8vCQFN4i1MtUMpLQpCa9KvmjpdbW+2JbZzqFvI28q5zZtL/+yNgVdyxY8Uk 3Hyg== X-Gm-Message-State: AEkoouuHHX6oQxJkdY2LWudDY2u79Kv2aca0+r37R4lZp8vyhiyp7mTPEBdJyUUb0PZuhunYlQthuZjoEjtMzg== X-Received: by 10.202.49.201 with SMTP id x192mr2910735oix.66.1470855064367; Wed, 10 Aug 2016 11:51:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.235.109 with HTTP; Wed, 10 Aug 2016 11:51:03 -0700 (PDT) In-Reply-To: References: From: Alex Teaca Date: Wed, 10 Aug 2016 21:51:03 +0300 Message-ID: Subject: Re: [GSOC 2016] HD Audio Emulation For Bhyve Status To: soc-status@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 18:51:05 -0000 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 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 > 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 >> 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: (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 >>> 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 >>>> >>>> >>> >> >