PulseAudio su slackware

Postate qui se avete consigli per migliorare i pacchetti disponibili in questo sito o se avete problemi con installazione, funzionamento o altro.

Moderatore: Staff

Regole del forum
1) Citare in modo preciso il nome del pacchetto.
2) Specificare se discussione/suggerimento o richiesta d'aiuto.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Avatar utente
ZeroUno
Staff
Staff
Messaggi: 4948
Iscritto il: ven giu 02, 2006 14:52
Nome Cognome: Matteo Rossini
Slackware: current
Kernel: slack-current
Desktop: ktown-latest
Distribuzione: 01000000-current
Località: Roma / Castelli
Contatta:

PulseAudio su slackware

Messaggioda ZeroUno » dom ago 24, 2014 17:17

Usiamo il presente topic per discutere al meglio la creazione del pacchetto PulseAudio.
La discussione è cominciata sul topic di Skype (che ora lo necessita), ma è meglio continuare in questo topic dedicato.

E' possibile fare il pacchetto meno intrusivo possibile, cioè senza ricompilare alcun pacchetto di slackware?
Packages finder: slakfinder.org | Slackpkg+, per aggiungere repository a slackpkg

Codice: Seleziona tutto

1011010 1100101 1110010 1101111 - 0100000 - 1010101 1101110 1101111

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 18:08

Allora sto preparando un'instalalzione in chroot, per l'invasività dipende
per quanto riguarda gstreamer non c'è problema si può creare un pacchetto aggiuntivo, io finora ho ricompilato phonon kmix e kde-runtime, probabilmente phonon non è necessario in quando dovrebbe bastare gstreamer, kmix va ricompilato per permettere di vedere i controlli del volume di pulseaudio e kde runtime contiene il modulo kcm per gestire i canali dal centro di controllo di kde, ora faccio un qualche test e inizio a postare una bozza degli slackbuild necessari

Avatar utente
ZeroUno
Staff
Staff
Messaggi: 4948
Iscritto il: ven giu 02, 2006 14:52
Nome Cognome: Matteo Rossini
Slackware: current
Kernel: slack-current
Desktop: ktown-latest
Distribuzione: 01000000-current
Località: Roma / Castelli
Contatta:

Re: PulseAudio su slackware

Messaggioda ZeroUno » dom ago 24, 2014 18:16

c'è uno su linuxquestions, nel topic di skype, che ha dato una lista di pacchetti che ha compilato (da SBo):
alsa-plugins-1.0.26-x86_64-1_SBo.tgz
atkmm-2.22.7-x86_64-1_SBo.tgz
avahi-0.6.31-x86_64-1_SBo.tgz
cairomm-1.10.0-x86_64-1_SBo.tgz
glibmm-2.36.2-x86_64-1_SBo.tgz
gtkmm-2.24.4-x86_64-1_SBo.tgz
gtkmm3-3.8.1-x86_64-1_SBo.tgz
jack-audio-connection-kit-0.124.1-x86_64-1_SBo.tgz
json-c-0.11-x86_64-1_SBo.tgz
libasyncns-0.8-x86_64-1_SBo.tgz
libdaemon-0.14-x86_64-1_SBo.tgz
libglademm-2.6.7-x86_64-2_SBo.tgz
libsigc++-2.2.11-x86_64-1_SBo.tgz
lirc-0.9.0_3.10.17-x86_64-3_SBo.tgz
mm-common-0.9.6-noarch-1_SBo.tgz
opus-1.1-x86_64-1_SBo.tgz
orc-0.4.19-x86_64-1_SBo.tgz
pangomm-2.34.0-x86_64-1_SBo.tgz
pavucontrol-2.0-x86_64-1_SBo.tgz
pulseaudio-5.0-x86_64-1_SBo.tgz
speex-1.2rc1-x86_64-3_SBo.tgz

e questo è il etc/pulse/default.pa


Codice: Seleziona tutto

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio 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 of the License, or
# (at your option) any later version.
#
# PulseAudio 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
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif


### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

### Make some devices default
#set-default-sink output
#set-default-source input
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop



l'ho scaricati ma non ho provato ancora perchè presume le multilib di alien (visto che il tutto è finalizzato a skype).

edit:
un altro ha compilato solo speex json-c pulseaudio
Packages finder: slakfinder.org | Slackpkg+, per aggiungere repository a slackpkg

Codice: Seleziona tutto

1011010 1100101 1110010 1101111 - 0100000 - 1010101 1101110 1101111

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 19:08

per un'installazione base oltre a speex json-c e pulseaudio ci vuole anche alsa-plugins per far passare le applicazioni alsa da pulseaudio ed evitare crash dell'audio

speex c'è nei repo di slacky

per json-c ecco lo slackbuild slacky style:

json-c.SlackBuild

Codice: Seleziona tutto

#!/bin/bash
 
# Heavily based on the Slackware 14.1 SlackBuild
# Written by Elia Devito ( eliadevito [at] yahoo.it )
# Last build from Elia Devito ( eliadevito [at] yahoo.it )
 
# Slackware build script for json-c
# Official Site: https://github.com/json-c/json-c/wiki

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Require:

set -e

# Basic information.

PKGNAME=json-c
VERSION=${VERSION:-0.11}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
ARCH=${ARCH:-i486}
SOURCE="https://s3.amazonaws.com/json-c_releases/releases/${PKGNAME}-${VERSION}.tar.gz"
TAR=      # empty = auto
DIR=      # empty = auto
DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README* doc/html"
SLKFILES=""

# Automatically determine the architecture we're building on:
case "$ARCH" in
     i?86) export ARCH=i486; SLKCFLAGS="-O2 -march=i486 -mtune=i686"; CHOST="i486-slackware-linux" ;;
   x86_64) SLKCFLAGS="-O2 -fPIC"; LIBDIRSUFFIX="64"; CHOST="x86_64-slackware-linux" ;;
     arm*) export ARCH=arm; SLKCFLAGS="-O2 -march=armv5te"; CHOST="arm-slackware-linux-gnueabi" ;;
# Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
esac

# If EULA
if [ -e EULA.TXT ];then
   more EULA.TXT
   echo "Do you accept terms? (yes/[no])"
   read ACCEPT
   if [ "$ACCEPT" != "yes" ];then
      echo; echo "SlackBuild Aborted!!"
      exit 1
   fi
fi

# Do not touch following if not needed
JOBS=${JOBS:--j2}
CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=$TMP/package-$PKGNAME
OUTPUT=${OUTPUT:-$CWD}
TAR=${TAR:-$(basename $SOURCE)}
DIR=${DIR:-$(echo "$TAR"|sed -r 's/(\.tar|)(.gz|.bz2|.xz|.tgz|)$//')}

if [ ! -e $CWD/$TAR ];then
   wget $SOURCE -O "$CWD/$TAR"
fi

### Preparing Source
rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$TAR
cd $DIR

chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$CFLAGS $SLKCFLAGS" \
CXXFLAGS="$CXXFLAGS $SLKCFLAGS" \
./configure \
   --prefix=/usr \
   --libdir=/usr/lib$LIBDIRSUFFIX \
   --docdir=/usr/doc/$PKGNAME-$VERSION \
   --sysconfdir=/etc \
   --localstatedir=/var \
   --mandir=/usr/man \
   --build=$CHOST \
   --disable-static

make $JOBS
make install-strip DESTDIR=$PKG


# Documentation
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
 
for DC in $DOCS;do
   [ -e $DC ] && cp -r $DC $PKG/usr/doc/$PKGNAME-$VERSION/ || true
done
 
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild
 
cd $CWD
for SB in $PKGNAME.SlackBuild slack-desc doinst.sh doinst.sh.gz EULA.TXT $SLKFILES;do
   [ -e "$SB" ] && cp -r $SB $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/$SB || true
done

for i in man info
do
    if [ -d $PKG/usr/$i ]; then
         cd $PKG/usr/$i
      find . -type f -exec gzip -9 {} \;
      for file in $( find . -type l ) ; do ln -s $( readlink $file ).gz $file.gz ; rm $file ; done
      [ "$i" == "info" ] && rm -f dir
    fi
