LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-01-2021, 12:43 PM   #1
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 270

Rep: Reputation: 26
Question Slackware(64) 14.2 - /etc/asound.conf


Hi there, happy new year

The original content of /etc/asounf.conf :
Code:
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
Well i want to configure my file /etc/asound.conf for my pc, i don't use pulseaudio, i just purge it, because i really don't like it.

i need :
1) Playback from Multiples Streams to my four speakers.
2) Control Volume for Each Application using the device
3) Capture for multiple devices (Mix, Mic, Line)

Reading -> https://www.alsa-project.org/wiki/As...rc_file_format


Code:
cat /proc/asound/cards
 0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                      Ensoniq AudioPCI ENS1371 at 0xdc00, irq 19
Code:
lsmod | grep snd
snd_hrtimer             2008  1
snd_seq_dummy           1762  0
snd_seq_midi            5645  0
snd_seq_oss            29180  0
snd_seq_midi_event      6720  2 snd_seq_oss,snd_seq_midi
snd_seq                53182  7 snd_seq_midi_event,snd_seq_oss,snd_seq_dummy,snd_seq_midi
snd_pcm_oss            38134  0
snd_mixer_oss          14566  1 snd_pcm_oss
snd_ens1371            21415  4
snd_rawmidi            21507  2 snd_ens1371,snd_seq_midi
snd_seq_device          4417  4 snd_seq,snd_rawmidi,snd_seq_oss,snd_seq_midi
snd_ac97_codec        121465  1 snd_ens1371
snd_pcm                92738  4 snd_pcm_oss,snd_ac97_codec,snd_ens1371
snd_timer              21853  4 snd_hrtimer,snd_pcm,snd_seq
snd                    68877  17 snd_pcm_oss,snd_ac97_codec,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_seq_oss,snd_ens1371,snd_seq_device,snd_mixer_oss
soundcore               6876  1 snd
ac97_bus                1964  1 snd_ac97_codec
gameport                9818  1 snd_ens1371
i had put the follow on my new /etc/asound.conf :
Code:
pcm.!default {
    type plug
    slave.pcm {
        type softvol
        slave.pcm "plug:dmix"
    }
}

# Diviendo el sonido hacia las 4 Cornetas ( Surround 4.1 ) :
pcm.dshare {
    type dmix
    ipc_key 2048
    slave {
        pcm "hw:0"
        rate 44100
        period_time 0
        period_size 1024
        buffer_size 8192
        channels 4
    }
    bindings {
        0 0
        1 1
        2 2
        3 3
    }
}
pcm.frontx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.0 1
    ttable.1.1 1
}
pcm.rearx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.2 1
    ttable.1.3 1
}

pcm.mixin {
        type dsnoop
        ipc_key 5978293 # must be unique for all dmix plugins!!!!
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
                channels 2
                period_size 1024
                buffer_size 4096
                rate 44100
                periods 0 
                period_time 0
        }
        bindings {
                0 0
                0 1
        }
}
Well right now i don't had audio playback xD LOL

I want to configure too the equal for alsa but well i am confused xD which i should do now with this:

Code:
ctl.equal {
	type equal;
}

pcm.plugequal {
    type equal;
	slave.pcm "plughw:0,0";
}

pcm.equal{
    type plug;
    slave.pcm plugequal;
}

Last edited by inukaze; 01-01-2021 at 12:44 PM.
 
Old 01-01-2021, 01:05 PM   #2
the3dfxdude
Member
 
Registered: May 2007
Posts: 730

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
If you have no sound, let me point you to this on the page you shared:

Quote:
Neither the user-side .asoundrc nor the asound.conf configuration files are required for ALSA to work properly. Most applications will work without them. These files are used to allow extra functionality, such as routing and sample-rate conversion, through the alsa-lib layer. The actual reason that most applications will work without these user-side custom config files is that usually a default install of alsa-lib provides a sufficiently capable setup
You only have one device, which should mean it should be the default output. I have no .asoundrc/asound.conf, and everything works fine in ALSA with ALSA defaults, which includes mixing output from applications. I would start with an empty config file, and figure out why you have no output and go from there.
 
1 members found this post helpful.
Old 01-01-2021, 02:37 PM   #3
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 270

Original Poster
Rep: Reputation: 26
After i add the equal to the configuration file and restart, the sound works again with the most common applications except with wine xD.

Well i am deleting /etc/asound.conf and making "$HOME/.asoundrc" for the configuration

Code:
pcm.!default {
    type plug
    slave.pcm {
        type softvol
        slave.pcm "dshare"
    }
}

# Diviendo el sonido hacia las 4 Cornetas ( Surround 4.1 ) :
pcm.dshare {
    type dmix
    ipc_key 2048
    slave {
        pcm "hw:0"
        rate 44100
        period_time 0
        period_size 1024
        buffer_size 8192
        channels 4
    }
    bindings {
        0 0
        1 1
        2 2
        3 3
    }
}
pcm.frontx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.0 1
    ttable.1.1 1
}
pcm.rearx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.2 1
    ttable.1.3 1
}
control {
          # Definir el nombre del controlador de Volumen (Actualmente es PCM)
            name PCM
          # Establecer la tarjeta de sonido predeterminada (La 0)
            card 0
          #Arreglo para el sonido de bajo volumen
            min_dB -5.0
            max_dB 20.0
            resolution 6
}

pcm.mixin {
        type dsnoop
        ipc_key 5978293 # must be unique for all dmix plugins!!!!
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
                channels 2
                period_size 1024
                buffer_size 4096
                rate 44100
                periods 0 
                period_time 0
        }
        bindings {
                0 0
                0 1
        }
}

ctl.equal {
	type equal;
}

pcm.plugequal {
    type equal;
	slave.pcm "plughw:0,0";
}

pcm.equal{
    type plug;
    slave.pcm plugequal;
}
Dunno If i want volume control per application like in this screenshot of pavucontrol :

https://i.postimg.cc/ncGD7pD6/Pavucontrol.png

But using ALSA, why on internet everyone understand "How i can enable softvol plugin" instead "GUI for Volume Control per Application with ALSA"?

Last edited by inukaze; 01-01-2021 at 05:11 PM. Reason: Change the code of the screenshot because ever, i dont know why the image target is the 0.2% resolution of the original image
 
  


Reply

Tags
alsaconf, slackware 14.2/x86_64



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/asound.conf NEED CHANGES USUARIONUEVO Slackware 4 02-09-2016 05:22 PM
Codec errors when creating ALSA /etc/modprobe.d/asound.conf for HDMI masuch Linux - Newbie 0 06-01-2012 02:19 PM
/etc/bluetooth/asound.conf in 12.2 Woodsman Slackware 2 08-23-2009 02:59 PM
/etc/hosts, /etc/resolve.conf and /etc/host.conf config probs below_average Linux - Networking 1 12-08-2004 10:07 PM
Need help for ALSA Sound /etc/asound.conf or .asoundrc tho_x_tran Linux - Hardware 0 08-09-2004 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration