snd-usb-audio ? (for midi keyboard)

Discussion in 'Acer Aspire One' started by Duncan_Rowland, Aug 26, 2008.

  1. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hi,
    I'm running Linpus as it came, and have installed rosegarden to do some audio sequencing work.
    I'm trying to get my midi keyboard to connect via a midi-usb cable I have.
    Unfortunately it looks like I need snd-usb-audio.ko and this is not compiled into the kernel.
    Does anyone know if my only option is to recompile the kernel, or could someone provide this file?
    Thanks,
    -Duncan.
     
    Duncan_Rowland, Aug 26, 2008
    #1
  2. Duncan_Rowland

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    You need to compile the kernel modules (there are 3 required to satisfy dependencies here), it isn't difficult but to save time I've attached the 3 required modules to this post. Put them in the following locations (you'll need to create the usb and core subdirectories first)

    /lib/modules/2.6.23.9lw/kernel/sound/usb/snd-usb-audio.ko
    /lib/modules/2.6.23.9lw/kernel/sound/usb/snd-lib-audio.ko
    /lib/modules/2.6.23.9lw/kernel/sound/core/snd-rawmidi.ko

    Then run
    Code:
    sudo depmod
    sudo modprobe snd-usb-audio
     
    sideways, Aug 27, 2008
    #2
  3. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    That's really good of you, thanks very much. They install fine.
    However, I'm still having trouble, though I'm a bit further on...
    I'm connecting a Yamaha E303 to the Aspire One with a UM-1ex usb-to-midi connector.
    I can now see raw midi (i.e. send and receive notes with amidi),
    but I can't get rosegarden to see it (I think alsa is not claiming it for some reason
    as aplaymidi -l does not return any devices).
    Any ideas most welcome :)
    Best -Duncan.
     
    Duncan_Rowland, Aug 27, 2008
    #3
  4. Duncan_Rowland

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    I think there must be another module required or init script.

    If I boot from a fedora 8 LIveCD transferred to USB then it all works fine (Tested with qjackctl, rosegarden and vkeybd).

    The F8 LIveCD does have an install option, so perhaps a dual-boot scenario might be worthwhile. Linpus Lite is quite a lot of work I'm finding.

    I'll try to look into this later in the week and see if there is a simple solution, but I may be too busy.

    If any others have an idea please do post.
     
    sideways, Aug 27, 2008
    #4
  5. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Thanks for the help, I'll keep working on it but if you do have any brain-cycles going spare I appreciate any help!
    For reference, what I needed to do to get amidi working...
    Make the new devices read/write by user...
    sudo chown user:wheel /dev/snd/controlC1 /dev/snd/midiC1D0
    sudo chmod 660 /dev/snd/controlC1 /dev/snd/midiC1D0
    amidi -d now says it can't open /dev/snd/midiC0D0, which is because it's C1..., so I made a link...
    sudo ln -s /dev/snd/midiC1D0 /dev/snd/midiC0D0
    amidi -d now dumps the keys I press on the Yamaha as expected, but this is as far as I've got.

    I did find a post on the web that said to add some stuff to /etc/modules.conf, but this does not exists...
    I guessed in Linpus it would be /etc/modprobe.d/modprobe.conf.dist instead?
    I tried adding the following to the end (most of which probably don't apply), but it didn't make any difference:

    alias char-major-116 snd
    alias snd-card-0 snd-ens1371
    alias snd-card-1 snd-usb-audio
    alias snd-card-2 snd-usb-audio
    options snd cards_limit=3
    options snd-ens1371 index=0
    options snd-usb-audio index=1,2 vid=0x0763,0x0582 pid=0x1110,0x0005

    Best -Duncan.
     
    Duncan_Rowland, Aug 28, 2008
    #5
  6. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hi All,
    I'm still struggling to make this work...
    I've been doing lots of reading and have come across a module I think I may need?
    snd-seq-midi.ko
    If someone already has this compiled, I'd really appreciate it if the could let me have it.
    Thanks,
    -Duncan.


     
    Duncan_Rowland, Aug 31, 2008
    #6
  7. Duncan_Rowland

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    There you go[attachment=0:127fvspx]snd-seq-midi.zip[/attachment:127fvspx]
    (use 'unzip -j snd-seq-midi.zip' to unzip otherwise the directorys media/PNY_1GB will be created)

    I include snd-seq-midi-event.ko as well, just in case.

    Both modules need to go in /lib/modules/2.6.23.9lw/kernel/sound/core/seq (create the seq/ directory if it doesn't exist), and don't forget to run 'sudo depmod' afterwards. The load the module with 'sudo modprobe snd-seq-midi'

    Good luck, I'd like to see midi working in the Aspire One too. I have managed to get vkeybd and qsynth to communicate using qjackctl, but my midi keyboard isn't recognised when plugged in.
     
    sideways, Aug 31, 2008
    #7
  8. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Many thanks for the file, but I give up... life's too short :)
    For your interest, I've attached mmusbaudio (which is supposed to work with my UM-1ex, maybe yours?)
    ...but I couldn't get it to.
    So, good luck, and let me know if you get your keyboard working.
    Best -Duncan.
     
    Duncan_Rowland, Sep 2, 2008
    #8
  9. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hi Sideways,
    thanks for all the help with this, I'm pleased to say I now have my UM-1ex usb audio devices working :)
    I'd like to say I worked this out, but basically I just kept bashing till it worked :/
    I recompiled alsa more or less according to these instructions...
    http://www.alsa-project.org/main/index. ... -usb-audio
    I pretty much followed the instructions, except to get both internal sound and usb working, I needed
    ./configure --with-cards=usb-audio,hda-intel --with-sequencer=yes
    when I was configuring the alsa-driver build
    (needed: sudo yum install build-essential ; sudo yum install make gcc ; sudo yum install gettext ; and also the ncurses development lib I installed with the package manager)
    I edited /etc/modprobe.d/modprobe.dist.conf so the end looks like...

    alias char-major-116-* snd
    options snd-hda-intel model=toshiba
    alias sound-service-*-0 snd-mixer-oss
    alias sound-service-*-1 snd-seq-oss
    alias sound-service-*-3 snd-pcm-oss
    alias sound-service-*-8 snd-seq-oss
    alias sound-service-*-12 snd-pcm-oss

    install sound-slot-* /sbin/modprobe snd-card-${MODPROBE_MODULE##sound[_-]slot[_-]}

    install snd-pcm /sbin/modprobe --ignore-install snd-pcm && /sbin/modprobe snd-pcm-oss && /sbin/modprobe snd-seq-device && /sbin/modprobe snd-seq-oss

    alias nfs4 nfs
    alias rpc_pipefs sunrpc
    alias rpc_svc_gss_pipefs sunrpc

    install eth1394 /bin/true

    install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && /sbin/modprobe snd-emu10k1-synth

    # ALSA portion
    alias char-major-116 snd
    alias snd-card-1 snd-usb-audio
    # module options should go here

    # OSS/Free portion
    alias char-major-14 soundcore
    alias sound-slot-1 snd-card-1

    # card #1
    alias sound-service-1-0 snd-mixer-oss
    alias sound-service-1-1 snd-seq-oss
    alias sound-service-1-3 snd-pcm-oss
    alias sound-service-1-8 snd-seq-oss
    alias sound-service-1-12 snd-pcm-oss

    and I also had some stuff in /etc/rc.d/rc.local which may or maynot be needed (I'm running a multi-user system)

    touch /var/lock/subsys/local
    setpci -d 197b:2381 AE=47

    sudo chgrp wheel /dev/video*
    sudo chgrp wheel /dev/sequencer
    sudo chgrp wheel /dev/sequencer2
    sudo chgrp wheel /dev/dsp
    sudo chgrp wheel /dev/mixer
    sudo chgrp wheel /dev/audio
    sudo chgrp wheel /dev/snd
    sudo chgrp wheel /dev/snd/*
    sudo chmod 660 /dev/video*
    sudo chmod 660 /dev/sequencer
    sudo chmod 660 /dev/sequencer2
    sudo chmod 660 /dev/dsp
    sudo chmod 660 /dev/mixer
    sudo chmod 660 /dev/audio
    sudo chmod 770 /dev/snd
    sudo chmod 660 /dev/snd/*

    I *think* that was all... I'm not 100% sure the internal mic works now... (I got the toshiba flag from here which suggests it might not)
    https://help.ubuntu.com/community/AspireOne

    And if I boot with the usb cable in, then internal audio is disabled. It's fine if I boot first and then plugin the usb UM-1ex. And the application I was trying to get working is a windows app, and its running fine in wine connecting to my keyboard :)

    Hope that helps someone - I'm no expert, and like I say - I used the infinite monkeys approach (only the monkey was me - spending all that time!). I'd recommend not trying this if you need to use your aspire until someone who knows what they're doing checks it out ;) Mine seems to work fine at the mo' - but I expect it to go up in a puff any moment :)

    Best, -Duncan.
     
    Duncan_Rowland, Sep 2, 2008
    #9
  10. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    Hi Duncan,
    that sounds very interesting. I've been trying to get a logitech USB headset to work without success. I'd be interested if you could confirm whether USB headsets work on your machine. I got to the point of being able to see 2 sound cards (in /proc/asound) but I couldn't get "aplay" or any other application to see the USB card.

    I'm wondering whether I need to load the UM-1ex module (I only want to use a USB headset) or whether I just need to recompile ALSA with the options you have suggested.

    Thanks
    Chris
     
    Marathon, Sep 3, 2008
    #10
  11. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hi Chris,
    I've tested with an old set of usb headphones I have of some description (they say "speed link" on the side, I think they might be surround sound):
    - If I boot up and plug them in nothing, but.
    - If I plug them in first and then boot , then with my setup internal audio is disabled and sound it output to the headphones.
    The volume switch on the phones doesn't work, but they sound fine (I don't know if "surround sound" is working or the mic... as an aside I also have an eeepc and I got these headphones working with that too, except I think I remember the usb ports did not have enough power to run the headphones and the mic! - maybe the same here?).
    Sorry, out of my massive recipe I've no idea which are the essential steps (but I don't think the module is specific to the UM1, I think it's a generic usb sound module "./configure --with-cards=usb-audio,hda-intel --with-sequencer=yes" before you compile the alsa-driver).
    Hope that help, -Duncan.

     
    Duncan_Rowland, Sep 3, 2008
    #11
  12. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    Thanks Duncan,
    I'll try booting with the headset connected and if it doesn't work I'll give the recompile a go.

    Chris
     
    Marathon, Sep 3, 2008
    #12
  13. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    Hi Duncan,
    I'm having problems installing ALSA from source. I notice that you installed "build-essential" - this doesn't seem to be available. Are you running Debian?

    Thanks
    Chris
     
    Marathon, Sep 4, 2008
    #13
  14. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    Hi. I'm using Linpus straight out the box (with some tweaks).
    I think then build-essentials must only be available via livna.
    If you install this (at your own risk;), I think it should become available.
    i.e.
    bunzip2 livna-release-8.rpm.bz2
    sudo rpm --install livna-release-8.rpm
    sudo yum install build-essential
    Best, -Duncan.
     
    Duncan_Rowland, Sep 4, 2008
    #14
  15. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    OK thanks will try tonight.

    Chris
     
    Marathon, Sep 4, 2008
    #15
  16. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    Just realized that I already have the livna_release_8 loaded - that's where I got yum.

    Chris
     
    Marathon, Sep 4, 2008
    #16
  17. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    What have you got in "ls /etc/yum.repos.d" |? - I've got...

    fedora-development.repo
    fedora-updates-testing.repo
    livna-testing.repo
    fedora.repo
    livna-devel.repo
    fedora-updates.repo
    livna.repo

    If it's not the livna install then the only other thing can think of it that it got added when I was messing about with "System>Add/Remove Software". At one point I remember trying to install the development tools using that. It failed, could that have added the missing repo?

    p.s. make sure it's build-essential (singular :)
     
    Duncan_Rowland, Sep 4, 2008
    #17
  18. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    hmm.. I just tried it myself and build-essential is now missing :(
    I think there must something wrong with the repositories at the moment?

     
    Duncan_Rowland, Sep 4, 2008
    #18
  19. Duncan_Rowland

    Duncan_Rowland

    Joined:
    Aug 25, 2008
    Messages:
    246
    Likes Received:
    0
    p.s. I'm not sure if you need to, but I've also installed the kernel-headers according to this:
    http://the.taoofmac.com/media/Acer/Aspi ... notes.html
    "
    Assuming you got the kernel source from here,
    ftp://[email protected]/Aspire_O ... 23.9lw.zip
    you can rebuild the modules on the Aspire One itself by unpacking it in /usr/src:

    yum install make gcc
    # the above will also install a kernel-headers package, which is mostly harmless but that you might want to remove later.
    cd /usr/src
    unzip /home/user/Downloads/linux-2.6.23.9lw.zip
    cd linux-2.6.23.9/
    cp /boot/config_080627 .config
    cd include
    rm -rf asm
    cd ..
    make oldconfig
    make modules
    "

    Thinking about it, perhaps when I tried to install build-essential it didn't work and I just didn't notice!
    It could be that installing make and gcc is all you need... If that's right, can you let me know and I'll edit my initial instructions.
    Thanks,
    -Duncan.
     
    Duncan_Rowland, Sep 4, 2008
    #19
  20. Duncan_Rowland

    Marathon

    Joined:
    Aug 29, 2008
    Messages:
    21
    Likes Received:
    0
    Hi Duncan,
    I installed ALSA from the sources and I've managed to get a bit further. I still can't get aplay or alsamixer to recognize my USB headset. However, I've found that I can now get audio from the headset if I cat from the internal mic device to the USB audio device i.e.

    cat /dev/dsp >/dev/dsp1

    I found that I had to change the ownership of /dev/dsp1 to user otherwise I didn't have permission. The volume control also has another slider now to control the USB headset volume.

    I imagine I'll figure it out eventually but it's just trial and error. Thanks for your help - I'll let you know if/when I get it sorted out. There must be others out there who want to use a USB headset for Skype etc.

    Chris
     
    Marathon, Sep 6, 2008
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.