done
   
cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
[ -e $CWD/doinst.sh ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh
[ -e $CWD/doinst.sh.gz ] && zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ];then
   requiredbuilder -y -v -s $CWD $PKG
   [ -e install/slack-required ] && cat install/slack-required > $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/slack-required
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

if [ "$1" = "--cleanup" ]; then
   rm -rf $TMP
fi


slack-desc:

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

      |-----handy-ruler------------------------------------------------------|
json-c: json-c (JSON library in C)
json-c:
json-c: json-c implements a reference counting object model that allows you
json-c: to easily construct JSON objects in C.
json-c:
json-c: Website : http://oss.metaparadigm.com/json-c/
json-c:
json-c:
json-c:
json-c:
json-c:


ora sto adattando il mio slackbuild di pulseaudio allo stile guida slacky appena pronto lo posto

rik70
Master
Master
Messaggi: 1704
Iscritto il: gio mar 10, 2011 9:21
Slackware: 14.1
Kernel: 4.0.x-smp
Desktop: Xfce 4.12

Re: PulseAudio su slackware

Messaggioda rik70 » dom ago 24, 2014 19:20

Se può interessare, sono su slack 14.1 32-bit e ho installato tutto tramite sbopkg.

Quindi prima di tutto le dipendenze specificate nello SlackBuild:

1 - json-c

2 - speex

Infine, pulseaudio.

Attenzione: per farlo funziomare poi ho dovuto fare:

Codice: Seleziona tutto

set-default-sink 0

Codice: Seleziona tutto

set-default-source 0


Il primo comando imposta l'uscita predefinita, il secondo l'ingresso. Nel mio caso l'ingresso audio è quello di una webcam, che per qualche motivo pulseaudio vede come primo nella lista dei possibili. Quel 0 è l'indice del dispositivo come rilevato da pulse.

Questi comandi dovrebbero aiutare:

Codice: Seleziona tutto

pactl list sinks
pactl list sources


Quindi occhio, perché io non ho dovuto compilare altro.

Ciao

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 19:27

se usi un'applicazione alsa insieme a una pulseaudio funzionano entrambe?

rik70
Master
Master
Messaggi: 1704
Iscritto il: gio mar 10, 2011 9:21
Slackware: 14.1
Kernel: 4.0.x-smp
Desktop: Xfce 4.12

Re: PulseAudio su slackware

Messaggioda rik70 » dom ago 24, 2014 19:34

ScorpionIT ha scritto:se usi un'applicazione alsa insieme a una pulseaudio funzionano entrambe?

Ciao.

No ovviamente assieme non vanno. Però nel mio caso non accade mai: i suoni di sistema di skype sono tutti disabilitati ed è difficile che ascolti altro audio mentre sono in conversazione.

Ad ogni modo sul wiki di Archlinux è spiegato un trucco che dovrebbe impedire che pulse interferisca con alsa.

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 19:37

si lo avevo visto ma non ho avuto modo di provarlo, comunque se ti interessa far andare tutti e 2 devi aggiungere alla tua installazione alsa-plugins e aggiungere in /etc

asound.conf:

Codice: Seleziona tutto

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}

rik70
Master
Master
Messaggi: 1704
Iscritto il: gio mar 10, 2011 9:21
Slackware: 14.1
Kernel: 4.0.x-smp
Desktop: Xfce 4.12

Re: PulseAudio su slackware

Messaggioda rik70 » dom ago 24, 2014 19:45

ScorpionIT ha scritto:si lo avevo visto ma non ho avuto modo di provarlo, comunque se ti interessa far andare tutti e 2 devi aggiungere alla tua installazione alsa-plugins e aggiungere in /etc

asound.conf:

Codice: Seleziona tutto

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}


Ok, ti ringrazio. In questo modo tutto dovrebbe passare per pulse, giusto?
Dici che ne "vale la pena" sulla slack? Pulseaudio è un corpo estraneo ^_^

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 19:48

