Mein Ubuntu 10.04 HTPC mit XBMC - Audiofragen

+A -A
Autor
Beitrag
PoLyAmId
Inventar
#1 erstellt: 19. Jul 2011, 10:58
Mittlerweile hab ich meine Linux Ubuntu Konfiguration ganz gut im Griff. XBMC läuft toll incl PVR, diesem mächtigen TVHeadend und so, hat klasse Umschaltzeiten und sowas. Naja nun steckt halt der Teufel im Detail wie das bei solchen Sachen halt so ist:

Unter Windows 7 kann ich meine Audio Ausgabe wunderbar konfigurieren. Stell ich dort bei Wiedergabegeräte auf Digital Audio (S/PDIF) dann hab ich alles an Ton komplett auf der Stereoanlage über Toslink. Damit geht dann DTS Passthrough und so weiter und so fort vollautomatisch.
Hab dann noch Analog angeschlossen nen 2.1 Boxenset. Wenn ich das ansteuern will und keinen dicken Bums brauche stell ich einfach Wiedergabegeräte auf Analog und der Ton kommt komplett über die 2.1 Anlage


An so einer Selbstverständlichkeit brech ich mir unter Linux was ab: Dort wird die Ausgabe mithilfe von Alsa und Pulseaudio realisiert. Es gibt auch hier unter Ubuntu 10.04 ein Audio Einstellungs Tool, welches den Alsa Server steuert.

Dort greift dann z.B. das XBMC als Client drauf zu. Ich kann dann unter Karteikarte Hardware zwar von Analog audio out auf IEC958 Digital Output Duplex stellen, dem XBMC ist das allerdings herzlich egal.
Dort habe ich zwar im Audio Menu unter System auf Optical/Coax gestellt, Auf 5.1 mit DTS kompatibelität und unter Audiogeräte etwas rumprobiert, sowie Passthrough auf IEC958 gestellt, erreiche damit allerdings nur Digitalausgabe bei DVDs oder Audio Files, die richtiges 5.1 Digital Audio unterstützen. Die Sounds vom XBMC Menu oder von Stereo Analog Quellen kommen mit jeder Einstellung leider nur über den Analog Out raus. Windwos wandelt mir da ja dann alles auf S/PDIF um. Wie stell ich das so ein, dass ich mir hier aussuchen kann ob ich Audio komplett über Digital oder komplett über PC Boxen bekomme?? Je nach Situation?
noisestadt
Stammgast
#2 erstellt: 20. Jul 2011, 23:23
Ich kann dir zwar keine Lösung anbieten, aber vielleicht helfen dir folgende Ansätze. Benötigst du eine komplette Desktopumgebung, sprich Gnome und andere Programme außer XBMC und PVR Funktion? Falls nein, könntest Du nämlich auf Gnome und damit auch auf Pulse verzichten, das könnte dein Szenario vereinfachen. Erreichen läßt sich das z.B. mit einer minimalen Installation mittels XBMC LiveCD.

Ansonsten such mal im offiziellen XBMC Forum nach "asound.conf", damit lässt sich die Ausgabe auf die analogen und digitalen Ausgänge regeln.
PoLyAmId
Inventar
#3 erstellt: 21. Jul 2011, 10:39
So, zwei Tage und einige graue Haare später klappt es nun endlich.

Bin dazu übergegangen mir die ~/.asoundrc zu erstellen und die Soundausgabe von Hand zu konfigurieren. Dabei hab ich mir auch einen Abend lang die Zähne ausgebrochen, bis ich gemerkt habe, dass es am Ende wirklich an Pulseaudio liegt oder vielmehr daran, dass es die Ubuntu Macher nicht gerissen bekommen das ordentlich zu integrieren.

Das Problem liegt folgendermaßen:

Alsa bietet die Grundlage für die Soundkonfiguration und steuert die Hardware ziemlich direkt. dazwischen liegt dann noch ne Schnittstelle zu Gnome und darauf zur Konfiguration das Pulseaudio mit seinem Mixer.

Pulseaudio ist allerdings ziemlich fett in den Desktop eingebunden bei Ubuntu und deshalb hab ich nicht die Eier gehabt den einfach vom System zu fegen. Leider ist mein PC nämlich nicht nur ein reines Media Center und ich benutze die Oberfläche für viele Dinge.

Es gibt auch eine Möglichkeit Pulse etwas eleganter zu entfernen durch Umbenennung der Installationsverzeichnisse im Paketmanager, ich hab mir aber diese Arbeit nicht gemacht, denn es geht auch ohne.

Als ich erstmal begriffen hatte, dass der Mute auf dem SPDIF im Alsa durch Pulse den Müll verursacht und nicht eine fehlerhafte ~/.asoundrc konnte ich das Problem bei der Wurzel packen.


Richtig gut gelöst wird das Problem durch die ~/.asoundrc aus dem Wiki für MythTV. damit schafft man sich mehrere Plugins, die genau das ermöglichen was ich brauche:

Möglichkeit sich am Pulseaudio vorbei im XBMC zwischen diversen Ausgabemöglichkeiten zu entscheiden und Setzen einer Option als Standart. Das Ganze dann getrennt für Passthrough und PCM downmix Kram.

So kann ich mich jeder Zeit entscheiden ob ich Ton über Analog, über digital oder gemixt aus beiden.

hier mal die Config, ist super erklärt alles. vielleicht hat ja jemand ein ähnliches Problem wie ich und bekommts dadurch auch gerissen.



# ~/.asoundrc or /etc/asound.conf
# ALSA configuration file

##### USAGE #####
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
# device names ad described in the next section.


##### DEVICE NAMES #####
# This configuration file defines four devices for use by the user. Those
# devices are "analog", "mixed-analog", "digital", and "mixed-digital". The
# user may also re-define "default" to be identical to one of the above-named
# devices (i.e. to send all sound output to the digital output unless otherwise
# specified). Use the device names as described below:
# - "analog" outputs to the analog output directly and (at least on software
# sound cards) blocks other audio output. After playback completes, "queued"
# sounds are output in sequence.
# - "mixed-analog" mixes audio output from multiple programs into the analog
# output (so you can hear beeps, alerts, and other noises while playing back
# an audio stream).
# - "digital" outputs to the digital output directly. Since most (all?)
# digital outputs expect 48kHz PCM audio, this may not work for some playback
# (i.e. CD's--which are 44.1kHz PCM audio--or 32kHz audio streams from TV
# recordings, etc.).
# - "mixed-digital"

# All other devices created within this file are used only by the configuration
# file itself and should /not/ be used directly. In other words, do not use
# the devices "analog-hw", "dmix-analog", "digital-hw", or "dmix-digital".


##### IMPORTANT #####
# To make this ALSA configuration file work with your sound card, you will need
# to define the appropriate card and device information for the "analog-hw" and
# "digital-hw" devices below. You can find the card and device information
# using "aplay -l".


##### Configuration File #####

# Override the default output used by ALSA. If you do not override the
# default, your default device is identical to the (unmixed) "analog" device
# shown below. If you prefer mixed and/or digital output, uncomment the
# appropriate four lines below (only one slave.pcm line).
#
# Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
# such that their default "default" device is identical to the "mixed-analog"
# device. Whether using an ALSA version before or after 1.0.9, it does no harm
# and has no affect on performance to redefine the device (even if the
# redefinition does not change anything). Also, by using this ALSA
# configuration file, you once again have access to unmixed analog output using
# the "analog" device.
pcm.!default {
type plug
## Uncomment the following to use (unmixed) "analog" by default
# slave.pcm "analog-hw"
## Uncomment the following to use "mixed-analog" by default
slave.pcm "dmix-analog"
## Uncomment the following to use (unmixed) "digital" by default
# slave.pcm "digital-hw"
## Uncomment the following to use "mixed-digital" by default
# slave.pcm "dmix-digital"
}

# Control device (mixer, etc.) for the card
ctl.!default {
type hw
card 0
}

# Alias for (converted) analog output on the card
# - This is identical to the device named "default"--which always exists and
# refers to hw:0,0 (unless overridden)
# - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
# output on the card
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is different from "default" and
# allows playback while blocking other sound sources (until playback
# completes).
pcm.analog {
type plug
slave.pcm "analog-hw"
hint {
show on
description "Analog Output - Use analog outputs, converting samples, format, and rate as necessary."
}
}

# Control device (mixer, etc.) for the card
ctl.analog {
type hw
card 0
}

# Alias for (converted) mixed analog output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the dmix plugin (in this case 48000Hz)
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is identical to "default" for
# "software" sound cards.
pcm.mixed-analog {
type plug
slave.pcm "dmix-analog"
hint {
show on
description "Mixed Analog Output - Use analog outputs, converting samples, format, and rate as necessary. Allows mixing with system sounds."
}
}

# Control device (mixer, etc.) for the card
ctl.mixed-analog {
type hw
card 0
}

# Alias for (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.digital {
type plug
slave.pcm "digital-hw"
hint {
show on
description "Digital Output - Use digital outputs, converting samples, format, and rate as necessary."
}
}

# Control device (mixer, etc.) for the card
ctl.digital {
type hw
card 0
}

