cat /proc/asound/cards
Had to manually compile the kernels awhile back.
loaded the kernels
install dbus avahi and mpd.
create groups and users for those 3 installed.
had to configure alsa too. Alsa configuration files missing. ( well , i just copied and pasted the alsa configs from my desktop :P lazy me )
And Configured MPD to run ! finally.
When i connected to it via an external client over intranet...and press play.. i get this error
http://pastebin.com/vxzLSQwF
Would anybody know how to get around it ?
Kernel config changes are :
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
and a few others. Attached config file wthout the dot.
http://www.mediafire.com/?azvj7vuri076k31
can't upload to here for some reason
Did not have to load a new kernel. Thankfully.
For dbus and avahi .. Avahi's group was created but avahi user was not
dbus group and user was not created i think.
Needed an audio group too for MPD to access the sound card. Needed to create an MPD user manually too.
The config i was referring to for MPD is the one found in /etc/mpd.conf Was using a system wide confg file.
And for the ALSA bit , yes it is old version of alsa. I was wondering if you could get a newer version of alsa-libs as well as the alsa-utils compiled so i wouldn't have to configure Alsa's config files manually.
On Tuesday, January 15, 2013 12:27:39 AM UTC+8, Joao Cardoso wrote:
On Friday 18 January 2013 08:48:03 samuel wang wrote:
> Was going through the package folders from the svn revision.. and found
> that there were make files for alsa-utils in the multimedia folder.
>
> However , i was not able to build alsa-utils. One of the dependencies
> failed to built. libtool or something like that. Latest checkout as of
> yesterday. The RC 2 revision.
>
> Would it be possible for you to build to alsa-utils as it is pretty useful
> in configuring alsa. Doesn't quite matter what version of alsa and
> alsa-utils it is.
Please try the attached, untested, package (use 'ipkg install filename.ipk') and report back if it is working, so I will release it.
>
> Would be looking into the configs for other NASes out there. Shall post it
> the config if i succeed
Thanks
Joao
Again posting by e-mail, as attaching doesn't work in Google Groups under Chrome Beta in linux!
Still No do , Alsa it self isn't detecting the sound card even though the kernel detects it.
cat /proc/asound/cards does show my sound card
but aplay -l doesnt.
Would be compiling a newer version of alsa-libs and see how it goes.
As for the alsa-utils, all works well except for the dependency error of alsa_lib instead of alsa-lib. Should be alsa-lib
And dbus doesn't create the neccesary dbus user for use of dbus
Output from dmesg.
input: C-Media USB Headphone Set as /class/input/input3
generic-usb 0003:0D8C:000C.0003: input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-orion-ehci.0-1/input3
# cat /proc/asound/cards
0 [default ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-orion-ehci.0-1, full speed
Here's the weirdest part , i could find it under /proc/asound/cards... and it's still not detected under alsa
Anyway , i did a little experimenting here... went ahead and installed debian on my dns323...
and guess what, alsa with usb and everything works. MPD plays .. a little high cpu usage playing flac but tolerable.
To continue testing for alsa on alt -f .. i flashed back alt-f firmware :)
For the dbus package on a clean install of alt-f , it installed everything correctly. users and group all were created .
Alsa-lib and alsa-utils work great.
( Btw, alsaconf has long been depreciated. It's replaced by alsactl in alsa-utils )
So, there are probably a few things i can narrow down to...
1. Alt-f kernel doesn't have sound support enabled..
leading to alsa not being able to detect the card despite the modules being loaded.
2. Some hotplugging mechanism is missing.
Udev was running on the debian installation and seemed to be handling all the hotplugging of devices.
( i tried the busybox's version of udev , mdev, to no avail.)
I am tempted to compile a kernel for alt-f with sound support enabled and flash it.
No serial cable made for the dns323 here though.. a tad.. risky :/
Is it safe to compile the uKernel and cat uKernel > /dev/mtdblock2 ? That's what i did with the original dlink firmware before returning to alt-f firmware.
Ah. about the sound not enabled in the kernel.. I meant that i thought i could enable it just by loading those modules.. :P but it doesn't seem to be working that way.
Oh oh , you mean , if i just put the kernel and initramfs in the root directory, rcE would automatically kexec the found kernel and initramfs ?
# do a kexec to a new kernel/rootfs instead of a reboot |
if test -f /root/zImage; then |
cd /root |
initrfs=$(ls rootfs.arm.cpio*) |
if test -f "$initrfs"; then # make sure that only one exists |
echo "rcE: starting a new kernel and initramfs" |
kexec -l zImage --command-line="console=ttyS0,115200" \ |
--initrd="$initrfs" && kexec -e |
fi |
fi |
Phew. managed to compile the kernel and the initramfs. And kexec loaded them just fine.
loaded the new kernel and dmesg output said snd-usb-audio was registerd
usbcore: registered new interface driver snd-usb-audio
Decided to built-in those alsa and snd-usb-audio along with a dummy alsa card... just to see if alsa would detect it
And weirdly enough, alsa detected neither the dummy card nor the usb sound card.
I'm kinda stumped..not too sure how to proceed from here.. Will be looking up more on ALSA.
make O=$BLDDIR linux26-menuconfig
make O=$BLDDIR linux26
And a zImage file was given out. Assumed it was the one that i've just built with Alsa support built in
After kexec and reboot , snd-usb-audio was registered automatically but none of the sound kernel modules was found in /lib/modules/2.5.25.14
And yes , kernel-modules was Not installed. Used the cpio from the tar file uploaded here.
Anyway, for the fun of it , i enabled KSM ( kernel samepage merging or something like that) Really popular stuff on android.. And the RAM usage was cut down by quite a bit
It does have some CPU usage as a penalty..but negligible.
total used free shared buffers
Mem: 61944 36268 25676 0 5596
-/+ buffers: 30672 31272
Swap: 178172 0 178172
With only samba and nmbd in the background.
Back to the usb audio topic. I still have no idea how or what to do.
How does Alt -f manage mdev again ? some hotplug sh file ?
I am gonna try the kernel configurations listed here http://wiki.gentoo.org/wiki/Udev
kexec and stuff worked really well. Couldn't be better :P
i have always thought snd-usb-audio was the generic driver for all usb sound cards.
Anyway here''s the lsusb output
ioBus 001 Device 002: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Oh oh , here's the weird thing i've built the kernel using the commandsmake O=$BLDDIR linux26-menuconfig
make O=$BLDDIR linux26
And a zImage file was given out. Assumed it was the one that i've just built with Alsa support built in
After kexec and reboot , snd-usb-audio was registered automatically but none of the sound kernel modules was found in /lib/modules/2.5.25.14
And yes , kernel-modules was Not installed. Used the cpio from the tar file uploaded here.
Anyway, for the fun of it , i enabled KSM ( kernel samepage merging or something like that) Really popular stuff on android.. And the RAM usage was cut down by quite a bit
It does have some CPU usage as a penalty..but negligible.
total used free shared buffers
Mem: 61944 36268 25676 0 5596
-/+ buffers: 30672 31272
Swap: 178172 0 178172
With only samba and nmbd in the background.
Back to the usb audio topic. I still have no idea how or what to do.
How does Alt -f manage mdev again ? some hotplug sh file ?
controlC[0-9] 0:0 0664 >snd/ pcmC[0-9]D[0-9][cp] 0:0 0664 >snd/ timer 0:0 0664 >snd/ seq 0:0 0664 >snd/
and those sound modules to be loaded.
And a generic alsa configuration found in every distribution /usr/share/alsa. So i copied it over.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
WOOOOOOOOOOOOOOOOOO ! HOLY COW.
Anyway, here's the link i got it from
http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:mdev
Who would have ever thought to look at mdev :P
AND YES , SOUND WORKS ON MPD. WHOOOOOOOOOOooooo. IT worked out finally. Thank you for your help :P glad i stuck with it. Learnt alot from it.
Now for a way to make these settings survive a reboot. Hmm.
HOLY CRAP. I DID IT.
I GOT ALSA TO DETECT THAT DARN SOUNDCARD WHOOOOOOOOO.
The solution lies in mdev not creating those required nodes.
requires these to be addedcontrolC[0-9] 0:0 0664 >snd/ pcmC[0-9]D[0-9][cp] 0:0 0664 >snd/ timer 0:0 0664 >snd/ seq 0:0 0664 >snd/
and those sound modules to be loaded.
And a generic alsa configuration found in every distribution /usr/share/alsa. So i copied it over.
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
WOOOOOOOOOOOOOOOOOO ! HOLY COW.
Anyway, here's the link i got it from
http://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:mdev
Who would have ever thought to look at mdev :P
AND YES , SOUND WORKS ON MPD. WHOOOOOOOOOOooooo. IT worked out finally. Thank you for your help :P glad i stuck with it. Learnt alot from it.
Now for a way to make these settings survive a reboot. Hmm.
Oh oh , the previous kernel was just kexeced onto the system.. and i rebooted after that.
Here's the lsmod
# lsmod
Module Size Used by Not tainted
snd_usb_audio 59644 1
snd_usbmidi_lib 12284 1 snd_usb_audio
snd_rawmidi 12660 1 snd_usbmidi_lib
snd_seq_device 3644 1 snd_rawmidi
snd_pcm_oss 29748 0
snd_mixer_oss 10860 1 snd_pcm_oss
snd_pcm 45177 3 snd_usb_audio,snd_pcm_oss
snd_timer 13004 1 snd_pcm
snd_hwdep 3968 1 snd_usb_audio
snd 29076 10 snd_usb_audio,snd_usbmidi_lib,snd_rawmidi,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
snd_page_alloc 3580 1 snd_pcm
soundcore 3248 1 snd
usblp 7840 0
Config file. Without the dot. Same as the one posted earlier.
http://www.mediafire.com/?azvj7vuri076k31
Mpd conf relevant to the audio output section. It can be found commented in the default settings. Just uncomment the necessary bits and modify whatever needed.
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
mixer_type "software" # optional
# mixer_device "default" # optional
mixer_control "Speaker" # optional
# mixer_index "0" # optional
}
Lastly , how do i make changes to /etc/mdev.conf survive the reboot ?
aufs.sh -n
cp /etc/mdev.conf /Alt-F/etc/
aufs.sh -r
Yeah , that sounds good to go. After insmod-ing those kernel modules,
they were auto-loaded.
Nothing is missing out , good to go :)
Yeah those modules with OSS in it are not needed for mpd to play. Tested it out without those modules. Mpd plays fine.
If i wanted to flash a kernel that i've compiled.. how do i do it ? After the kexec ?
./mkinitramfs.sh sqfs
./mkfw.sh sqfs
How do you get the kernel-modules package to build those additional sound modules ?
The mk and config.in file doesn't show that
Kernel was still oversized no matter what when sound was enabled :P
Would you ever consider enabling ksm in the kernel ?
Yeah , that sounds good to go. After insmod-ing those kernel modules, they were auto-loaded.
Nothing is missing out , good to go :)
Yaayy , that's great to hear :)
restored the stock mdev and renamed the alsa folder. And reflashed the rc2 firmware.
Those required lines are added properly when installing the new alsa-lib. However those changes do not survive a reboot.
alsa-utils works great.
And kernel-modules now has those required sound modules which are automatically loaded on reboot.
Joao,