. io ormai l'ho compilo da un pò di tempo, sulla mia installazione ho anche kmix kde-runtime il plugin per gstreamer e phonon per integrarlo con kde
la gestione dei volumi separata è comoda anche se non essenziale

EDIT:
Ecco lo slackbuild per pulseaudio, a differenza di quello di slackbuild questo non necessita dell'utente e del gruppo pulse in quanto viene l'anciato con permessi user e non come servizio di sistema, ora preparo alsa-plugins è come installazione base ci siamo

EDIT2:
avevo dimenticato -c -b a requirebuilder
Offtopic: come mai ultimamente slacky.eu è ento a caricare?

pluseaudio.SlackBuild

Codice: Seleziona tutto

#!/bin/bash
 
# Heavily based on the Slackware 14.1 SlackBuild
# Written by Elia Devito ( eliadevito [at] yahoo.it )
# Last build from Elia Devito ( eliadevito [at] yahoo.it )
 
# Slackware build script for pulseaudio
# Official Site: http://www.pulseaudio.org

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Require:

set -e

# Basic information.

PKGNAME=pulseaudio
VERSION=${VERSION:-5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
ARCH=${ARCH:-i486}
SOURCE="http://freedesktop.org/software/pulseaudio/releases/${PKGNAME}-${VERSION}.tar.xz"
TAR=      # empty = auto
DIR=      # empty = auto
DOCS="LGPL GPL LICENSE README"
SLKFILES=""

# Automatically determine the architecture we're building on:
case "$ARCH" in
     i?86) export ARCH=i486; SLKCFLAGS="-O2 -march=i486 -mtune=i686"; CHOST="i486-slackware-linux" ;;
   x86_64) SLKCFLAGS="-O2 -fPIC"; LIBDIRSUFFIX="64"; CHOST="x86_64-slackware-linux" ;;
     arm*) export ARCH=arm; SLKCFLAGS="-O2 -march=armv5te"; CHOST="arm-slackware-linux-gnueabi" ;;
# Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
esac

# If EULA
if [ -e EULA.TXT ];then
   more EULA.TXT
   echo "Do you accept terms? (yes/[no])"
   read ACCEPT
   if [ "$ACCEPT" != "yes" ];then
      echo; echo "SlackBuild Aborted!!"
      exit 1
   fi
fi

# Do not touch following if not needed
JOBS=${JOBS:--j2}
CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=$TMP/package-$PKGNAME
OUTPUT=${OUTPUT:-$CWD}
TAR=${TAR:-$(basename $SOURCE)}
DIR=${DIR:-$(echo "$TAR"|sed -r 's/(\.tar|)(.gz|.bz2|.xz|.tgz|)$//')}

if [ ! -e $CWD/$TAR ];then
   wget $SOURCE -O "$CWD/$TAR"
fi

### Preparing Source
rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$TAR
cd $DIR

chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$CFLAGS $SLKCFLAGS" \
CXXFLAGS="$CXXFLAGS $SLKCFLAGS" \
./bootstrap.sh \
    --prefix=/usr \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --mandir=/usr/man \
    --build=$CHOST \
    --disable-tcpwrap \
    --disable-static

make check
make $JOBS
make install-strip DESTDIR=$PKG

mv $PKG/etc/pulse/client.conf $PKG/etc/pulse/client.conf.new
mv $PKG/etc/pulse/default.pa $PKG/etc/pulse/default.pa.new
mv $PKG/etc/pulse/system.pa $PKG/etc/pulse/system.pa.new
mv $PKG/etc/pulse/daemon.conf $PKG/etc/pulse/daemon.conf.new

# Documentation
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
 
for DC in $DOCS;do
   [ -e $DC ] && cp -r $DC $PKG/usr/doc/$PKGNAME-$VERSION/ || true
done
 
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild
 
cd $CWD
for SB in $PKGNAME.SlackBuild slack-desc doinst.sh doinst.sh.gz EULA.TXT $SLKFILES;do
   [ -e "$SB" ] && cp -r $SB $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/$SB || true
done

for i in man info
do
    if [ -d $PKG/usr/$i ]; then
         cd $PKG/usr/$i
      find . -type f -exec gzip -9 {} \;
      for file in $( find . -type l ) ; do ln -s $( readlink $file ).gz $file.gz ; rm $file ; done
      [ "$i" == "info" ] && rm -f dir
    fi
done


mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
[ -e $CWD/doinst.sh ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh
[ -e $CWD/doinst.sh.gz ] && zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ];then
   requiredbuilder -y -v -s -c -b $CWD $PKG
   [ -e install/slack-required ] && cat install/slack-required > $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/slack-required
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

if [ "$1" = "--cleanup" ]; then
   rm -rf $TMP
fi


doinst.sh

Codice: Seleziona tutto

config() {
   NEW="$1"
   OLD="$(dirname $NEW)/$(basename $NEW .new)"
   # If there's no config file by that name, mv it over:
   if [ ! -r $OLD ]; then
      mv $NEW $OLD
   elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
      # toss the redundant copy
      rm $NEW
   fi
}

config etc/pulse/client.conf.new
config etc/pulse/default.pa.new
config etc/pulse/system.pa.new
config etc/pulse/daemon.conf.new


slack-desk

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

          |-----handy-ruler------------------------------------------------------|
pulseaudio: pulseaudio (PulseAudio Sound Server)
pulseaudio:
pulseaudio: pulseaudio is a networked sound server for Linux and other
pulseaudio: Unix like operating systems and Microsoft Windows. It is
pulseaudio: intended to be an improved drop-in replacement for the
pulseaudio: Enlightened Sound Daemon (ESOUND).
pulseaudio:
pulseaudio: Website : http://www.pulseaudio.org
pulseaudio:
pulseaudio:
pulseaudio:

Avatar utente
ZeroUno
Staff
Staff
Messaggi: 4948
Iscritto il: ven giu 02, 2006 14:52
Nome Cognome: Matteo Rossini
Slackware: current
Kernel: slack-current
Desktop: ktown-latest
Distribuzione: 01000000-current
Località: Roma / Castelli
Contatta:

Re: PulseAudio su slackware

Messaggioda ZeroUno » dom ago 24, 2014 20:03

ma con la sola json-c,speex,pulseaudio il volume è controllabile da kmix (anche se non con volumi separati)?

Ma eventualmente si può circoscrivere pulseaudio ad una sola applicazione? cioè "tutto passa per alsa a meno che non specifico in qualche modo che deve passare per pulse".

Al momento sono su una chroot 14.1 64bit pulita ma di solito uso una -current con kde di alien.
Pensi ci siano problemi ad utilizzare su questa i pacchetti per 14.1 o potrebbero non funzionare?
Packages finder: slakfinder.org | Slackpkg+, per aggiungere repository a slackpkg

Codice: Seleziona tutto

1011010 1100101 1110010 1101111 - 0100000 - 1010101 1101110 1101111

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 20:19

si può provare il workaround che c'è sul sito wiki di archlinux (parte kmix esclusa),
[url]
https://wiki.archlinux.org/index.php/Pu ... heda_audio[/url]

kmix continua a controllare il volume di alsa, il problema e che con solo json-c spex e pulseaudio, se si prova a far andare una applicazione che usa alsa e una che usa pulse insieme salta l'audio, ci vuole almeno alsa-plugins. tecnicamente potrebbe bastare anche solo alsa-plugin e al massimo chi vuole i volumi separati installa pavucontrol o si ricompila kmix.

EDIT: kmix kde-runtime phonon e gstreamer sono facoltativi

EDIT2:
Slackbuild per alsa-plugins, il pachetto configura automaticamente alsa per funzionare tramite pulseaudio, per fare ciò a differenza di quanto detto prima a rik70 non è necessario il file asound.conf in quanto ho notata che nel sorgente c'era una config d'esempio per pulseaudio in usr/share/alsa/alsa.conf.d che bastava rinominare togliendo il .example

per essere compilato richiede ffmpeg presente sul repo di slacky

alsa-plugins.SlackBuild

Codice: Seleziona tutto

#!/bin/bash
 
# Heavily based on the Slackware 14.1 SlackBuild
# Written by Elia Devito ( eliadevito [at] yahoo.it )
# Last build from Elia Devito ( eliadevito [at] yahoo.it )
 
# Slackware build script for alsa-plugins
# Official Site: http://www.alsa-project.org

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Require:

set -e

# Basic information.

PKGNAME=alsa-plugins
VERSION=${VERSION:-1.0.26}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
ARCH=${ARCH:-i486}
SOURCE="http://alsa.cybermirror.org/plugins/${PKGNAME}-${VERSION}.tar.bz2"
TAR=      # empty = auto
DIR=      # empty = auto
DOCS="doc/*"
SLKFILES="ffmpeg.patch"

# Automatically determine the architecture we're building on:
case "$ARCH" in
     i?86) export ARCH=i486; SLKCFLAGS="-O2 -march=i486 -mtune=i686"; CHOST="i486-slackware-linux" ;;
   x86_64) SLKCFLAGS="-O2 -fPIC"; LIBDIRSUFFIX="64"; CHOST="x86_64-slackware-linux" ;;
     arm*) export ARCH=arm; SLKCFLAGS="-O2 -march=armv5te"; CHOST="arm-slackware-linux-gnueabi" ;;
# Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
esac

# If EULA
if [ -e EULA.TXT ];then
   more EULA.TXT
   echo "Do you accept terms? (yes/[no])"
   read ACCEPT
   if [ "$ACCEPT" != "yes" ];then
      echo; echo "SlackBuild Aborted!!"
      exit 1
   fi
fi

# Do not touch following if not needed
JOBS=${JOBS:--j2}
CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=$TMP/package-$PKGNAME
OUTPUT=${OUTPUT:-$CWD}
TAR=${TAR:-$(basename $SOURCE)}
DIR=${DIR:-$(echo "$TAR"|sed -r 's/(\.tar|)(.gz|.bz2|.xz|.tgz|)$//')}

if [ ! -e $CWD/$TAR ];then
   wget $SOURCE -O "$CWD/$TAR"
fi

### Preparing Source
rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$TAR
cd $DIR

# Fix building with the new ffmpeg
patch -p1 < $CWD/ffmpeg.patch

chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$CFLAGS $SLKCFLAGS" \
CXXFLAGS="$CXXFLAGS $SLKCFLAGS" \
./configure \
   --prefix=/usr \
   --libdir=/usr/lib$LIBDIRSUFFIX \
   --docdir=/usr/doc/$PKGNAME-$VERSION \
   --sysconfdir=/etc \
   --localstatedir=/var \
   --mandir=/usr/man \
   --build=$CHOST \
   --with-speex=lib \
   --with-avcodec-includedir=include/libavcodec \
   --enable-maemo-plugin

make $JOBS
make install-strip DESTDIR=$PKG

mv $PKG/usr/share/alsa/alsa.conf.d/50-pulseaudio.conf $PKG/usr/share/alsa/alsa.conf.d/50-pulseaudio.conf.new
mv $PKG/usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example $PKG/usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.new

# Documentation
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
 
for DC in $DOCS;do
   [ -e $DC ] && cp -r $DC $PKG/usr/doc/$PKGNAME-$VERSION/ || true
done
 
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild
 
cd $CWD
for SB in $PKGNAME.SlackBuild slack-desc doinst.sh doinst.sh.gz EULA.TXT $SLKFILES;do
   [ -e "$SB" ] && cp -r $SB $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/$SB || true
done

for i in man info
do
    if [ -d $PKG/usr/$i ]; then
         cd $PKG/usr/$i
      find . -type f -exec gzip -9 {} \;
      for file in $( find . -type l ) ; do ln -s $( readlink $file ).gz $file.gz ; rm $file ; done
      [ "$i" == "info" ] && rm -f dir
    fi
done
   

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
[ -e $CWD/doinst.sh ] && cat $CWD/doinst.sh > $PKG/install/doinst.sh
[ -e $CWD/doinst.sh.gz ] && zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh

cd $PKG
chown -R root:root $PKG

if [ -x "$(which requiredbuilder 2>/dev/null)" ];then
   requiredbuilder -y -v -s $CWD $PKG
   [ -e install/slack-required ] && cat install/slack-required > $PKG/usr/doc/$PKGNAME-$VERSION/SlackBuild/slack-required
fi

/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

if [ "$1" = "--cleanup" ]; then
   rm -rf $TMP
fi


doinst.sh

Codice: Seleziona tutto

config() {
   NEW="$1"
   OLD="$(dirname $NEW)/$(basename $NEW .new)"
   # If there's no config file by that name, mv it over:
   if [ ! -r $OLD ]; then
      mv $NEW $OLD
   elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
      # toss the redundant copy
      rm $NEW
   fi
}

config usr/share/alsa/alsa.conf.d/50-pulseaudio.conf.new
config usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.new


slack-desk

Codice: Seleziona tutto

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

            |-----handy-ruler------------------------------------------------------|
alsa-plugins: alsa-plugins (Advanced Linux Sound Architecture Plugins)
alsa-plugins:
alsa-plugins: The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
alsa-plugins: functionality to the Linux operating system.
alsa-plugins: This package includes plugins for ALSA.
alsa-plugins:
alsa-plugins: Website : http://www.alsa-project.org
alsa-plugins:
alsa-plugins:
alsa-plugins:
alsa-plugins:


ffmpeg.patch

Codice: Seleziona tutto

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5587

diff -pru alsa-plugins-1.0.25-original/a52/pcm_a52.c alsa-plugins-1.0.25-for-ffmpeg-0.11/a52/pcm_a52.c
--- alsa-plugins-1.0.25-original/a52/pcm_a52.c   2012-01-25 08:57:07.000000000 +0100
+++ alsa-plugins-1.0.25-for-ffmpeg-0.11/a52/pcm_a52.c   2012-06-01 14:59:47.096671464 +0200
@@ -441,7 +441,21 @@ static int a52_prepare(snd_pcm_ioplug_t
 #else
   rec->avctx->sample_fmt = SAMPLE_FMT_S16;
 #endif
-#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
+#if (LIBAVCODEC_VERSION_MAJOR >= 54)
+   switch (io->channels) {
+   case 2:
+      rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO;
+      break;
+   case 4:
+      rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD;
+      break;
+   case 6:
+      rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
+      break;
+   default:
+      break;
+   }
+#elif (LIBAVCODEC_VERSION_MAJOR > 52 && LIBAVCODEC_VERSION_MAJOR < 54) || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3)
   switch (io->channels) {
    case 2:
       rec->avctx->channel_layout = CH_LAYOUT_STEREO;

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 21:10

Tra sta sera e domani vi faccio avere i precompilati per 14.1 64bit + compat32

Avatar utente
ZeroUno
Staff
Staff
Messaggi: 4948
Iscritto il: ven giu 02, 2006 14:52
Nome Cognome: Matteo Rossini
Slackware: current
Kernel: slack-current
Desktop: ktown-latest
Distribuzione: 01000000-current
Località: Roma / Castelli
Contatta:

Re: PulseAudio su slackware

Messaggioda ZeroUno » dom ago 24, 2014 21:21

invece di compat32 avrei bisogno dell'intero pacchetto a 32bit (che alla fine andrà caricato su slacky)
Packages finder: slakfinder.org | Slackpkg+, per aggiungere repository a slackpkg

Codice: Seleziona tutto

1011010 1100101 1110010 1101111 - 0100000 - 1010101 1101110 1101111

Avatar utente
ScorpionIT
Linux 1.0
Linux 1.0
Messaggi: 62
Iscritto il: mar ago 25, 2009 13:32
Nome Cognome: Elia Devito
Slackware: 14.1
Kernel: 3.10.17
Desktop: KDE 4.13.3

Re: PulseAudio su slackware

Messaggioda ScorpionIT » dom ago 24, 2014 21:33

per intero intendi 1 pachetto che installa pulseaudio32 + dipende su una 64bit multilib?


Torna a “Packages”

Chi c’è in linea

Visitano il forum: Google [Bot] e 1 ospite