Tricks of OSS installation to gentoo and funtoo
Posted: Sat Jan 09, 2016 8:34 pm
ATTENTION! It turned out that installing oss from funtoo-media overlay with production quality is not so easy! I am more than sure that it installed by default quality 3. The procedure that was given in this forum implying
ebuild oss...-.ebuild unpack
ebuild oss...-.ebuild compile
ebuild oss...-.ebuild install
ebuild oss...-.ebuild qmerge
IS WRONG AND DOES NOT WORK! If you modify configure file within .../work/oss-*/ folder and then issue ebuild ../../...../oss...-.ebuild compile GRC_QUALITY in the configure file WILL BE RESET TO 3! Moreover all instances of local_config.h will have only 3s!
The correct procedure is the following:
1. Backup alsa modules if you intend to use alsa for midi input - oss removes them and u will have to copy them back after oss installation. But this topic is covered in another place of the forum. You are sure to read it. So...
After adding funtoo-media overlay issue the command:
emerge -pv oss
to see the use flags that are proposed to you.
2. Edit /etc/portage/package.use/package.use to set the flags you want. I have such flags:
media-sound/oss gtk -salsa vmix-float -alsa -pax_kernel ogg -midi oss_cards_envy24ht oss_cards_sblive
Beware that you may have different cards in your chassis. Leave all other flags like mine.
3. Switch to gcc 4 if currently it's gcc5 by
gcc-config -l
gcc-config NUMBER
source /etc/profile
4. Go to the ebuild directory. Mine is /var/db/funtoo-media/media-sound/oss
(to have the same location you should cd to /var/db before doing git clone ...url-of-funtoo-media)
Issue two commands:
ebuild oss*.ebuild unpack
ebuild oss*.ebuild prepare
Only after prepare you should modify the configure file to avoid resetting to 3!
5. Modify configure file.
leafpad /var/tmp/portage/media-sound/oss-4.2.2011/work/oss-v4.2-build2011-src-gpl/configure
Change 3 by 6 for GRC.
6. Issue
ebuild oss*.ebuild compile
7. Now its time to check if our modifications were observed. Go to the build dir which located inside the work dir.
cd /var/tmp/portage/media-sound/oss-4.2.2011/work/build
and do:
less ./noregparm/kernel/framework/include/local_config.h
less ./prototype/usr/lib/oss/include/internals/local_config.h
less ./kernel/framework/include/local_config.h
YOU ARE TO HAVE ONLY 6 for quality!
8. Return back to the dir where ebuild is located:
cd -
and issue:
ebuild oss*.ebuild install
ebuild oss*.ebuild qmerge
This will install the driver.
9. You may switch back to gcc5 now.
10. ossdetect -v
11. soundon
12. ossdevlinks -v -r
13. Now as a user (not as a root) you may issue
ossxmix -b -n 1 &
to start ossxmix.
ebuild oss...-.ebuild unpack
ebuild oss...-.ebuild compile
ebuild oss...-.ebuild install
ebuild oss...-.ebuild qmerge
IS WRONG AND DOES NOT WORK! If you modify configure file within .../work/oss-*/ folder and then issue ebuild ../../...../oss...-.ebuild compile GRC_QUALITY in the configure file WILL BE RESET TO 3! Moreover all instances of local_config.h will have only 3s!
The correct procedure is the following:
1. Backup alsa modules if you intend to use alsa for midi input - oss removes them and u will have to copy them back after oss installation. But this topic is covered in another place of the forum. You are sure to read it. So...
After adding funtoo-media overlay issue the command:
emerge -pv oss
to see the use flags that are proposed to you.
2. Edit /etc/portage/package.use/package.use to set the flags you want. I have such flags:
media-sound/oss gtk -salsa vmix-float -alsa -pax_kernel ogg -midi oss_cards_envy24ht oss_cards_sblive
Beware that you may have different cards in your chassis. Leave all other flags like mine.
3. Switch to gcc 4 if currently it's gcc5 by
gcc-config -l
gcc-config NUMBER
source /etc/profile
4. Go to the ebuild directory. Mine is /var/db/funtoo-media/media-sound/oss
(to have the same location you should cd to /var/db before doing git clone ...url-of-funtoo-media)
Issue two commands:
ebuild oss*.ebuild unpack
ebuild oss*.ebuild prepare
Only after prepare you should modify the configure file to avoid resetting to 3!
5. Modify configure file.
leafpad /var/tmp/portage/media-sound/oss-4.2.2011/work/oss-v4.2-build2011-src-gpl/configure
Change 3 by 6 for GRC.
6. Issue
ebuild oss*.ebuild compile
7. Now its time to check if our modifications were observed. Go to the build dir which located inside the work dir.
cd /var/tmp/portage/media-sound/oss-4.2.2011/work/build
and do:
less ./noregparm/kernel/framework/include/local_config.h
less ./prototype/usr/lib/oss/include/internals/local_config.h
less ./kernel/framework/include/local_config.h
YOU ARE TO HAVE ONLY 6 for quality!
8. Return back to the dir where ebuild is located:
cd -
and issue:
ebuild oss*.ebuild install
ebuild oss*.ebuild qmerge
This will install the driver.
9. You may switch back to gcc5 now.
10. ossdetect -v
11. soundon
12. ossdevlinks -v -r
13. Now as a user (not as a root) you may issue
ossxmix -b -n 1 &
to start ossxmix.