Active Topics

 


Reply
Thread Tools
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#1
It WORKS!...
OK here goes a log of what I did (/media/maemo is where I mount my SD maemo partition):

Code:
#!/bin/sh
apt-get install alsa-base alsaplayer-common alsa-utils alsaplayer-esd
cp /media/maemo/usr/sbin/dspctl /usr/sbin/
cp /media/maemo/usr/sbin/dsp_dld /usr/sbin/
cp /media/maemo/usr/sbin/dsmetool /usr/sbin/
cp /media/maemo/etc/init.d/dsp-init /etc/init.d/
cp -r /media/maemo/lib/dsp /lib/
cp -r /media/maemo/usr/lib/alsa-lib /usr/lib
ln -s ../init.d/dsp-init /etc/rc1.d/K24dsp-init
ln -s ../init.d/dsp-init /etc/rc2.d/S24dsp-init
ln -s ../init.d/dsp-init /etc/rc3.d/S24dsp-init
ln -s ../init.d/dsp-init /etc/rc4.d/S24dsp-init
ln -s ../init.d/dsp-init /etc/rc5.d/S24dsp-init
ln -s ../init.d/dsp-init /etc/rc6.d/K24dsp-init
cp /media/maemo/usr/lib/libdsme.so.0.1.0 /usr/lib/
cp -r /media/maemo/var/lib/dsme /var/lib
And then download Qole's Alsa Files.. and also insert Qwerty's UDEV rules inside:
vi /etc/udev/rules.d/50-udev.rules

I added them AFTER the section that says ALSA devices.. therefore it looks similar to this:

Code:
# ALSA devices
KERNEL=="controlC[0-9]*",       NAME="snd/%k"
KERNEL=="hwC[D0-9]*",           NAME="snd/%k"
KERNEL=="pcmC[D0-9cp]*",        NAME="snd/%k"
KERNEL=="midiC[D0-9]*",         NAME="snd/%k"
KERNEL=="timer",                NAME="snd/%k"
KERNEL=="seq",                  NAME="snd/%k"

KERNEL=="snd", SUBSYSTEM=="module", ACTION=="add", \
        RUN+="/bin/ln -sf /proc/asound/oss/sndstat $root/sndstat"

# dsp dev
KERNEL=="dspctl", NAME="dspctl/ctl"
KERNEL=="dspmem", NAME="dspctl/mem", MODE="0640", GROUP="kmem"
KERNEL=="dsptwch", NAME="dspctl/twch", MODE="0640"
KERNEL=="dsperr", NAME="dspctl/err", MODE="0440"
KERNEL=="dsptask[0-9]*", MODE="0666"
Also: to get MPD to work you need to add the following to /etc/network/interfaces:
Code:
iface lo inet loopback
auto lo
Also the config file HAS to have
Code:
audio_output {
type "ao"
name "default ao output"
# driver "alsa"
write_size "4096"
}
Without that write_size it's choppy as crap. Voila.. Sound...

I have NO idea if any of that can be packaged without breaking license agreements..
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!

Last edited by fatalsaint; 2008-08-21 at 16:45.
 

The Following 4 Users Say Thank You to fatalsaint For This Useful Post:
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#2
So.. None of you that are infinitely smarter than myself even have an Idea where to start?? =-(

I looked at the bug tracker on it and Stskeeps pointed to the maemo site for the alsa stuff... I loaded those as they were from Maemo and ended up getting alsa to the point it kept erroring unable to find device.. and I could tell it was trying to look for /dev/dsptask/pcm3 ... but of course the debian is not creating this device for nothing.

Loaded a bunch of maemo deb's (they worked too.. odd enough. Just had to downgrade a lot of packages.) Until I finally gave up; got bored; decided I needed a reinstall anyway so I loaded the maemo udev LOL.. yeah.. trashed it (as would be expected I think)...

So I started over fresh last night and got through a full SID/nit-env-x install without errors or crashing! (but the user account reverted back to 1000 >.>).

Any ideas what to try for sound now?
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
Basically, how beta3 works from what I can tell. You install dspgateway into debian which provides access to the dsp (I know for sure that dspgw is used on maemo). /dev/dsp* nodes are installed when you untar beta3

You have an init script which starts dsp gateway. (Check other stuff for it)
You have alsa installed. A quick look in /var/lib/dpkg/info tells me the following was installed in regards to alsa:
alsa-base, alsaplayer-common, alsa-utils, gnome-alsamixer, xfce4-mixer-alsa.

You have an udev ruleset:

# dsp dev
KERNEL=="dspctl", NAME="dspctl/ctl"
KERNEL=="dspmem", NAME="dspctl/mem", MODE="0640", GROUP="kmem"
KERNEL=="dsptwch", NAME="dspctl/twch", MODE="0640"
KERNEL=="dsperr", NAME="dspctl/err", MODE="0440"
KERNEL=="dsptask[0-9]*", MODE="0666"
You have the following modules in \usr\lib\alsa-lib. I presume these are copied from maemo. I remember johnx saying that he took some dsp modules from maemo on the irc channel.
libasound_module_ctl_dsp_ctl.a
libasound_module_ctl_dsp_ctl.la
libasound_module_ctl_dsp_ctl.so
libasound_module_pcm_alsa_dsp.a
libasound_module_pcm_alsa_dsp.la
libasound_module_pcm_alsa_dsp.so

-- other stuff --

As you've already mentioned, here is the asound.conf from beta3:
# PCM
pcm.!default {
type alsa_dsp
playback_device_file ["/dev/dsptask/pcm3"]
recording_device_file ["/dev/dsptask/pcm_rec1"]
}

# Mixer
ctl.!master {
type hw
card 0
}

ctl.!default {
type dsp_ctl
playback_devices ["/dev/dsptask/pcm3"]
recording_devices ["/dev/dsptask/pcm_rec1"]
}

# OSS emulation
pcm.dsp0 pcm.default
ctl.mixer0 mixer.default
I remember johnx saying on irc that he took some dsp modules from Nokia for beta3. Access to the dsp is provided by dspgateway on maemo. beta3 also comes with a bunch of /dev/dsp* nodes.

mpd.conf:
#
audio_output {
type "ao"
name "default ao output"
# driver "alsa"
write_size "4096"
}
#audio_output {
# type "alsa"
# name "tablet sound"
# device "pcm.default" # optional
#
# format "44100:16:2" # optional
# use_mmap "yes"
#}
#...
openalrc:
(define devices '(alsa))
(define alsa-out-device "default")
There is also:
/etc/alsa/modprobe-post-install.d/alsa-utils:
#!/bin/sh
#
# modprobe post-install script for alsa

udev_is_active()
{
test -e /dev/.udev || test -d /dev/.udevdb || return 1
return 0
}

if udev_is_active ; then
# Stuff is done in a udev-run script instead
exit 0
fi

case "$1" in
snd-*-synth)
# module is not a sound card driver with a mixer
:
;;
*)
# module is a sound card driver with a mixer
exec /etc/init.d/alsa-utils start
;;
esac
That file is not present in beta2.

But here is what you really want and it goes back to my point about dspgateway:
/etc/init.d/dsp:
#!/bin/sh
# DSP Gateway init script
# Copyright (C) 2007 INdT.
# @author Abner Jose de Faria Silva <abner.silva@indt.org.br>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

set -e

DESC="DSP Gateway"

DAEMON=/usr/sbin/dsp_dld
DSPCTL=/usr/sbin/dspctl
DSPCONF=/lib/dsp/dsp_dld_avs.conf

DAEMONPARAM="-p --disable-restart -c $DSPCONF"

KMEMRESERVE=360000

PIDDIR=/var/run/dsp
PIDFILE=$PIDDIR/pid

test -x "$DAEMON" || exit 0
test -x "$DSPCTL" || exit 0
test -e "$DSPCONF" || exit 0

