LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 09-20-2005, 02:12 AM   #16
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43

Well, ALSA setup assumes that they'll be modules, you should be ok if you just leave out the modprobe entries that correspond to built-in drivers.

I'm sure the LFS team made those choices because of the onboard chips are so common these days, but if you don't have an intel chipset on your motherboard building in the snd-intel8x0 driver is pointless for a custom build. Do they not recommend changing kernel config options to optimize the kernel?
 
Old 09-20-2005, 12:14 PM   #17
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi ciotog,

Before recompiling kernel I made following test;

download alsa-driver-1.0.10rc1.tar.bz2 from
ftp://ftp.alsa-project.org/pub/driver/

bash-3.00$ cat /proc/asound/oss/sndstat
Code:
Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code)
Kernel: Linux localhost.localdomain 2.6.11.12-try2 #1 SMP Fri Aug 26
23:45:04 HKT 2005 i686
Config options: 0

Installed drivers:
Type 10: ALSA emulation

Card config:
VIA 8233-Pre with ALC200/200P at 0xe400, irq 5

Audio devices:
0: VIA 8233-Pre (DUPLEX)

Synth devices: NOT ENABLED IN CONFIG

Midi devices: NOT ENABLED IN CONFIG

Timers:
7: system timer

Mixers:
0: Realtek ALC200/200P rev 0
bash-3.00$ cd /sources/
bash-3.00$ tar jxf alsa-driver-1.0.10rc1.tar.bz2
bash-3.00$ cd alsa-driver-1.0.10rc1
bash-3.00$ ./configure --with-sequencer=yes
Code:
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /bin/install -c
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking for current directory... /sources/alsa-driver-1.0.10rc1
checking cross compile...
checking for directory with kernel source...
/lib/modules/2.6.11.12-try2/source
checking for directory with kernel build...
/lib/modules/2.6.11.12-try2/build
checking for kernel linux/version.h... yes
checking for kernel linux/autoconf.h... yes
checking for kernel version... 2.6.11.12-try2
checking for GCC version... Kernel compiler: gcc 3.4.3 Used compiler:
gcc (GCC) 3.4.3
checking for built-in ALSA... "yes"
configure: error: You have built-in ALSA in your kernel.
bash-3.00$
It seems having built-in ALSA in the kernel. Whether to disable it?

BR
satimis
 
Old 09-20-2005, 12:33 PM   #18
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I've build everything I need in the ALSA tree as modules (except OSS Sequencer API doesn't show as a module with menuconfig for some reason...), then you don't really need to get alsa-driver, and the rest of the setup process should work fine. Most of the ALSA setup documentaion assumes that you're using all modules, that's partly why you're running in to so much trouble.
 
Old 09-21-2005, 10:54 AM   #19
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi ciotog,

I'm prepared to recompile kernel. Hereinunder is the part of kernel configure (./configure) considered relating to sound;
Code:
# General setup
CONFIG_SYSCTL=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_HOTPLUG=y

# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_IRQBALANCE=y
CONFIG_HAVE_DEC_LOCK=y
# CONFIG_REGPARM is not set

# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set

# Plug and Play support
#
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

# SCSI device support
#
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y

# Input device support
#
CONFIG_INPUT=y

# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set

# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

# Sound
#
CONFIG_SOUND=y

# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

# Generic devices
#
CONFIG_SND_MPU401_UART=m
CONFIG_SND_OPL3_LIB=m
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

# PCI devices
#
CONFIG_SND_AC97_CODEC=y
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
CONFIG_SND_EMU10K1=m
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
CONFIG_SND_YMFPCI=m
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=y
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
CONFIG_SND_VIA82XX=m
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set

# Open Sound System
#
# CONFIG_SOUND_PRIME is not set

# USB support
#
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y
Please advise which items have to be as module and which items just to be turned on only. TIA

BR
satimis
 
Old 09-21-2005, 12:40 PM   #20
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I would recommend going through everything from "Sound card support" down and change [b]all[b] built-in to module. You can also drop Intel8x0, ymfpci and emu10k1 since they don't apply to your hardware, but having the modules built won't hurt, they just won't be used.

Having said that, I prefer building just about everything else that isn't required at boot time as modules as well - for example the cd-rom filesystems, SCSI (unless you have a SCSI HDD), etc. Here's my lsmod output:
Code:
Module                  Size  Used by
vfat                   10816  0 
fat                    45916  1 vfat
usb_storage            30404  0 
ndiswrapper           170452  0 
nfsd                   92104  0 
exportfs                4992  1 nfsd
nfs                    96044  0 
lockd                  61608  2 nfsd,nfs
sunrpc                128260  3 nfsd,nfs,lockd
it87                   25248  0 
i2c_sensor              2944  1 it87
i2c_isa                 1728  0 
sd_mod                 13200  0 
scsi_mod               84104  2 usb_storage,sd_mod
ide_floppy             17216  0 
ide_cd                 38404  0 
cdrom                  38048  1 ide_cd
joydev                  7872  0 
analog                 10144  0 
psmouse                28612  0 
8250_pnp                8064  0 
8250                   21636  1 8250_pnp
serial_core            19200  1 8250
floppy                 53780  0 
pcspkr                  3204  0 
snd_emu10k1           116228  0 
snd_util_mem            3328  1 snd_emu10k1
snd_hwdep               7200  1 snd_emu10k1
emu10k1_gp              2688  0 
uhci_hcd               30284  0 
ehci_hcd               44936  0 
usbcore               119676  5 usb_storage,ndiswrapper,uhci_hcd,ehci_hcd
i2c_viapro              6608  0 
snd_via82xx            24256  3 
gameport               12040  4 analog,emu10k1_gp,snd_via82xx
snd_ac97_codec         81404  2 snd_emu10k1,snd_via82xx
snd_pcm                81480  4 snd_emu10k1,snd_via82xx,snd_ac97_codec
snd_timer              21508  2 snd_emu10k1,snd_pcm
snd_page_alloc          7620  3 snd_emu10k1,snd_via82xx,snd_pcm
snd_mpu401_uart         6336  1 snd_via82xx
snd_rawmidi            20704  2 snd_emu10k1,snd_mpu401_uart
snd_seq_device          7180  2 snd_emu10k1,snd_rawmidi
snd                    46628  14 snd_emu10k1,snd_hwdep,snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               7456  1 snd
via_rhine              20164  0 
mii                     4544  1 via_rhine
nvidia               3916732  12 
rtc                    10552  0
You also want to enable module unloading. In the spirit of LFS you should really go through every single entry in config, read what it's about and then make your decision whether it's necessary for your hardware. It's time consuming, but definitely worth the effort!
 
Old 09-27-2005, 10:15 AM   #21
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi ciotog and folks,

To my surprise after installing XMMS, I can play music CD. I haven't recompiled the kernel to up the respective SND modules yet. What I did were as follows;

On xterm ran following commands;

# amixer set Master 80% unmute
# amixer set CD 80% unmute

Then I can play music CD on XMMS. I still have following problems unsolved.

1) Each time booting up the box I have to run the above commands again. Is there a way to set "unmute" permanent.

2) I have to start XMMS as root
$ ls -l /usr/bin/alsamixer
Code:
-rwxr-xr-x  1 root root 61555 Sep 20 06:59 /usr/bin/alsamixer
which of the following method will be more appropriate to allow "satimis" playing music CD

a) # chown satimis:satimis /usr/bin/alsamixer
OR
b) # chown root:alsamixer /usr/bin/alsamixer
# groupadd alsamixer

Please shed me some light.


Installed "timidity" to play midi files. Unfortunately it did work. I made following test;

bash-3.00$ timidity -Aas Midi_Guitar/
Code:
Couldn't open output device
bash-3.00$ which timidity
Code:
/usr/local/bin/timidity
bash-3.00$ ls -l /usr/local/bin/timidity
Code:
-rwxrwxr-x  1 satimis satimis 874598 Sep 20 08:24 /usr/local/bin/timidity
I have no idea whether it is the problem of its installation or something else. "timidity" works on FC3, the host, without problem.

I already ran following commands

# amixer set PCM 80% unmute
# amixer set Line 80% unmute

Any advice would be appreciated. TIA

BR
satimis
 
Old 09-27-2005, 06:41 PM   #22
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I imagine LFS uses BSD style init scripts, so you should have the file /etc/rc.d/rc.local - this is where you'd put any local initialization like
Code:
alsactl --restore
This would have to be after you've got the alsa settings set and saved using
Code:
alsactl --store
If you have to run xmms as root, check the permissions on xmms. For security reasons you shouldn't have alsamixer or xmms owned by anyone but root. I think it would be beneficial to finish installing alsa (are there any snd- entries in /etc/modules.conf?)
 
Old 09-28-2005, 05:01 AM   #23
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi ciotog,

Quote:
I imagine LFS uses BSD style init scripts, so you should have the file /etc/rc.d/rc.local - this is where you'd put any local initialization like
Code:
alsactl --restore
This would have to be after you've got the alsa settings set and saved using
Code:
alsactl --store
Sorry, can't find "rc.local"

bash-3.00$ ls /etc/rc.d/
Code:
init.d  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rcs
bash-3.00$ ls /etc/rc.d/init.d/
Code:
alsa     console    halt      modules      network  sendsignals  sysctl    udev
checkfs  cups       hotplug   mountfs      rc       setclock     sysklogd
cleanfs  functions  localnet  mountkernfs  reboot   swap
Quote:
If you have to run xmms as root, check the permissions on xmms
xmms can be started as User/satimis but music CD could not be found. However as root it worked. Music can be played.

Quote:
I think it would be beneficial to finish installing alsa (are there any snd- entries in /etc/modules.conf?)
Kernel recompiled with all SND selected as module.
Code:
 <M> Advanced Linux Sound Architecture
 <M> Sequencer support
 < >   Sequencer dummy client
 <M> OSS Mixer API
 <M> OSS PCM (digital audio) API[*] OSS Sequencer API
 [ ] Verbose printk
 [ ] Debug

PCI devices ->(select)
 <M> VIA 82C686A/B, 8233/8235 AC97 Controller (original, no altered)
"[*] OSS Sequencer API" can't be selected as module.

Test performed after rebooting BLFS 6.1 as follows;

bash-3.00$ timidity Midi_Guitar/
Code:
Couldn't open output device
bash-3.00$ su
Password:
root@localhost:/home/satimis# timidity Midi_Guitar/
Code:
Couldn't open output device
root@localhost:/home/satimis# depmod -a
root@localhost:/home/satimis# modprobe snd-MODULES
Code:
FATAL: Module snd_MODULES not found.
root@localhost:/home/satimis# modprobe snd-modules
Code:
FATAL: Module snd_modules not found.
root@localhost:/home/satimis# modprobe snd-MODULE
Code:
FATAL: Module snd_MODULE not found.
root@localhost:/home/satimis# modprobe snd-module
Code:
FATAL: Module snd_module not found.
root@localhost:/home/satimis# modprobe snd-pcm-oss
root@localhost:/home/satimis# modprobe snd-seq-oss
root@localhost:/home/satimis# timidity Midi_Guitar/
Code:
/usr/local/share/timidity/timidity.cfg: No such file or directory
timidity: Can't read any configuration file.
Please check /usr/local/share/timidity/timidity.cfg
It seems "timidity" got some problem. I'll install another midi-player to try after settling all remaining problems.

I have to run following commands before I can play music CD
root@localhost:/home/satimis# amixer set Master 80% unmute
root@localhost:/home/satimis# amixer set CD 80% unmute
root@localhost:/home/satimis# amixer set PCM 80% unmute
The last one is for midi-player

Quote:
are there any snd- entries in /etc/modules.conf?
root@localhost:/home/satimis# ls -l /etc/ | grep modules.conf
(no printout)
root@localhost:/home/satimis# find / -name modules.conf
Code:
find: WARNING: Hard link count is wrong for /proc: this may be a bug in your filesystem driver.  Automatically turning on find's -noleaf option.  Earlier results may have failed to include directories that should have been searched.
How to test the sound server at boot to play a short tune? TIA

BR
satimis
 
Old 09-28-2005, 10:58 AM   #24
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I was wrong, LFS suggests you use SysV init scripts rather than BSD. You'll have to research where to put your local initializations.

I'm also not sure how your system is handling module loading on startup - it would probably be beneficial to check out information about modutils and module-init-tools. I'm pretty sure that ALSA is assuming you have /etc/modules.conf and / or /etc/modprobe.conf - if you're using a different module loading scheme (such as using /etc/sysconfig/modules) you'll probably have to add entries for ALSA yourself.

One other thing, there is no module called snd-modules or snd-module. If you're trying to load all the sound modules you'll have to do each individually.
 
Old 09-30-2005, 02:15 PM   #25
Whitesocks
Member
 
Registered: Sep 2005
Posts: 30

Rep: Reputation: 15
For restoring the sound levels at boot, you can use the recommended bootscript from the alsa-utils setup instructions:

http://www.linuxfromscratch.org/blfs...lsa-utils.html

You can skip the "alsactl --restore" part of ciotog's instructions if you are using the bootscript and have followed the instructions on the above page to add the dev.d script and so on.

Last edited by Whitesocks; 09-30-2005 at 02:17 PM.
 
Old 09-30-2005, 10:57 PM   #26
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi Whitesocks,

Alsa is now working properly. I can play midi files with Timidity as well as music CD.


Quote:
For restoring the sound levels at boot, you can use the recommended bootscript from the alsa-utils setup instructions:

http://www.linuxfromscratch.org/blfs...lsa-utils.html
I already completed this page previously.

The remaining problem is where to put following commands;
Code:
modprobe snd-pcm-oss
modprobe snd-pcm-oss
amixer set Master 80% unmute
amixer set CD 80% unmute
amixer set PCM 80% unmute
amixer set Line 80% unmute
So that they can be evoked at boot.

BR
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
playing midi is harder to setup than it seems to be thinhla Linux - Software 4 07-02-2005 01:15 PM
Playing MIDI files under Mandrake KhmerDucky Linux - Software 1 06-09-2005 10:13 PM
Playing Midi in SuSE 9.2 Mic Q Suse/Novell 5 01-12-2005 06:47 PM
how to play midi file salahuddin_66 Slackware 6 05-12-2004 06:02 AM
Playing MIDI files rajan_kanwar Linux - Software 1 02-05-2004 05:46 AM


All times are GMT -5. The time now is 11:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration