From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web10.199.1626119155968740097 for ; Mon, 12 Jul 2021 12:45:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WR7cZGW9; spf=pass (domain: gmail.com, ip: 209.85.218.47, mailfrom: harlydavidsen@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id ga14so21826779ejc.6 for ; Mon, 12 Jul 2021 12:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=gFWY1rZzJxKWj2GIPgZTYlCdyC2mIzG3plWAIBxiSLw=; b=WR7cZGW9gij5eoM18idBjuDS/XTk0cBoxe8tKZAyif7FLycoT3EQu9TcguL6YafD4J CHAqiDBpZg2UblBrTKkSK1z2750xqI2NUI9lY7WWu0t4W7lbz2s6FB3COyPNdo7vVqWF ZU79JRhmw7pKviD4zx3B7KOjvfGB3IyOcK2EfvABGxGhk6VOEzyTpAkY/1SDEVeCSZgi isX5mlQFj3U/qXVMAXtbqb6fKh5eaNUZXArwIvC2E2lhBUTJddJp/Ik0sxbh/lK4zI3u is2crMeYLUP3pMzS3aVkIgQuuE6JTNOaemRKbIC8i4MtijgXdWaIu7dIOj7WDOe0wl2P /gFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=gFWY1rZzJxKWj2GIPgZTYlCdyC2mIzG3plWAIBxiSLw=; b=ieSS7dQSYpudjjOjFimWMo824s09XivOJ2BahapN0HEqVuZHSxN1AqB0xvauqjs1vw j4Xxs61WFn1x2I1oC2lqvjA/9emR1g1kJ8V7gfGQTVbK/94zGSeqdV41xAQc+RaViCNB AYFyM8Y6S4IsVD4k+E6jnmMhEbkHuLulay4ZlNUaWNsKHrTjMAytdGADBASFE1jUD0ZK zLEcEgXy4UOX+IU+qYKVgXf/3dsJ6c+Sf4xi79wRpn3Lkvo3TRrTsOzNEUkC8kZnHzx4 O0CAudmvMZMrX/RLpkPdSgoiFnHFAeUJXTuVGVJQ/7OaZQ8C9Fymx9R9M+F0YwkQLSyC PNdA== X-Gm-Message-State: AOAM531fdEIJrLe+iGy3YylwkB+Pc89nJSG/DqC6WVP5vlDRulv4M4n1 FwlBE7Fa4y1WSRQnoyBOFEJJC88YZqIA4PzgTtQAsU4C X-Google-Smtp-Source: ABdhPJw7eV2P5x6ajaD2+SLT8mzavhmrAFEL1K2ivndb0uc/pzKB6ImDoli82HzbRBRPo+Mdo75zXmynpf2qU5biHxo= X-Received: by 2002:a17:906:f24b:: with SMTP id gy11mr791182ejb.71.1626119154353; Mon, 12 Jul 2021 12:45:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6400:5b92:0:0:0:0 with HTTP; Mon, 12 Jul 2021 12:45:53 -0700 (PDT) From: "Ethin Probst" Date: Mon, 12 Jul 2021 14:45:53 -0500 Message-ID: Subject: Update/current status on EFI AOP To: devel@edk2.groups.io Cc: "Leif Lindholm (Nuvia address)" , Ray Ni , Andrew Fish Content-Type: text/plain; charset="UTF-8" Hello all, Since first evaluations are upon us in GSoC 2021, I thought I'd provide an update on the EFI audio output protocol (AOP) and its current status to ensure that we're all on the same page. Currently, I've forked the EDK II project and that fork is available at https://github.com/ethindp/edk2. That fork contains the UsbAudio.efi EFI application, available under MdeModulePkg/Applications/UsbAudio. This is my "driver template" and "USB sandbox" of sorts, and has given me the tools to play around with USB. Though I struggled at first, all of you were a great help, and I also must give a shout out to the folks over at OSDev.org for their assistance as well. Though the status the application is in is not much as of yet, we're nearly there, at least on the application front. We don't have working audio output yet, but that's primarily due to me being (really) confused over the USB specs. Leif gave me a packet dump to look at and, though that contained some vendor-specific requests, it gave me a nice overview of what I need to do. Currently, the application does the primary stage of at least understanding the device: * We allocate a reusable 64K buffer to read the configuration, terminal, and unit descriptors. * Using these descriptors, we can analyze the devices internal connections and figure out what the device contains. There are a few options we can take from this point: 1. We can get the various attributes of the device and each terminal/unit descriptor, just as the packet dump does, and then set the interface (alternate setting) and start streaming audio, following the packet dump as closely as possible; or 2. We can take advantage of the USB basic audio device definition and assume that the device automatically configures itself to "comfortable" settings (though the term "comfortable" is left to interpretation). The app also takes advantage of UefiUsbLib, and I'm quite grateful that that library exists, as it abstracts away most of the complex request handling. I think that we will need to manually set up custom requests for class-specific requests, however, as the UefiUsbLib library doesn't appear to allow us to do this. I may be wrong about this though -- I will look into it again (and maybe make that possible). Currently the app prints basic information about each audio device it finds (controller, streaming or midi), like the USB ADC version, lengths of descriptors, the number of interfaces in the bInCollection field, and such. I mainly included this for debugging (for the longest time it wasn't working and I needed to dig in the QEMU source for inspiration). However, it does work now, so we can proceed to the good stuff. Like I said, the progress may be minimal, but we've definitely made some and I don't think it will be long until we have at least primitive audio output. I've submitted my mentor evaluations already. I've appreciated working with TianoCore thus far and I definitely will be doing so long after GSoC is over. :) -- Signed, Ethin D. Probst