# Alias for mixed (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.mixed-digital {
type plug
slave.pcm "dmix-digital"
hint {
show on
description "Mixed Digital Output - Use digital outputs, converting samples, format, and rate as necessary. Allows mixing with system sounds."
}
}

# Control device (mixer, etc.) for the card
ctl.mixed-digital {
type hw
card 0
}

# The following devices are not useful by themselves. They require specific
# rates, channels, and formats. Therefore, you probably do not want to use
# them directly. Instead use of of the devices defined above.

# Alias for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.analog-hw {
type hw
card 0
# The default value for device is 0, so no need to specify
# - Uncomment one of the below or create a new "device N" line as appropriate
# for your sound card
# device 1
# device 4
}

# Control device (mixer, etc.) for the card
ctl.analog-hw {
type hw
card 0
}

# Alias for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.digital-hw {
type hw
card 0
device 1
# - Comment out "device 1" above and uncomment one of the below or create a
# new "device N" line as appropriate for your sound card
# device 2
# device 4
}

# Control device (mixer, etc.) for the card
ctl.digital-hw {
type hw
card 0
}

# Direct software mixing plugin for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-analog {
type dmix
ipc_key 1234
slave {
pcm "analog-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}

# Control device (mixer, etc.) for the card
ctl.dmix-analog {
type hw
card 0
}

# Direct software mixing plugin for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-digital {
type dmix
ipc_key 1235
slave {
pcm "digital-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}

# Control device (mixer, etc.) for the card
ctl.dmix-digital {
type hw
card 0
}


Danach kann man im XBMC einfach in den Audio Einstellung die Ausgabe Passthrough Benutzerdefiniert auf ALSA:digital oder ALSA:mixed-digital stellen

und für die normale Ausgabe hab ich ALSA:multi genommen glaub ich



bei bedarf kann noch folgendes angehängt werden um alles immer auf beide Kanäle zu mixen:


pcm.!default {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}

pcm.stereo {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}

ctl.stereo {
type hw
card 0
}

pcm.multi {
type multi
slaves.a.pcm "analog-hw"
slaves.a.channels 2
slaves.b.pcm "digital-hw"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

ctl.multi {
type hw
card 0
}
speefak
Ist häufiger hier
#4 erstellt: 08. Mrz 2012, 18:23
ich nutze ebenfalls XBMC als standalone oberfläche ( standalone paket ) und bie mir greifen die configs kein stück es ändert sich nichts, egal welche der 4 sektionen im config header ich auskommentiere oder an welche stelle ich config datei kopiere. es muss doch möglich sein über spdif normalen stereosound auszugeben und gleichzeit über HDMI die AC3 spur. von mir aus auch andersherum; hauptsache ich habe einen digitalanschluss für stereo ( schlafzimmer tv ) und einen für die AC3 ausgabe ( Wohnzimmer mit AVR)

ich nutze ein zotac ion itx -f, ob jack oder alsa bei dem standalone paket, bzw autologin zur xbmc oberfläche geladen wird weis ich grad auch nicht wirklich.

wo kann ich sonst noch ansaetzen um den o.g. mehrkanal und stereo ton parrallel abzugreifen ?
*mad-max*
Stammgast
#5 erstellt: 08. Mrz 2012, 18:48
Also wenn du beides gleichzeitig nutzen möchtest guck doch mal hier:
http://forum.xbmc.org/showthread.php?t=86038

mad-max
speefak
Ist häufiger hier
#6 erstellt: 09. Mrz 2012, 16:04
danke für den tipp nur hab ich die einstellmöglichkeiten bei meinem system im cbmx nicht :/ ist meine auf ubuntu 10.04 basierende distri vllt zu alt ?

edit : hab nur fast die ganze 40 seiten durch. so wie es aussieht scheint es nur für die 32bit linux variante einen gepatchte datei zu geben ;/


[Beitrag von speefak am 09. Mrz 2012, 16:40 bearbeitet]
*mad-max*
Stammgast
#7 erstellt: 09. Mrz 2012, 16:42
Nein, dass geht einfach mit der Standard Installation nicht...
Du musst mal schauen, ob schon jemand für dein System eine passende XBMC.bin hochgeladen hat...
Wenn nicht musst du das GIT clonen, den Patch drauf bügeln und dann das ganze selber kompilieren...
Guck einfach mal hier:
http://wiki.xbmc.org...mpile_XBMC_for_Linux

mm
speefak
Ist häufiger hier
#8 erstellt: 10. Mrz 2012, 16:03
ich glaube bevor ich mir das compilieren antue warte ich noh knapp 8 wochen bis ich auf die neue LTS 12.04 umstelle, dann muss ich eh alles neu aufsetzten. nutze mein VDR rechner als produktivsystem zum tv gucken, als webserver und fileserver, wenn der ausfällt wär das wirklich ärgerlich.


edit : bau den xbmc grad inner VM neu. mit checkinstall läst sich da ein hoffentlich kompatibles *deb mit bauen. den ganzen compiler kram wollte ich nicht unbedingt auf meinem produktiv VDR haben.


[Beitrag von speefak am 10. Mrz 2012, 17:20 bearbeitet]
speefak
Ist häufiger hier
#9 erstellt: 10. Mrz 2012, 21:15
so habs nu mit den patches mal neu compiliert und festgestellt : ich habe das auf den screenshots dargestellte options menu in der audio sektion nicht :/ des weiteren fehlt auch die TV sektion, sprich ich kann mit der selbstcompilierten version kein tv gucken bzw. keine verbindung zum VDR aufbauen :/
PoLyAmId
Inventar
#10 erstellt: 11. Mrz 2012, 13:23
Das normale XBMC hat doch gar keine TV Funktionen. Da brauch man eher Margos oder Dushmaniacs PVR version. Wir irgendwann später mal zusammengeführt.
speefak
Ist häufiger hier
#11 erstellt: 14. Mrz 2012, 23:15
ich nutze die yavdr version mit xbmc frontend auf ubuntu 10.04 basis. dort ist TV, VDPA etc alles dabei.
PoLyAmId
Inventar
#12 erstellt: 15. Mrz 2012, 13:03
Ich hab auch noch Ubuntu 10.04 drunter. Ich hab immer noch Schiss vor der Konfiguration meiner Fernbedienung und dem Sound unter Oneiric.
speefak
Ist häufiger hier
#13 erstellt: 15. Mrz 2012, 20:29
FB ist doch recht einfach zu konfigurieren.

zum thema sound : vor ca 3 wochen gabs ein xbmc update und seit dem stützt xbmc ab, wenn ich beim laufenden film von mp3 auf stereo umstelle. pausiere ich den film stelle um und las ihn dann weiter laufen is das kein ding. optimal wäre die o.g. config. HDMI und spdif oder toslink mit AC3 und stereo laufen zu lassen.
PoLyAmId
Inventar
#14 erstellt: 15. Mrz 2012, 22:11
Also bei meiner ist das Problem, dass der Empfänger nicht im Lirc eingetragen ist. Das muss ich von Hand machen und das neu compilieren. Ist leider etwas komplex aber machbar. Bei Lucid hab ich das schon ganz gut raus.
Suche:
Das könnte Dich auch interessieren:
Ubuntu XBMC findet keine Festplatte
Shaitan87 am 26.06.2012  –  Letzte Antwort am 08.07.2012  –  8 Beiträge
HTPC mit vorinstalliertem XBMC
vollerempfang am 27.11.2012  –  Letzte Antwort am 21.12.2012  –  8 Beiträge
Aktuellen Mac Mini vollwertiger XBMC-HTPC ?
#hifi_fan am 21.11.2012  –  Letzte Antwort am 22.08.2013  –  21 Beiträge
filmwiedergabe bei xbmc und popcorn afterhour gleichwertig?
contadinus am 06.10.2011  –  Letzte Antwort am 07.10.2011  –  4 Beiträge
Kombination Ubuntu XBMC und DLP-Link 3d OK?
contadinus am 26.08.2011  –  Letzte Antwort am 09.09.2011  –  8 Beiträge
XBMC Airplay Problem
benne2885 am 15.06.2012  –  Letzte Antwort am 17.06.2012  –  5 Beiträge
XBMC Fastboot
darkknight187 am 19.10.2011  –  Letzte Antwort am 19.01.2012  –  8 Beiträge
XBMC Problem?
KBC6 am 07.12.2011  –  Letzte Antwort am 15.12.2011  –  6 Beiträge
Webserver XBMC
Graschi am 08.01.2012  –  Letzte Antwort am 17.01.2012  –  5 Beiträge
XBMC Touchscreen Infodisplay
Thoom am 21.02.2011  –  Letzte Antwort am 22.02.2011  –  5 Beiträge
Foren Archiv

Anzeige

Produkte in diesem Thread Widget schließen

Aktuelle Aktion

Partner Widget schließen

  • beyerdynamic Logo
  • DALI Logo
  • SAMSUNG Logo
  • TCL Logo

Forumsstatistik Widget schließen

  • Registrierte Mitglieder925.736 ( Heute: 7 )
  • Neuestes Mitglied-MoritzL-
  • Gesamtzahl an Themen1.551.094
  • Gesamtzahl an Beiträgen21.537.956

Hersteller in diesem Thread Widget schließen