0

The last two days I am busy to config the USB sound on a dietpi config and with success. I turned the default Rpi sound off and use only the USB soundcard amplifier (Logitech). I can play files with aPlay and mpd (mpd via Android phone by using MpDroid).

I want to be able to use the alsamixer equalizer however can't get it to work. Followed several examples on the net however none of them working. Something wrong with channels or something, I cannot figure out what is wrong.

Connected devices:

root@DietPi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Speaker [Logitech Speaker], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

root@DietPi:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
equal
plugequal
dmixed
default
sysdefault:CARD=Speaker
    Logitech Speaker, USB Audio
    Default Audio Device
front:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    Front speakers
surround21:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    Direct sample mixing device
dsnoop:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    Direct sample snooping device
hw:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    Direct hardware device without any conversions
plughw:CARD=Speaker,DEV=0
    Logitech Speaker, USB Audio
    Hardware device with all software conversions
root@DietPi:~#

/etc/asound.conf

ctl.eq {
    type equal
    controls "/root/.alsaequal.bin"
}

pcm.plugequal {
    type equal
    slave.pcm "plughw:1,0"
    controls "/root/.alsaequal.bin"
}

#pcm.!default {
#   type plug
#   slave.pcm plugequal
#   slave.channels 2
#}

ctl.!default {
    type hw
    card 1
}

pcm.dmixed {
        type asym
        playback.pcm {
                type dmix
                ipc_key 5678293
                ipc_perm 0660
                ipc_gid audio

                slave {
                        channels 2 # make 6 or 5.1 channel
                        pcm {
                                format S16_LE # S32_LE
                                rate 44100 # can also be 44100
                                type hw
                                card 1 # your card
                                device 0 # your device
                                subdevice 0 #important?
                        }

                        period_size 1024
                        buffer_size 8192
                }

                bindings {
                        0 0
                        1 1
# Uncomment below if using 6 channel
#                       2 2
#                       3 3
#                       4 4
#                       5 5
                }
        }
        capture.pcm "hw:1,0"
}

pcm.!default {
        type plug
        slave.pcm "dmixed"
}

/etc/mpd.conf (see audio_output section)

music_directory "/mnt/dietpi_userdata/Music"
playlist_directory "/mnt/dietpi_userdata/Music"
db_file "/mnt/dietpi_userdata/.mpd_cache/db_file"
log_file "/mnt/dietpi_userdata/mpd.log"
pid_file "/var/run/mpd/pid"
state_file "/mnt/dietpi_userdata/.mpd_cache/state"
sticker_file "/mnt/dietpi_userdata/.mpd_cache/sticker.sql"

#user "mpd" #Set via service to allow for mpd user to use assigned groups "audio" and "dietpi"
#group "dietpi" #Set via service to allow for mpd user to use assigned groups "audio" and "dietpi"

#bind_to_address "localhost"
bind_to_address "192.168.0.200"
bind_to_address "127.0.0.1"
port "6600"

user "mpd"
#group "nogroup"


log_level "default"
#gapless_mp3_playback "yes"
#save_absolute_paths_in_playlists "no"
metadata_to_use "artist,album,title,track,name,genre,date"
auto_update "yes"
#auto_update_depth "3"

#follow_outside_symlinks "yes"
#follow_inside_symlinks "yes"

zeroconf_enabled "yes"
zeroconf_name "DietPi MPD"

#password "password@read,add,control,admin"
#default_permissions "read,add,control,admin"

input {

plugin "curl"
#proxy "proxy.isp.com:8080"
#proxy_user "user"
#proxy_password "password"

}

connection_timeout "30"
max_connections "4"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"

filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"

#Audio Output / Processing

#Disabled to allow native DSD output
# replaygain "track"
# replaygain_preamp "8"
# volume_normalization "yes"

audio_buffer_size "2048"
#buffer_before_play "10%"

audio_output {

type "alsa"
#name            "ALSA EQ"


name "DietPi Alsa"
device "hw:1,0"
#device "plug:dmixed"
#device "plug:plugequal"

#format "44100:16:2"
mixer_type "hardware"
#mixer_type "software"
#mixer_control "PCM"
#mixer_index "0"

# Disable DSD DoP MPD 0.19
dop "no"

}

#Realtime audio conversion & upscaling
#audio_output_format "44100::2"
#samplerate_converter "soxr very high"

problem

I tried countless things modifying /etc/mpd.conf, just an example:

  • When I uncomment line device "plug:plugequal" and comment line device "hw:1,0", I don't hear anything, won't play.
  • When I uncomment line device "plug:dmixed" and comment line device "hw:1,0", it plays music however modify the alsamixer equalizer settings, no difference in sound.

I run the alsamixer like this (tried all kind of variants):

alsamixer -c 1 -D equal

Before modifying /etc/mpd.conf I shutdown the mpd process with:

mpd --kill

How can I fix this? What am I do wrong? What do I need to change? Is using an equalizer possible with USB?

migrated from serverfault.com Jun 1 at 19:33

This question came from our site for system and network administrators.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.