start_dsp()
{
if [ ! -d "$PIDDIR" ]; then
mkdir -p "$PIDDIR"
fi

if [ -e "$PIDFILE" ]; then
TMP=/proc/$(cat $PIDFILE)
if [ -d "$TMP" -a "$(readlink -f $TMP/exe)" = "$DAEMON" ]; then
echo "$DESC is already running."
return
else
echo "Removing old PID file $PIDFILE."
rm -f "$PIDFILE"
fi
fi

echo -n "Starting $DESC: "

chroot /mnt/initfs $DSPCTL kmem_reserve $KMEMRESERVE
start-stop-daemon --start --quiet -b --make-pidfile --pidfile "$PIDFILE" \
--exec "$DAEMON" -- $DAEMONPARAM

echo "done."
}

stop_dsp()
{
echo -n "Stopping $DESC: "

$DSPCTL kmem_release
start-stop-daemon --stop --quiet --name $(basename "$DAEMON") \
--pidfile "$PIDFILE"
rm -f "$PIDFILE"

echo "done."
}

case "$1" in
start)
start_dsp
;;
stop)
stop_dsp
;;
restart|force-reload)
stop_dsp
start_dsp
;;
*)
echo "Usage: $(basename $0) {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

echo ""

exit 0
As part of tablet-hacks, we have:
if [ ! -e /lib/modules/`uname -r` ]; then
mkdir -p /lib/modules/`uname -r`
ln -s /mnt/initfs/lib/modules/`uname -r` /lib/modules/`uname -r`/kernel
depmod -a
Could easily work if you wanted to load dsp modules from initfs. I'll post more of my findings.

Last edited by qwerty12; 2008-08-09 at 08:30.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
Stskeeps's Avatar
Posts: 1,671 | Thanked: 11,478 times | Joined on Jun 2008 @ Warsaw, Poland
#4
Some more things for the sound problem.

http://dev.openbossa.org/trac/mamona...ona-sound-n800 (from Manona)

http://physik.de/770/ARMEL-Install.txt <- from dschmicker's lenny debootstrap
 

The Following 3 Users Say Thank You to Stskeeps For This Useful Post:
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#5
Very awesome tips guys!! As soon as Im done trashing my tablet over and over getting my KDE thread functional with 4.1 and 3.5 I will put gnome back on it and attack this sound stuff again with the new hints.

Very cool!
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#6
Originally Posted by Stskeeps View Post
http://physik.de/770/ARMEL-Install.txt <- from dschmicker's lenny debootstrap
He's just chrooting like me, so he has access to the maemo devices. There's no sound issues in a Debian chroot if you use my instructions (that fatalsaint linked to in the first post).
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Capn_Fish's Avatar
Posts: 140 | Thanked: 13 times | Joined on Mar 2008
#7
OK, thanks to qwerty12's post, I have all of the devices made and set up (apparently). Alsa recognizes them and allows me to change the volume.

The problem is that I get NO sound whatsoever when trying to play an MP3 with MPlayer. I have, under alsamixer, unmuted the channel and raised the volume to 100. Any ideas?

EDIT: I tried both with headphones in and out, and I'm NOT running dsme.

FWIW, when I built the osso-dsp-loader package with dpkg-buildpackage, it wouldn't install, complaining about osso-multimedia-dsp. I can't find that in the Maemo repos anywhere, and wonder if that may be the key...

Thanks a lot.
__________________
Nokia N810 (Some mutation of Mer)

Last edited by Capn_Fish; 2008-08-15 at 16:52. Reason: More information
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#8
Start with a wav file and the command line aplay.

I notice in maemo mplayer, it is configured to use SDL audio (-ao=sdl).
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Capn_Fish's Avatar
Posts: 140 | Thanked: 13 times | Joined on Mar 2008
#9
Still nothing.
__________________
Nokia N810 (Some mutation of Mer)
 
Capn_Fish's Avatar
Posts: 140 | Thanked: 13 times | Joined on Mar 2008
#10
No more ideas?

EDIT: Even after modprobing all of the modules in the "sound" modules directory, nothing...
__________________
Nokia N810 (Some mutation of Mer)

Last edited by Capn_Fish; 2008-08-18 at 03:11.
 
Reply

Tags
debian, deblet


 
Forum Jump


All times are GMT. The time now is 15:08.