Find the answer to your Linux question:
Results 1 to 8 of 8
My recollection is that under release 12, I as able to enter: cat asoundfil.wav > /dev/audio and/or /dev/dsp to play a wav file. This does not work now (13.0). Also ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Playing sounds


    My recollection is that under release 12, I as able to enter: cat asoundfil.wav > /dev/audio and/or /dev/dsp to play a wav file. This does not work now (13.0). Also my sound card is on card2. I have tried /dev/dsp2 without positive results.
    Has Slackware obviated this command so that I must now use either play (SOX) or aplay?

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    In my recollection, running `cat soundfile.wav > /dev/dsp` will just send the bits to the speaker which sounds more like: kgkkkgkkkgkkgkkgkkgkgkgkkgkgk
    Can't tell an OS by it's GUI

  3. #3
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Playing sound

    OK I don't use ALSA much seems it changes with every Slack release only to become more complicated.
    Agree probably was kggk...
    So can anyone help?
    Been running aplay -t wav -f A_LAW -r 8000 -c1 /opt/SECURE/KISMET/kismet-2010-01-R1/wav/alert.wav
    which produces:
    ALSA lib pcm_dmix.c:1008snd_pcm_dmix_open) unable to open slave
    aplay: main:590: audio open error: No such file or directory
    and that is without Firefox running or any internet connection (if the latter is even important).
    All my sound utilities and scripts are now defunct with the changes in 13.
    Oh, BTW when I used cat with this wav file and > /dev/audio2 all I get is kggk...
    Have to grep /proc/asound/cards to find out where the sound card is cuz sometimes when I boot my 8235 ends up on card0 which is just another frustration.

  4. #4
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    I must confess I have some difficulty as well playing files with aplay. I never looked into it, I'm sure it can be helped, but I use `play /path/to/audiofile` which works without issues for me on Slack 12.2, and seemingly without issues on Slack 13.1.

    Would/could that work for you?

    And yes, ALSA is complex

    Can't tell an OS by it's GUI

  5. #5
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Playing sounds

    Freston,
    Tnx for suggestion to try play it works. Had left it out of consideration since it is SOX equiv of aplay for ALSA. The later being where I want to be. Was once told that if SOX modules in lsmod list that SOX gets preference. Such seems to be the case for me as I have no ALSA modules (i.e. none with *alsa* that is). Checked my config file but its ALSA usage is for VIDEO??:
    CONFIG_VIDEO_SAA7134_ALSA=m
    CONFIG_VIDEO_CX88_ALSA=m
    CONFIG_VIDEO_EM28XX_ALSA=m
    [using default config-huge-smp-2.6.29.6-smp]
    Will switch my code over, TNX
    ALSA overly complex IMHO in its setup, usage and its flow tnx 4 diagram. Wish it would be abandoned for pulse mode.

  6. #6
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Playing sounds

    I do NOT want to believe it. After changing my apps which worked beautifully yesterday after changing to PLAY from APLAY, today they are failing with the same error I got for APLAY.
    I checked /proc/asounds/cards and they are configured like from yesterday.
    I thought computers were meant to perform the same way repeatedly if software didn't change!!
    Any ideas?

  7. #7
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,049
    Oh? Did you reboot your machine?


    What happens if you restart ALSA? Can you play sounds then?

    It, to me at this time, sounds like a problem that perhaps not the correct module gets loaded or that you have more than one sound device causing either a conflict or not the right one is primary-out.
    Code:
    /sbin/lspci |grep -i audio
    /sbin/lsmod|grep snd
    Can't tell an OS by it's GUI

  8. #8
    Linux User
    Join Date
    Mar 2008
    Posts
    287

    Playing sounds

    Freston, et. al.,
    This AM I found that the 2.wav file did play. I don't know how much importance in this is but /proc/asound/cards changes the order of V8235 and my USB Camera between 0 and 2 with Bt878 always at 1. Never found out why this changes and seem promiscuous.
    lspci|egrep -i audio :
    00:06.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
    00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

    lsmod | egrep -i snd :
    snd_seq_dummy 2464 0
    snd_seq_oss 29792 0
    snd_seq_midi_event 5980 1 snd_seq_oss
    snd_seq 47984 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
    snd_pcm_oss 37728 0
    snd_mixer_oss 14300 1 snd_pcm_oss
    snd_via82xx 22772 0
    gameport 9960 1 snd_via82xx
    snd_ac97_codec 100128 1 snd_via82xx
    ac97_bus 1372 1 snd_ac97_codec
    snd_usb_audio 80352 0
    snd_bt87x 11780 0
    snd_mpu401_uart 6524 1 snd_via82xx
    snd_usb_lib 15228 1 snd_usb_audio
    snd_hwdep 6816 1 snd_usb_audio
    snd_rawmidi 19040 2 snd_mpu401_uart,snd_usb_lib
    snd_pcm 68128 5 snd_pcm_oss,snd_via82xx,snd_ac97_codec,snd_usb_aud io,snd_bt87x
    snd_seq_device 6088 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
    snd_timer 19108 2 snd_seq,snd_pcm
    snd 50820 14 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_ via82xx,snd_ac97_codec,snd_usb_audio,snd_bt87x,snd _mpu401_uart,snd_hwdep,snd_rawmidi,snd_pcm,snd_seq _device,snd_timer
    soundcore 5824 1 snd
    snd_page_alloc 7972 3 snd_via82xx,snd_bt87x,snd_pcm

    Sorry can't remember how to put this into code parameters to allow a window.
    The business of where V8235 is located has messed with me in the past.
    FWIW my sound is on the Mobo which is KT4V-L AMD 2200+ @ 18GHz:

Posting Permissions

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