Greg Erskine wrote:
> Hi psketch,
>
> You are on the right track. Yeah CARD is an arg. Have a look at [Home
> Page] > [Diagnostics] > [Sound] and have a look at the default
> alsa.conf. Find pcm.plughw. asound.conf appends to or overwrites
> alsa.conf. The "!" implies overwrite. You can also suck in shell
> variables.
>
> Back in the old days the built-in audio could change from CARD=0 to
> CARD=1. At least now if it is active it is always CARD=0. Just to
> confuse the issue even more, the built-in sound card is called
> ALSA....why???
>
> Ideally, asound.conf should have arg names, CARD, DEV, etc rather than
> hardcoding the card number.
>
> You can manually do what you want to asound.conf now. Just do a backup
> to save it.
>
> I found this site helpful: http://www.volkerschatz.com/noise/alsa.html
>
> regards
> Greg
Thanks Greg. OK, bit more reading and some more messing around and got
all things working. As Greg mentions, the UI to create the asound.conf
(under Main/Extras) works by creating a new default pcm device
(pcm.!default) with the necessary routing to make the changes to mono
for example, and then leaving the output settings line on the
Squeezelite Settings page blank. This tells Squeezelite to use the
default device since you haven't specified one, and it picks this up
from asound.conf. In the pcm.!default device, you specify the actual
device you're using in the slave.pcm setting, either by its index
(hw:1,0) or you can also specify the name of the device in exactly the
same way as you would in the normal squeezelite settings. That all
works fine, but I found it easier to keep track of if I created named
devices in asound.conf and then put these as the name in the squeezelite
settings page - e.g. create
Code:
--------------------
pcm.Mono {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.1 1
0.0 1
1.0 1
1.1 1
}
}
--------------------
then specify Mono in output settings in Squeezelite setting pages.
Works fine. If you wanted to do this, the settings for asound.conf are
below - just change slave.pcm to "hw:1,0" or the name of your output
device.
Code:
--------------------
# left - Generated by piCorePlayer
pcm.LeftChannelOnly {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.0 1
1.1 0
}
}
# right - Generated by piCorePlayer
pcm.RightChannelOnly {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.0 0
1.1 1
}
}
# swap - Generated by piCorePlayer
pcm.SwapChannels {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.1 1
1.0 1
}
}
# mono - Generated by piCorePlayer
pcm.Mono {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.1 1
0.0 1
1.0 1
1.1 1
}
}
# stereo - Generated by piCorePlayer
pcm.Stereo {
type route
slave.pcm "sysdefault:CARD=DAC"
ttable {
0.0 1
1.1 1
}
}
# default - Generated by piCorePlayer
pcm.!default {
type plug
slave.pcm "sysdefault:CARD=DAC"
}
--------------------
Greg also mentioned that he did the asound.conf stuff before the
equaliser work. At present, if you use the UI to set Mono for example,
it overwrites the sections in asound.conf for equaliser and that won't
work anymore. You'd have to re-add the equal sections, which are ..
Code:
--------------------
#---ALSA EQ Below--------
ctl.equal {
type equal;
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.plugequal {
type equal;
slave.pcm "sysdefault:CARD=DAC";
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.equal {
type plug;
slave.pcm plugequal;
}
--------------------
I originally started looking at this to get a single speaker running
mono with equal as well - i.e. combine these two. Actually turns out to
be dead easy- just take the ttable settings from Mono and add them into
the pcm.equal device definition - so it becomes
Code:
--------------------
pcm.equal {
type plug;
slave.pcm plugequal;
ttable {
0.1 1
0.0 1
1.0 1
1.1 1
}
}
--------------------
All working nicely for me now :-)
------------------------------------------------------------------------
psketch's Profile: http://forums.slimdevices.com/member.php?userid=56555
View this thread: http://forums.slimdevices.com/showthread.php?t=109404
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix