Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,174
    hi mff,

    Sorry I can not be much help to you, my knowledge of ALSA is limited.

    Just a few points in case it is something obvious.

    You are editing /etc/asound.conf?
    You need to do a backup to make the changes persistent ($ pcp bu)

    My limited ALSA knowledge is shown on the asound web pages. These are my attempts to understand ALSA.

    1. [Main page] in [Beta] mode > [Extras] > [Asound]
    2. [Main page] in [Beta] mode > [Diagnostics] > [Sound] (be careful your amp is not on loud)

    The piCore implementation of ALSA may be missing a few things. ALSA did change a few version back, you could try pCP2.03 or so.

    regards
    Greg

  2. #12
    Junior Member
    Join Date
    Aug 2016
    Location
    Europe
    Posts
    15

    SOLVED - Splitting 7.1 channel sound card

    Hi Greg,


    Quote Originally Posted by Greg Erskine View Post
    The piCore implementation of ALSA may be missing a few things. ALSA did change a few version back, you could try pCP2.03 or so.
    I found that ALSA really changed! All "old" config hints I found were useless! Seems that pCP comes with a newer ALSA version than most other distributions. But...

    I FINALLY DID IT!

    So here is my working asound.conf for the recent (3.02) version of piCorePlayer:
    Code:
    pcm.logilink {		# alias for our sound card
    	type hw			# must be hw in our case
    	card 1			# check your correct card number by typing
    	device 0		# 'aplay -l' in your terminal
    }					# the 1st usb card on the Raspi shows as
    					# card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
    
    ctl.logilink {      
    	type hw
    	card 1
    	device 0
    }
    
    pcm.dmixer {
    	type dmix
    	ipc_key 1024	
    	ipc_perm 0666			# neccesary for normal user to have access to outputs
    	slave.pcm "logilink"
    	slave {
    		period_time 0
    		period_size 1024
    		buffer_size 4096
    		rate 44100
    		channels 8
    	}
    	bindings {
    		0 0
    		1 1 
    		2 2 
    		3 3 
    		4 4 
    		5 5 
    		6 6 
    		7 7 
    		}
    	
    }	
    
    pcm.!default {
    	type plug
    	slave.pcm "dmixer"
    }
    
    pcm.stereofront {	          # the name of our splitted output
    	type plug
    	slave {
    		pcm "dmixer"
    		channels 8
    	}
    	ttable.0.0 1
    	ttable.1.1 1
    }
    
    pcm.stereocenter {
    	type plug
    	slave {
    		pcm "dmixer"
    		channels 8
    	}
    	ttable.0.2 1
    	ttable.1.3 1
    }
    
    pcm.stereoback {
    	type plug
    	slave {
    		pcm "dmixer"
    		channels 8
    	}
    	ttable.0.4 1
    	ttable.1.5 1
    }
    
    pcm.stereosurround {
    	type plug
    	slave {
    		pcm "dmixer"
    		channels 8
    	}
    	ttable.0.6 1
    	ttable.1.7 1
    }
    
    pcm.stereoall {
    	type plug
    	slave {
    		pcm "dmixer"
    		channels 8
    	}
    	ttable.0.0 1
    	ttable.1.1 1
    	ttable.0.2 1
    	ttable.1.3 1
    	ttable.0.4 1
    	ttable.1.5 1
    	ttable.0.6 1
    	ttable.1.7 1
    }
    The available outputs are
    stereofront
    stereosurround
    stereocenter
    stereoback
    stereoall


    This additional outputs are NOT(!) shown by typing
    Code:
    /mnt/mmcblk0p2/tce/squeezelite-armv6hf -l
    in your terminal. This make it hard to find config errors.

    But you can see some error output if your asound.conf is misconfigured or has typo errors
    like:
    Code:
    ALSA lib conf.c:1698:(snd_config_load1) _toplevel_:53:1:Unexpected char
    ALSA lib conf.c:3458:(config_file_open) /etc/asound.conf may be old or corrupted: consider to remove or fix it
    ALSA lib conf.c:3380:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
    ALSA lib conf.c:3829:(snd_config_update_r) hooks failed, removing configuration
    And yes, don't forget to
    Code:
    sudo filetool.sh -b
    on every config file change to save it.

    With 'stereoall' you can put sound to all 4 stereo outs together. You even can split the card to mono channels so theoretically 8 single mono-mixed outs would be possible (already tested). Perhaps more than a normal raspi could handle.
    Btw. with 4 instances streaming on my Raspberry 1B top shows a load between 1.00 and about 1.5 as long as LMS runs on a different machine.

    I hope this can help in some way for future development of piCorePlayer.

    Perhaps showing the instances on their own pages in browser would be a great feature.

    My next goal is to set the right GPIO pins for (de-)activating the corresponding amps for each output.

    Special thanks to Greg for the right hints with ALSA changes...

    greetings
    mff

  3. #13
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    1,174
    hi mff,

    Great news! I have booked marked this for future reference.

    Thanks
    Greg

  4. #14
    Junior Member
    Join Date
    Apr 2017
    Posts
    1
    Great job.
    All channels work ok for me. Could you describe hot to start 4 instances of squezzelite on piCorePlayer image?
    I'm also wonder if you finished (de)activation part.

  5. #15
    Junior Member
    Join Date
    Aug 2016
    Location
    Europe
    Posts
    15
    Maybe here are some uselful hints
    https://knx-user-forum.de/forum/%C3%...replayer-basis

  6. #16
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,075
    Quote Originally Posted by Greg Erskine View Post
    hi mff,

    Great news! I have booked marked this for future reference.

    Thanks
    Greg
    FYI and BTW, I had to run 2 instances of squeezelite on PCP to test something.
    I have noticed that PCP reports "squeezelite is not running" when the 2 instances run. When any of the 2 failed to start, PCP would report "squeezelite running".

    HTH
    3 SB 3 • Libratone Loop, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • Server Power Control by Gordon Harris • Smart Mix, Music Walk With Me, What Was That Tune? by Michael Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.

  7. #17
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,760
    Quote Originally Posted by epoch1970 View Post
    FYI and BTW, I had to run 2 instances of squeezelite on PCP to test something.
    I have noticed that PCP reports "squeezelite is not running" when the 2 instances run. When any of the 2 failed to start, PCP would report "squeezelite running".

    HTH
    It appears to be an issue with how we are checking running squeezelite status when there's more than one instance. The script wasn't designed with that in mind. I'll see about getting it fixed.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  8. #18
    Junior Member
    Join Date
    Aug 2016
    Location
    Europe
    Posts
    15
    @epoch1970

    The setup in the link I posted above runs fine and without problems for several months now. The power consumption is low, and four instances are possible on the "old" raspberry v1B. I'm very happy with this combination of hardware and software so far.
    I think it's much "smarter" than having every single instance on its own hardware scattered all around the house. But you need to have the loudspeaker cables already in every room, like for ethernet, that's the only drawback.

Tags for this Thread

Posting Permissions

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