Linux support for Asus Xonar U1 USB audio device


I got as a Christ­mas gift an exter­nal USB audio device: an Asus Xonar U1. It’s a nice device with a decent audio qual­ity. The audio itself, both in and out works per­fectly with the stan­dard snd-usb-audio ker­nel mod­ule. Unfor­tu­nately the audio con­trols on the device are not stan­dard, so I devel­oped a sim­ple dae­mon and accom­pa­ny­ing udev and pm-utils script to get the device to work. I’ve pub­lished every­thing under the GPL hop­ing that they might be use­ful for some­one else. Feel free to clone and fork my repos­i­tory on github

https://github.com/alexp-sssup/asus-xonar-u1-utils

Flattr this

  • http://www.facebook.com/Flameeyes Diego Elio Pettenò

    Hi Luca — just a cou­ple of com­ments (start­ing with the fact that I don’t own the device so I was just curi­ous to see how com­plex it was). Any par­tic­u­lar rea­son to write it as C++ and not using any C++ library at all? Using C99 would give you basi­cally the same syn­tax but with­out the risk of bring­ing in the C++ complexity.

    Also a quick note: in send­Key­Press you can prob­a­bly use three sta­tic con­stants instead of declaring/setting them three times, to sim­plify the code a lit­tle bit.

  • http://www.facebook.com/Flameeyes Diego Elio Pettenò

    Hi Luca — just a cou­ple of com­ments (start­ing with the fact that I don’t own the device so I was just curi­ous to see how com­plex it was). Any par­tic­u­lar rea­son to write it as C++ and not using any C++ library at all? Using C99 would give you basi­cally the same syn­tax but with­out the risk of bring­ing in the C++ complexity.

    Also a quick note: in send­Key­Press you can prob­a­bly use three sta­tic con­stants instead of declaring/setting them three times, to sim­plify the code a lit­tle bit.

  • apig­notti

    Hi Diego. I was kind of expect­ing that some­one would have noticed that it was mostly C but not com­pletely. Over­all I don’t think there is any real ‘risk’ in using C++ by default nowa­days. Still, in this spe­cific case it was just a mat­ter of chang­ing a vari­able from bool to int, so I did it and pushed the changes upstream.

    About the com­plex­ity of the pro­to­col itself: as you’ve seen is noth­ing crazy, the hard part was to under­stand what was rel­e­vant and what was not from the dumped traf­fic. The win­dows dri­ver seems to be extremely chatty and redun­dant, while actu­ally just a cou­ple of packet seems to have an observ­able effect. I sus­pect there are other com­mands to setup the audio fil­ter­ing, but I’m ok with the default so I didn’t inves­ti­gate those.

    As a side note, I am the author, not Luca. Unfor­tu­nately the planet aggre­ga­tor (or maybe planet gnome) does not prop­erly sup­port multi-author blogs.

  • apig­notti

    Hi Diego. I was kind of expect­ing that some­one would have noticed that it was mostly C but not com­pletely. Over­all I don’t think there is any real ‘risk’ in using C++ by default nowa­days. Still, in this spe­cific case it was just a mat­ter of chang­ing a vari­able from bool to int, so I did it and pushed the changes upstream.

    About the com­plex­ity of the pro­to­col itself: as you’ve seen is noth­ing crazy, the hard part was to under­stand what was rel­e­vant and what was not from the dumped traf­fic. The win­dows dri­ver seems to be extremely chatty and redun­dant, while actu­ally just a cou­ple of packet seems to have an observ­able effect. I sus­pect there are other com­mands to setup the audio fil­ter­ing, but I’m ok with the default so I didn’t inves­ti­gate those.

    As a side note, I am the author, not Luca. Unfor­tu­nately the planet aggre­ga­tor (or maybe planet gnome) does not prop­erly sup­port multi-author blogs.

  • Volodya

    Thanks a lot. Works perfectly.

  • Volodya

    Thanks a lot. Works perfectly.

Linux support for Asus Xonar U1 USB audio device


I got as a Christ­mas gift an exter­nal USB audio device: an Asus Xonar U1. It’s a nice device with a decent audio qual­ity. The audio itself, both in and out works per­fectly with the stan­dard snd-usb-audio ker­nel mod­ule. Unfor­tu­nately the audio con­trols on the device are not stan­dard, so I devel­oped a sim­ple dae­mon and accom­pa­ny­ing udev and pm-utils script to get the device to work. I’ve pub­lished every­thing under the GPL hop­ing that they might be use­ful for some­one else. Feel free to clone and fork my repos­i­tory on github

https://github.com/alexp-sssup/asus-xonar-u1-utils

Flattr this