(resolved) Keep losing soundcard

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

(resolved) Keep losing soundcard

Post by rothchild »

Hi,

Lovin' Diet-Pi and trying to get myself a super lightweight music player running, but i keep losing the soundcard (I have an i2s dac on board using the hifiberry driver) it worked when I set it up (needed a few tweaks, like switching the mixer type to software) but it was up and running.

I've then installed my usb drive and directed it to mount to /root/Music and although I can see the files I can't play anything, connecting with GMPC returns an error that there's a problem with the soundcard and now when I use dietpi-config there are no soundcards listed and the 'hi-def' audio setting has returned to 'no'

Please can you advise what I've screwed up here please?

Also the next step for me will be to install http://www.subsonic.org are there any tips to get it working with diet pi?

Cheers,
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Keep losing soundcard

Post by Fourdee »

rothchild wrote:Please can you advise what I've screwed up here please?
Hi Rothchild,

Could you please complete a dietpi-bugreport? This will allow me to check your current settings.
Simply run the following command and follow the steps:

Code: Select all

dietpi-bugreport
Also, did you use dietpi-config to change the soundcard and select your HiFi berry card?
I've then installed my usb drive and directed it to mount to /root/Music and although I can see the files I can't play anything, connecting with GMPC returns an error that there's a problem with the soundcard and now when I use dietpi-config there are no soundcards listed and the 'hi-def' audio setting has returned to 'no'
DietPi will automatically mount your USB drive to /mnt/usb_1 after boot. It would be best to use that mount.
Also the next step for me will be to install http://www.subsonic.org are there any tips to get it working with diet pi?
I'd need to take a look at it. It wont be for a few weeks, in the process of moving house. I'll let you know if/when it comes available.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: Keep losing soundcard

Post by rothchild »

Thanks fordee, bug report duly submitted (Reference CODE: 001150c085d0-0 0)

What's odd is that it worked fine upon installation but now the audio settings in dietpi-config don't work at all. I'm fairly sure the only things I've done outside the default hifi install is install lame and ffmpeg via apt (in anticipation of my subsonic install) and tweak the mpd.conf to have the fixed ip of my router assigns the Pi and change the mixer setting (although I'd like to have it set to none as the card doesn't have a mixer and I don't need software (bit reducing) volume control)

Good luck with the house move! If I can get the soundcard working I can progress to trying to get subsonic working anyway so I may be able to offer some notes back on that.

Cheers,
Marc
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: Keep losing soundcard

Post by rothchild »

Hi Dan,

I'm not sure what you'll find in the bug report but I took the chance to try another clean install and this time it's worked all the way through :roll:

Installed hifi from dietpi-software

changed mpd.conf mixer to software and library to /mnt/usb_1

installed oracle-java7 (with apt-get)

installed subsonic (with dpkg)

let subsonic spin up, set library and allowed it to scan etc (took a while)

installed lame and ffmpeg (with apt-get)

Did:
ln -fs /usr/bin/ffmpeg /var/subsonic/transcode
ln -fs /usr/bin/lame /var/subsonic/transcode

(c/o this excellent guide: http://mj2p.co.uk/a-raspberry-pi-subson ... ng-java-8/)

reboot, wait for subsonic to spin up

all works! (didn't even need to prod the java soundcard settings around)
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Keep losing soundcard

Post by Fourdee »

rothchild wrote: all works! (didn't even need to prod the java soundcard settings around)
Hi Marc,

I was just going through your uploaded bug report, thanks for sending it.

Excellent, good to hear its working on your system now.

A few things to note/ask:
- Have you modified the asound.conf on the new image installation?
DietPi will automatically install the /etc/asound.conf when changing your soundcard in dietpi-config.

- HQ Audio | dietpi-config
You should be able to set this to "Disabled", as I believe this only effects the RPi onboard card, not your HiFi berry. I could be wrong, may be worth a test. The RPi soundcard output will emit a gentle "hiss" when HQ audio is set to disabled.

- /etc/mpd.conf | Music folders
If you said "Yes" to USB drive dedicated install during the 1st part of setup, DietPi will automatically setup and create your library folders (/mnt/usb_1/Music). You dont need to change the mpd file. Just stick your music into that folder and click "update DB".

- /etc/mpd.conf | HiFi berry
As you mentioned, this needs to be setup as "software device". Would you be able to copy and paste this section from your mpd.conf file?

Code: Select all

audio_output {
        type                                                    "alsa"
        name                                                    "My ALSA Device"
        device                                                  "hw:0,0"        # optional
        format                                                  "44100:16:2"    # optional
        mixer_device                                    "default"       # optional
        mixer_control                                   "PCM"           # optional
        mixer_index                                             "0"             # optional
}
- SubSonic
Excellent and thanks for sharing the steps. I will try to get this added as an installation option for DietPi-Software. With full credit to you :)

Yes, moving house, nightmare lol.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: Keep losing soundcard

Post by rothchild »

Thanks Dan,

Would it be worth submitting a bug report of the working system so you can see how it's configured?

I'll get the other stuff back to you this evening.

Marc
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Keep losing soundcard

Post by Fourdee »

rothchild wrote:Would it be worth submitting a bug report of the working system so you can see how it's configured?
Hi Marc,

No rush. Please do the bugreport, also, if you could attach or paste the following files, i'd be grateful:
- /etc/mpd.conf
- /etc/asound.conf
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: Keep losing soundcard

Post by rothchild »

Nice one,

I've just submitted a report from the working system.

cat /etc/asound.conf
#asound_hifiberry.conf
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0

cat /etc/mpd.conf
#/etc/mpd.conf

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

user "root"
#group "nogroup"
bind_to_address "192.168.1.10"
#bind_to_address "/var/run/mpd/socket"
#port "6600"

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 "Music Player"

#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"
}

audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
}

#audio_output_format "44100:16:2"
#samplerate_converter "Fastest Sinc Interpolator"
mixer_type "software"

replaygain "track"
#replaygain_preamp "0"
volume_normalization "no"

#audio_buffer_size "2048"
#buffer_before_play "10%"

connection_timeout "60"
max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"

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

It would be nice if we could have a tidier mpd.conf (if you check out the way volumio manages it I think that's a neat system).
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Keep losing soundcard

Post by Fourdee »

Hi Marc,

Many thanks for the bug report and requested information.
I will take a look at these next week, and, see if we can resolve this for future installations using HiFi berry devices.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rothchild
Posts: 74
Joined: Sat Jun 27, 2015 10:39 am

Re: Keep losing soundcard

Post by rothchild »

Hmm, after a couple of days of great performance I'm back to no soundcard... I've submitted a bugreport: 001150c085d0-1 - hope there's enough in there to work out what the problem is.
Post Reply