Find the answer to your Linux question:
Results 1 to 2 of 2
I am totally mistified now by ALSA. I had it working with 12.0 but now on 13.0 of Slackware I can't get to 1st base. If I try to use ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    aplay and aplaymidi vs. ALSA??


    I am totally mistified now by ALSA. I had it working with 12.0 but now on 13.0 of Slackware I can't get to 1st base.
    If I try to use /usr/bin/aplay to play a file I need to use "-t au" to play an au file as it apparently no longer can detect file type (seems this is new). I have my user name in the audio group so that is OK. Yesterday even that didn't help. I kept getting a message about dsm (I think that was it) and about a slave not working. Today now aplay works.
    (A) Is it absolutely necessary to reboot for the group file info to be known to the system??

    I am trying to play .mid files with aplaymidi. When I use:
    aplaymidi -p 0:0 lavieenrose.mid
    I get an error:
    Cannot connect to port 0:0 - Operation not permitted (even as root)
    I am not clear on the 0:0 as to what is which. I tried "-p 0" which is supposed to work.
    (B) Since I don't know what is going on with specifying the port can someone inform me?
    (C) Any help with why aplaymidi is not working??

    cat /proc/asound/cards yields:
    0 [V8235 ]: VIA8233 - VIA 8235
    VIA 8235 with ALC650F at 0xe000, irq 5
    1 [Bt878 ]: Bt87x - Brooktree Bt878
    Brooktree Bt878 at 0xdddff000, irq 10
    2 [camera ]: USB-Audio - USB camera
    USB camera at usb-0000:00:10.3-1.3, full speed

    ls -l /proc/asound/*/* yields:
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/Bt878/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/Bt878/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/V8235/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/V8235/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/V8235/via82xx
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/camera/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/camera/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/camera/stream0
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/camera/usbbus
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/camera/usbid
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card0/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card0/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card0/via82xx
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card1/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card1/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card2/id
    -rw-r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card2/oss_mixer
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card2/stream0
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card2/usbbus
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/card2/usbid
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/oss/devices
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/oss/sndstat
    -r--r--r-- 1 root root 0 2010-11-14 20:50 /proc/asound/seq/clients
    (D) Which leads me to ask: why is it an oss_mixer if it is ALSA??

    ls -l /dev/snd yields:
    crw-rw---- 1 root audio 116, 0 2010-11-14 08:39 controlC0
    crw-rw---- 1 root audio 116, 32 2010-11-14 08:39 controlC1
    crw-rw---- 1 root audio 116, 64 2010-11-14 08:39 controlC2
    crw-rw---- 1 root audio 116, 24 2010-11-14 08:39 pcmC0D0c
    crw-rw---- 1 root audio 116, 16 2010-11-14 20:36 pcmC0D0p
    crw-rw---- 1 root audio 116, 25 2010-11-14 08:39 pcmC0D1c
    crw-rw---- 1 root audio 116, 17 2010-11-14 08:39 pcmC0D1p
    crw-rw---- 1 root audio 116, 56 2010-11-14 08:39 pcmC1D0c
    crw-rw---- 1 root audio 116, 57 2010-11-14 08:39 pcmC1D1c
    crw-rw---- 1 root audio 116, 88 2010-11-14 08:39 pcmC2D0c
    crw-rw---- 1 root audio 116, 1 2010-11-14 16:39 seq
    crw-rw---- 1 root audio 116, 33 2010-11-14 08:39 timer
    Here I see I have a pulse coded modulation with cards 0, 1, and 2. Each has 2 devices 0 & 1 and for each playback and capture capability. But card 2 only has one device (0) which is capture only and NO playback.
    (E) Is this because card 2 is a camera and has no playback and only records from it microphone??
    (F) What is a sequencer and how is it used with sound?
    (G) How is the timer used with sound?

    cat /proc/asound/pcm yields:
    00-00: VIA 8235 : VIA 8235 : playback 4 : capture 1
    00-01: VIA 8235 : VIA 8235 : playback 1 : capture 1
    01-00: Bt87x Digital : Bt87x Digital : capture 1
    01-01: Bt87x Analog : Bt87x Analog : capture 1
    02-00: USB Audio : USB Audio : capture 1

    This says (I think) that card 1 & 2 are capture only.
    (H) Is card0, device0 using port 4??
    (J) How does this match up with the previous list??

    cat /proc/asound/seq/* (sequencer info) shows:
    Client info
    cur clients : 3
    peak clients : 4
    max clients : 192
    Client 0 : "System" [Kernel]
    Port 0 : "Timer" (Rwe-)
    Port 1 : "Announce" (R-e-)
    Connecting To: 15:0
    Client 14 : "Midi Through" [Kernel]
    Port 0 : "Midi Through Port-0" (RWe-)
    Client 15 : "OSS sequencer" [Kernel]
    Port 0 : "Receiver" (-we-)
    Connected From: 0:1
    snd-seq-oss,loaded,0
    OSS sequencer emulation version 0.1.8
    ALSA client number 15
    ALSA receiver port 0
    Number of applications: 0
    Number of synth devices: 0
    (K) Does this mean when using aplaymidi that I should be using -p 0:14 and that x:y is port:client??
    (L) I am not clear on port client relationship in this case, HELP??
    Last edited by clickit; 11-15-2010 at 05:19 AM.

  2. #2
    Just Joined!
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    38
    You can't play midi files on that sound card, so you need to use a softsynth such as timidity++, or get another card.

    To get a list of all output ports, you can use the command aconnect -o.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •