Re: [SlimDevices: Unix] mono sound on piCorePlayer with hifiberry soundcard

2022-10-03 Thread waldo


Hi,
if I had to do it now, I'd try configuring it in LMS as suggested
above.
That said, I had same problem as you and turned out I had to select a
different number for Audio Card. 
In "Generate asound.conf" section, last line is "Card: 0 1 2". Most
probably you have "0" but need to select 1 or 2.



waldo's Profile: http://forums.slimdevices.com/member.php?userid=19888
View this thread: http://forums.slimdevices.com/showthread.php?t=116888

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] mono sound on piCorePlayer with hifiberry soundcard

2022-10-03 Thread Paul Webster


Would an alternative approach be OK ...
LMS/Settings/Player//Audio/Output Channel Mode=Both Channels (Mono)

You might need LMS 8.3 for that option (I can't remember if in 8.2.1).



Paul Webster
author of \"now playing\" plugins covering radio france (fip etc),
planetradio (bauer - kiss, absolute, scala, jazzfm etc), kcrw, abc
australia and cbc/radio-canada
and, via the extra \"radio now playing\" plugin lots more - see
https://forums.slimdevices.com/showthread.php?115201-announce-radio-now-playing-plugin

Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=116888

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


[SlimDevices: Unix] mono sound on piCorePlayer with hifiberry soundcard

2022-10-03 Thread mrququk


Hi everyone
Im currently trying to set up a raspberry pi with a hifiberry sound card
for a mono speaker. But I'm struggling with the required asound.conf
settings.
As far as I can tell, i need to change the settings in
Beta/Extras/asound

But if i change it there to mono, i haven't gotten any sound yet. I'm
not sure what is required in the output settings field. If i empty it in
first, i feel like it doesn't recognize my soundcard.

Thank you for any tips



This is the current file if i check via putty /etc/asound.conf

Code:


  # default - Generated by piCorePlayer
  pcm.!default {
  # mono
  type route;
  slave.pcm "hw:0,0";
  ttable {
  0.1 1;
  0.0 1;
  1.0 1;
  1.1 1;
  }
  }
  
  pcm.pcpinput {
  type hw
  card Headphones
  device 0
  }
  
  #---ALSA EQ Below
  pcm.sound_device {
  type plug
  slave.pcm {
  type hw
  card Headphones
  device 0
  }
  }
  
  ctl.equal {
  type equal;
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.plugequal {
  type equal;
  slave.pcm "sound_device";
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.equal {
  type plug;
  slave.pcm plugequal;
  }
  
  




mrququk's Profile: http://forums.slimdevices.com/member.php?userid=73062
View this thread: http://forums.slimdevices.com/showthread.php?t=116888

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-05 Thread TimG


Fantastic! It works! (never doubted it for a moment).

I used psketch's suggested asound.conf file which I pasted straight in
using Putty.

So simple - but I'd never have got there!

Didn't try AngloCuencano's suggestion, largely because I no longer had
the default asound.conf file to start from.

Any way, thanks again both for your help.

TimG



TimG's Profile: http://forums.slimdevices.com/member.php?userid=62835
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-05 Thread TimG


Wonderful! Thank you both for the detailed help.

I will try these out and report back.

TimG

:) (Newly optimistic!)



TimG's Profile: http://forums.slimdevices.com/member.php?userid=62835
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-04 Thread AngloCuencano


psketch wrote: 
> I certainly used the UI controls in the past, but 
> 
> 1) I haven't tried them in pcp 7, and the underlying card control has
> changed with the latest kernel.   Probably still works of course, but
> not sure - e.g. if you're using HDMI, which devices is device 0?
> 2) It's a bit trial and error as to which card and device you're
> specifying.  Easy if you're using the built in audio if that's device 0,
> but less easy if you've got more cards
> 3) You can't use this approach with equaliser, which was actually my
> original use case.
> 
> It's easy to modify the asound.conf anyway, and adding new devices there
> for me makes it easier to know for sure what I'm doing and doesn't risk
> messing up any built in behaviour.
> 
> pete S

Yes, it still works with pCP 7. Yes, it was a bit trial and error with
the card number at first. If you have a DAC attached, like TimG, it
seems easier to turn off the onboard audio, and then you can just select
Card 0. It might be more complicated if you want to use USB or HDMI
output. Yes, more difficult if you want an equalizer, and totally beyond
me.

But, I'm fairly confident that what I wrote will work for TimG. We have
similar setups, the only difference is that he is using the Hifiberry
Miniamp, and I use the Pimoroni pHATDAC.



AngloCuencano's Profile: http://forums.slimdevices.com/member.php?userid=64040
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-04 Thread psketch


AngloCuencano wrote: 
> I have a similar use case for a piCorePlayer built into an old
> transistor radio, and I have found the asound mono settings to work
> reliably. 
> 
> I usually start with Squeezelite Settings > Card Control and uncheck
> Enable/disable built-in audio (so that built in audio is disabled), and
> hit save. Then in Squeezelite Settings, clear the Output settings box,
> and hit save. 
> 
> In the Asound settings select:
> 
> Mono
> Any volume adjustment you want to make
> Either hw or plughw (I use plughw)
> Card: 0
> 
> And hit write. Squeezelite should restart, and hopefully you will be in
> business.

I certainly used the UI controls in the past, but 

1) I haven't tried them in pcp 7, and the underlying card control has
changed with the latest kernel.   Probably still works of course, but
not sure - e.g. if you're using HDMI, which devices is device 0?
2) It's a bit trial and error as to which card and device you're
specifying.  Easy if you're using the built in audio if that's device 0,
but less easy if you've got more cards
3) You can't use this approach with equaliser, which was actually my
original use case.

It's easy to modify the asound.conf anyway, and adding new devices there
for me makes it easier to know for sure what I'm doing and doesn't risk
messing up any built in behaviour.

pete S



psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-04 Thread AngloCuencano


TimG wrote: 
> Hi psketch,
> 
> I'm not surprised I'm doing it wrong...!
> 
> Normally (ie by default, before I started doing anything to mess things
> up) the output device was specified as hw:CARD=sndrpihifiberry. The
> default setting plays stereo, but I only have one speaker connected to
> the right channel. All I want to do is down mix both channels into a
> single mono output on the right channel. I don't need anything on the
> left channel - nothing is connected to it.
> 
> I thought I needed to use asound.conf to effect the down-mix, but it
> turns out I've no idea how. I've tried using the asound tab in pcp, and
> I've tried manually editing asound.conf via putty. There is a suggestion
> (in another thread) based on a post on the hifiberry website. I've tried
> that too, but couldn't do that right either...
> 
> I've looked at the documentation for asound but it is much too complex
> for me to understand, I'm afraid.
> 
> Thanks,
> 
> Tim

I have a similar use case for a piCorePlayer built into an old
transistor radio, and I have found the asound mono settings to work
reliably. 

I usually start with Squeezelite Settings > Card Control and uncheck
Enable/disable built-in audio (so that built in audio is disabled), and
hit save. Then in Squeezelit Settings, clear the Output settings box,
and hit save. 

In the asound settings select:

Mono
Any volume adjustment you want to make
Either hw or plughw (I use plughw)
Card: 0

And hit write. Squeezelite should restart, and hopefully you will be in
business.



AngloCuencano's Profile: http://forums.slimdevices.com/member.php?userid=64040
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-04 Thread psketch


Hi Tim

Yes, I found it all rather confusing when I first started looking at it,
but it's not too bad.

So, the default asound.conf looks like


Code:


  # default - Generated by piCorePlayer
  pcm.!default {
  type plug
  slave.pcm "hw:0,0"
  }
  
  pcm.pcpinput {
  type hw
  card Headphones
  device 0
  }
  
  
  
  #---ALSA EQ Below
  pcm.sound_device {
  type plug
  slave.pcm {
  type hw
  card Headphones
  device 0
  }
  }
  
  ctl.equal {
  type equal;
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.plugequal {
  type equal;
  slave.pcm "sound_device";
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.equal {
  type plug;
  slave.pcm plugequal;
  }
  



The first bit


Code:

pcm.!default {
  type plug
  slave.pcm "hw:0,0"
  }
  



creates a default device for alsa to use if no device is specified.  The
UI in the Extras\asound modifies this device.  BTW, that's why is says
that the entry for output on the squeezelite page must be blank - so
that default is used.

However, I think it's easier if you're going to edit asound anyway, to
create a new device specifically for mono.  So, take the default
asound.conf (use the above maybe if you've messed around with it to
start from scratch), edit it and add


Code:


  pcm.HifiBerryDevice {
  type plug
  slave.pcm {
  type hw
  card sndrpihifiberry;
  device 0
  }
  }
  
  pcm.HifiBerryMono {
  type plug;
  slave.pcm HifiBerryDevice;
ttable {
  0.0 0.5   # L(0) to L(0) at 0.5 volume
  1.0 0.5   # R(1) to L(0) at 0.5 volume
  
  0.1 0.5   # L(0) to R(1) at 0.5 Volume 
  1.1 0.5   # R(1) to R(1) at 0.5 Volume
}
  }
  



The devices in asound.conf build on top of each other.  So, this creates
a device called HifiBerryDevice, which refers to the underlying hardware
you have (I have the same one).  Then, on top of that, it creates a
device called HifiBerryMono, which creates the mapping table.

Add that to asound.conf, save it, then go to the main page and do a
Backup (to keep the changes) and Restart to restart Squeezelite.  Then,
if you look at the Squeezelite Settings page, and click on more next to
output settings, you'll see a new device called HifiBerryMono available
to choose.  Select that, save it, and you should be good to go.

If you just want volume from the right speaker, you could change the
mapping table to


Code:


  0.0 0   # L(0) to L(0) at 0 volume
  1.0 0   # R(1) to L(0) at 0 volume
  
  0.1 0.5   # L(0) to R(1) at 0.5 Volume 
  1.1 0.5   # R(1) to R(1) at 0.5 Volume
  



but maybe start with dual mono to check it's working.

I'm no huge expert in this - just my findings from fiddling around.

pete S



psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-03 Thread TimG


Hi psketch,

I'm not surprised I'm doing it wrong...!

Normally (ie by default, before I started doing anything to mess things
up) the output device was specified as hw:CARD=sndrpihifiberry. The
default setting plays stereo, but I only have one speaker connected to
the right channel. All I want to do is down mix both channels into a
single mono output on the right channel. I don't need anything on the
left channel - nothing is connected to it.

I thought I needed to use asound.conf to effect the down-mix, but it
turns out I've no idea how. I've tried using the asound tab in pcp, and
I've tried manually editing asound.conf via putty. There is a suggestion
(in another thread) based on a post on the hifiberry website. I've tried
that too, but couldn't do that right either...

I've looked at the documentation for asound but it is much too complex
for me to understand, I'm afraid.

Thanks,

Tim



TimG's Profile: http://forums.slimdevices.com/member.php?userid=62835
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-03 Thread psketch


Hi Tim

I think your problem may be different to strebor's original one.  He was
using the 10 band equaliser on the tweaks page, which will set the
output device on the squeezelite page to "equal".  However, you then
can't use the mono setting on the Extras/Asound page - both things want
to change the asound.conf file and the UI isn't setup to do that - you
have to change it manually.

However, if you're not using the equaliser, you shouldn't need to
manually edit the asound.conf.  The changes you've made below to the
conf won't do anything btw - you're telling the equaliser to play in
mono, but you're not using the equaliser, so nothing's going to happen
there.

Your slave.pcm line looks wrong to me - you're not telling it what
device to use - I would expect hw:0,0 for example.  TBH, I'm not
completely sure if the mono default works nowadays - this isn't really a
mainstream area of pcp.  What output device are you using normally -
i.e. when squeezelite is running and you're just getting mono, and what
do you see in the available devices listed?

pete S



psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2021-01-02 Thread TimG


I'm having trouble getting mono output to work on my set up. I'm blindly
following instructions with no actual understanding, so please bear with
me...:confused:

I have a Kef egg speaker (HTS2001.2). I'm using a Pi Zero with a
hifiberry miniamp to drive the speaker and have piCorePlayer running.
This is my third pi/piCorePlayer set up, but the only one that needs to
be mono.

The speaker is connected to the right channel and the left channel is
not connected.

Music and radio streaming play fine, but I'm only getting the right
channel output (obviously). If I use a stereo test track, I can here the
right, but the left is silent.

I've tried using the Asound beta tab in piCorePlayer to choose mono
output, but it doesn't seem to change anything. On that tab, it says the
"Output Settings" should be blank and to change them on the Squeezelite
Settings tab. I have tried every possible setting here in combination
with many Asound settings but, when I write the updated file, either a)
it makes no difference, or b) Squeezelite fails to start.

What I want is a downmix of both channels to mono on the RHS and no
output on the LHS.

I've also tried editing the asound.conf file manually in many ways. Here
is my most recent attempt:


Code:


  # default - Generated by piCorePlayer
  pcm.!default {
  # default
  type plug;
  slave.pcm ":0,0";
  }
  
  pcm.pcpinput {
  type hw
  card ALSA
  device 0
  }
  
  #---ALSA EQ Below
  pcm.sound_device {
  type plug
  slave.pcm {
  type hw
  card ALSA
  device 0
  }
  }
  
  ctl.equal {
  type equal;
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.plugequal {
  type equal;
  slave.pcm "sound_device";
  controls "/home/tc/.alsaequal.bin"
  library "/usr/local/lib/ladspa/caps.so"
  }
  
  pcm.equal {
  type plug;
  slave.pcm plugequal;
  ttable {
  0.0 0.5 # L(0) to L(0) at 0.5 volume
  1.0 0.5 # R(1) to L(0) at 0.5 volume
  
  0.1 0.5 # L(0) to R(1) at 0.5 volume
  1.1 0.5 # R(1) to R(1) at 0.5 volume
  }
  }
  



I don't know what to try next...:(



TimG's Profile: http://forums.slimdevices.com/member.php?userid=62835
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-05 Thread w3wilkes


strebor56 wrote: 
> 
> I've not had a problem with windows editing of nix files since I buried
> that W95 CD at the bottom of the garden with a big rock on top, there i
> go again being flippant.  
> Bonne continuation...strebor
Hopefully you preserved one of the best thing on that Win95 CD. There's
a music video titled Good Times by Edie Brickell (Paul Simon's wife),
it's quite good. I thought it was "All about the Music".



Main system - Rock Solid with LMS 7.9.4 Official on WHS 2011 - 2 Duets
and Squeeseslave
Cabin system - Rock solid with LMS 7.9.3 Official on Win10 Pro - 1 RPi 3
Model B/Hifiberry DAC+ Pro/PiCorePlayer and Squeezeslave
Test system - LMS 8.0 nightly on Win10Pro - Squeezeplay
Squeezebox Boom - "At Large" player around both home and cabin
Headphones and car - Android phone/Bluetooth w/full library on MicroSD
card - PowerAmp music player app (similar to Material Skin)

w3wilkes's Profile: http://forums.slimdevices.com/member.php?userid=22973
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-05 Thread strebor56


psketch wrote: 
> ... or the way I do it normally - install bitvise SSH client, which is
> handy for other things anyway - and just open the file in notepad++ or
> vs code, or any other editor you trust not to leave anything messy in
> the file
> 
> That's what you get for asking a windows person how to edit a linux file
> ;-)

Thank you both for concerns but I've been unhappily editing files in vi
for about thirty years, I long ago painfully discovered that the most
useful  vi command is cp never edit before copying( how do you spell
hipocrite ??)

I've not had a problem with windows editing of nix files since I buried
that W95 CD at the bottom of the garden with a big rock on top, there i
go again being flippant.  
Thanks once again for the help in this forum, such a brilliant project
and a forum that is a pleasure to dip into.

Bonne continuation...strebor



strebor56's Profile: http://forums.slimdevices.com/member.php?userid=65828
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-04 Thread psketch


... or the way I do it normally - install bitvise SSH client, which is
handy for other things anyway - and just open the file in notepad++ or
vs code, or any other editor you trust not to leave anything messy in
the file

That's what you get for asking a windows person how to edit a linux file
;-)



psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-04 Thread Paul Webster


Really easy ... especially if you use Putty to copy/paste

vi file
move cursor to where you want the new stuff inserted
press
i
paste in the text
esc (Esc  key)
:wq


If you make a mistake then easy way out 
esc
:q!
(means ... command coming next  quit ... and don't ask me if I am
sure
and do it all again



Paul Webster
http://dabdig.blogspot.com
author of \"now playing\" plugins covering radio france (fip etc), kcrw,
supla finland, abc australia, cbc/radio-canada and rte ireland

Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-04 Thread strebor56


psketch wrote: 
> Hi Strebor
> 
> When you enable equal, you overwrite asound.conf.  You need to edit that
> manually 
> 
> 
> i.e. add the ttable section to remap the sound.
> 
> pete S

Thanks Pete, now where did I put that vi cheat sheet :-)

Regards Strebor



strebor56's Profile: http://forums.slimdevices.com/member.php?userid=65828
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Mono sound

2020-11-03 Thread psketch


Hi Strebor

When you enable equal, you overwrite asound.conf.  You need to edit that
manually - it's in /etc.  Don't forgot to do a backup on the main page
once you've changed it.

You need to change pcm.equal section to 

pcm.equal {
type plug;
slave.pcm plugequal;
ttable {
0.0 0.5   # L(0) to L(0) at 0.5 volume
1.0 0.5   # R(1) to L(0) at 0.5 volume

0.1 0.5   # L(0) to R(1) at 0.5 Volume 
1.1 0.5   # R(1) to R(1) at 0.5 Volume
}
}

i.e. add the ttable section to remap the sound.

pete S



psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


[SlimDevices: Unix] Mono sound

2020-11-02 Thread strebor56


Hi, I have built a weather resistant pCP for a covered patio, all good.
A little fiddling was required to get the Output settings and the Alsa
ttable map to work but achieved using the web gui.
However adding in the 10 band eq removes the mono setting.
Has anybody got any experience they are willing to share on this?

Strebor



strebor56's Profile: http://forums.slimdevices.com/member.php?userid=65828
View this thread: http://forums.slimdevices.com/showthread.php?t=113162

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix