Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot find sound card in /dev/

Need help with peripherals or devices?
Message
Author
User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Cannot find sound card in /dev/

#1 Post by Eminent »

Hi,
I use Debian 8.7 jessie and I've installed it on vmware workstation. I connected a sound card to Debian virtual machine but it can't be visible in /dev, If it's not there, so where is it?

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#2 Post by Eminent »

Has someone any idea?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Cannot find sound card in /dev/

#3 Post by Head_on_a_Stick »

Eminent wrote:I connected a sound card to Debian virtual machine
How?
deadbang

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#4 Post by Eminent »

Head_on_a_Stick wrote:
Eminent wrote:I connected a sound card to Debian virtual machine
How?
Using VMware Workstation

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#5 Post by L_V »

Assuming pulseaudio is installed, does this report something ?

Code: Select all

pacmd list-cards
(needs pulseaudio-utils package )
+

Code: Select all

fuser -v /dev/snd/*

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#6 Post by Eminent »

L_V wrote:Assuming pulseaudio is installed, does this report something ?

Code: Select all

pacmd list-cards
(needs pulseaudio-utils package )
+

Code: Select all

fuser -v /dev/snd/*
Hi, Here you go:
# pacmd list-cards

Code: Select all

No PulseAudio daemon running, or not running as session daemon.
# fuser -v /dev/snd/*

Code: Select all

USER        PID ACCESS COMMAND
/dev/snd/controlC0:  eminent    1461 F.... pulseaudio
Assuming PulseAudio is installed
Yes, It has been installed.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#7 Post by L_V »

And this one:

Code: Select all

lspci | grep -i audio
+

Code: Select all

cat /proc/asound/cards

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#8 Post by Eminent »

L_V wrote:And this one:

Code: Select all

lspci | grep -i audio
+

Code: Select all

cat /proc/asound/cards
# lspci | grep -i audio

Code: Select all

02:02.0 Multimedia audio controller: Ensoniq ES1371 / Creative Labs CT2518 [AudioPCI-97] (rev 02)
# cat /proc/asound/cards

Code: Select all

 0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                      Ensoniq AudioPCI ENS1371 at 0x2080, irq 16

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#9 Post by L_V »

and

Code: Select all

lsmod | grep snd

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#10 Post by Eminent »

L_V wrote:and

Code: Select all

lsmod | grep snd
# lsmod | grep snd

Code: Select all

snd_ens1371            23119  2 
snd_rawmidi            27023  1 snd_ens1371
snd_seq_device         13132  1 snd_rawmidi
snd_ac97_codec        118704  1 snd_ens1371
snd_pcm                88603  2 snd_ac97_codec,snd_ens1371
snd_timer              26868  1 snd_pcm
snd                    69472  10 snd_ac97_codec,snd_timer,snd_pcm,snd_rawmidi,snd_ens1371,snd_seq_device
soundcore              13031  1 snd
ac97_bus               12510  1 snd_ac97_codec
gameport               13449  1 snd_ens1371

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#11 Post by L_V »

What is the real problem ? Sound is working or not ?

Code: Select all

ls /dev/snd/*

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#12 Post by Eminent »

L_V wrote:What is the real problem ? Sound is working or not ?

Code: Select all

ls /dev/snd/*
Yes, It works, I want to play a sound with cat sound.mp3 >/dev/snd command but I don't know how to do that.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#13 Post by L_V »

Eminent wrote:Yes, It works, I want to play a sound with cat sound.mp3 >/dev/snd command but I don't know how to do that.
You should have clarified your need in your first post....
How do you want 'cat' command to decode mp3 ???
Install mpg123 and try

Code: Select all

mpg123 sound.mp3
Or if vlc installed:

Code: Select all

cvlc sound.mp3

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#14 Post by Eminent »

L_V wrote:
Eminent wrote:Yes, It works, I want to play a sound with cat sound.mp3 >/dev/snd command but I don't know how to do that.
You should have clarified your need in your first post....
How do you want 'cat' command to decode mp3 ???
Install mpg123 and try

Code: Select all

mpg123 sound.mp3
Or if vlc installed:

Code: Select all

cvlc sound.mp3
I'm sorry, Do you mean it's not possible to play sound with cat command?

User avatar
Eminent
Posts: 64
Joined: 2019-03-28 19:53
Location: /dev/desk

Re: Cannot find sound card in /dev/

#15 Post by Eminent »

How can I install mpg123?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#16 Post by L_V »

Eminent wrote:[Do you mean it's not possible to play sound with cat command ?
Try this to check if cat is an audioplayer

Code: Select all

man cat
Eminent wrote:How can I install mpg123?

Code: Select all

sudo apt install mpg123
If vlc is installed, just use cvlc.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Cannot find sound card in /dev/

#17 Post by GarryRicketson »

I'm sorry, Do you mean it's not possible to play sound with cat command?
No it is not possible, the 'cat' command will not play sounds.
The OP might be interested in this little gem, https://packages.debian.org/stretch/sox
It has a 'play' command, and can do more then just play a sound, it can create sounds as well. example , this

Code: Select all

play -n synth .5 sine A4
 

plays a "A' note, 1/2 second, all I do is type a, (in the directory where I did this) How ever that might be a different topic, and there is a learning curve, the manual must be read carefully.
=========== edited ===
From the "sox' manual:
play "The Moonbeams/Greatest/*.ogg" bass +3
plays a collection of audio files whilst applying a bass boosting
effect,
play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1
plays a synthesised `A minor seventh' chord with a pipe-organ sound,
Last edited by GarryRicketson on 2019-04-27 13:09, edited 1 time in total.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Cannot find sound card in /dev/

#18 Post by L_V »

I understood the question of Eminent was finally how to play sound.mp3 in command line, then more "music" than just sound.

For sound, beep can help:

Code: Select all

beep  -f 329.6 -l 250 -n -f 329.6 -l 250 -n -f 349.2 -l 250 -n -f 370.0 -l 500 -n -f 440.0 -l 250 -n -f 370.0 -l 250 -n -f 440.0 -l 250 -n -f 370.0 -l 250 -n -f 370.0 -l 250 -n -f 349.2 -l 250 -n -f 329.6 -l 250 -n -f 493.9 -l 250 -n -f 329.6 -l 250 -n -f 329.6 -l 500 -n -f 493.9 -l 250 -n -f 329.6 -l 250 -n -f 349.2 -l 250 -n -f 370.0 -l 500 -n -f 440.0 -l 250 -n -f 370.0 -l 250 -n -f 440.0 -l 250 -n -f 370.0 -l 250 -n -f 370.0 -l 250 -n -f 349.2 -l 250 -n -f 329.6 -l 250 -n -f 493.9 -l 250 -n -f 329.6 -l 250 -n -f 329.6 -l 500 -n -f 493.9 -l 250 -n -f 329.6 -l 250 -n -f 349.2 -l 250 -n -f 370.0 -l 750
ps: 'play' command requires sox and it dependencies to be installed;

Code: Select all

libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base{a} libsox3 sox 
Last edited by L_V on 2019-04-28 05:37, edited 1 time in total.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Cannot find sound card in /dev/

#19 Post by GarryRicketson »

Your right, and hope it does not confuse the OP, interesting you used the "beep" example,
that is how I stumbled on to the "sox" program, Debian does have the "beep"command,which is use full to see if there is any sound at all, any way, OpenBsd does not have the beep command, but I used sox to create a beep command.
Hope I have not confused the OP now,...SOX does also require having a working sound card, so that would be the priority.
It just popped into my head, since the OP asked about using the 'cat' command to play the music, and all though the cat command does not work that way, they could use sox,and have a "play" command.
Example :

Code: Select all

garry$ play *.mp3  bass +3  
Plays all of my .mp3 files:
(it was hard to capture the output, but

Code: Select all

02 - cheek to cheek.mp3:

 File Size: 8.53M     Bit Rate: 192k
  Encoding: MPEG audio    Info: 2001
  Channels: 2 @ 16-bit   Track: 2
Samplerate: 44100Hz      Album: Very Best of Louis Armstrong 1
Replaygain: off         Artist: Louis Armstrong
  Duration: 00:05:55.44  Title: Cheek to Cheek

In:18.5% 00:01:05.85 [00:04:49.59] Out:2.90M [-=====|====- ] Hd:4.6 Clip:0    
Skipped (Ctrl-C twice to quit).

02 - something for sellers - henry mancini - a jazz latin beat - andy duran latin jazz big band(2).mp---snip-- 
or specific file:

Code: Select all

/home/garry/music/johncoltrane - blue train.mp3:

 File Size: 10.3M     Bit Rate: 128k
  Encoding: MPEG audio    
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      
Replaygain: off         
  Duration: 00:10:43.25  
In:10.5% 00:01:07.24 [00:09:36.00] Out:2.97M [-=====|====- ] Hd:2.1 Clip:0    
Aborted.

 

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Cannot find sound card in /dev/

#20 Post by Head_on_a_Stick »

L_V wrote:
Eminent wrote:Do you mean it's not possible to play sound with cat command ?
Try this to check if cat is an audioplayer
It used to be possible to pipe sounds directly to /dev/snd and play them using the cat command but not any more:

https://unix.stackexchange.com/question ... in-dev-snd

EDIT: I don't think that would have ever worked with an MP3 file though.
deadbang

Post Reply