LinuxMCE Forums

General => Users => Topic started by: l3mce on January 30, 2013, 06:49:03 pm

Title: New audio scheme, and upgrades (Updated)
Post by: l3mce on January 30, 2013, 06:49:03 pm
I think we have finally worked out an audio scenario which works on nearly everything, in every program, ootb. The only things I would expect this to not work on, are a handful of new stuff which requires a kernel upgrade.  Here is the problem... if the new schemes come to be via upgrade instead of install... it never makes its initial guesses, which work pretty good... so you may have to do a couple of steps.

If you upgrade, and you have never seen this screen before:

(http://i48.tinypic.com/27xjchx.jpg)

You will need to run avwizard, so that you can choose the card you want, populating the database with this variable. I would move your /etc/X11/xine.conf to backup and just reboot.

Also please be aware of this wiki http://wiki.linuxmce.org/index.php/Audio_in_1004

There are circumstances where you will need to add AlternateSC = 1 or 2 to pluto.conf before audio will work.  Again... we take guesses, and they should be pretty darned accurate... but we only do them once, during install, when conditions can be evaluated, and not overwrite manual decisions. As the code did not exist when, for instance, your video card was installed, these guessing routines never run.

If while in AVWiz, you do not hear audio, you can back up a step with the esc key, add/change the AlternateSC variable and go forward again. If it will work... it will work.

There are a couple of scenarios on the fringe in which the above will not work. If while trying to start avwizard, you have such a broken /etc/asound.conf file that alsa has crashed... and cannot be used to get data. Just delete your /etc/asound.conf  it is rewritten every boot anyway... or if you have some odd in-between stuff written to the /etc/pluto/xine.conf that the scheme cannot replace. You would just delete the last 3 or 4 lines underneath
Code: [Select]
#vcd.title_format:%F - %I %N%L%S, disk %c of %C - %v %Aat the bottom of the file.
Title: Re: New audio scheme, and upgrades
Post by: l3mce on February 01, 2013, 02:15:00 pm
Also if you have one of the video chipsets that do not work ootb remember this wiki for solutions.
http://wiki.linuxmce.org/index.php/1004_Video_Hardware_Compatibility_List
Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 05, 2013, 05:33:57 pm
I have changed everything again.

If you CURRENTLY have AlternateSC set to 2, you will want to change that to 1 when updating.

Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 08, 2013, 12:08:36 am
Frankly almost everyone should be on AlternateSC = 0 or not have the line at all.

There are some last minute developments as well.

ACC Multi-Channel
Our current scheme works for just about everything, except ACC 5.1+ content...
tail -4 /etc/pluto/xine.conf   should reveal something to the effect of:
Quote
audio.device.alsa_front_device:plughw:1,7
audio.device.alsa_default_device:plughw:1,7
audio.device.alsa_passthrough_device:plughw:1,7
audio.output.speaker_arrangement:Pass Through

This shows us our example card number is 1 and the hdmi device is 7.
For 5.1 audio, we would want to add to the end of that file (/etc/pluto/xine.conf):
Quote
audio.device.alsa_surround51_device:plughw:1,7

For 7.1 audio:
Quote
audio.device.alsa_surround71_device:plughw:1,7

Analog MultiChannel
Firstly you will need to setup normal stereo analog audio with AlternateSC = 1 in /etc/pluto.conf. Then in the web admin/Media Directors, change the "Audio settings" from S to M (manual).

Lastly edit your /etc/asound.conf
Under "pcm.!default"
change "analog_playback" to analog_6 for 5.1 or analog_8 for 7.1

xine will need a change as well... but as I have no earthly idea what... someone will have to work with me to get it right. Will automagic all of this in 1204.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: RayBe on February 08, 2013, 01:29:26 pm
L3mce,
I am happy to help, just let me know what you want me to do and I will see what I can do.
Br,
Raymond
Title: Re: New audio scheme, and upgrades (Updated)
Post by: phenigma on February 10, 2013, 10:29:28 pm
ACC Multi-Channel

Thanks L3!  (And is 'AAC' - Advanced Audio Codec, fyi).  Great work on all the AV setup!

J.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 11, 2013, 12:55:35 pm
Acronyms... Who needs em?
Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 11, 2013, 05:05:31 pm
Humm... I'm not sure but I think that squeezeslave is broken with the new scheme.
Mine don't work anymore.

I've lost my core virtual card config and if I replace the new generated asound.conf with a backup I have, squeezeslave miss the -o parameter:

Code: [Select]
linuxmce  7953  0.0  0.0   3344   840 pts/11   S+   16:51   0:00 grep --color=auto squeezeslave
root     15039  9.0  0.2  60812  6844 ?        Ssl  16:27   2:10 /usr/bin/squeezeslave -m00:00:00:00:00:01 -r5 -M/var/log/squeezeslave.log localhost
root     16223  9.1  0.2  60944  6728 ?        Ssl  16:27   2:10 /usr/bin/squeezeslave -m00:00:00:00:00:02 -r5 -M/var/log/squeezeslave.log localhost
root     16781  0.6  0.2  59920  6816 ?        Ssl  16:27   0:08 /usr/bin/squeezeslave -m00:00:00:00:00:03 -r5 -M/var/log/squeezeslave.log localhost


Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 11, 2013, 05:36:16 pm
Can I see both in a pastebin please?

I guess I need to setup one of these squeezeslave things... cause I don't know it from a hole in the ground...
Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 11, 2013, 05:55:07 pm
The asound.conf that worked before the new audio sheme:

http://pastebin.com/v1NAqujj

For information I have 2 sound cards and only use the M Audio for squeezeslave on the core.
I don't have a media director on the core.

The new asound.conf after the new audio sheme.

http://pastebin.com/SP48tBdt

Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 11, 2013, 11:04:33 pm
Please paste your old config (first pastebin) into /etc/pluto/alsa/virtual_cards.conf, and let LMCE create ITS audio profile (second pastebin). You will notice the first line of the new configs reference that file.

Tell me if that works, or there is more work to do. I believe some things were added to the database to try and handle that. I will try and get hold of the one who committed the changes, or look over them enough to understand them.

***Ok... talked to uplink. There is magic for this now.
http://wiki.linuxmce.org/index.php/Dianemo_S#Configuring_a_multi-channel_sound_card_as_multiple_Virtual_Stereo_cards
Describes how to setup virtual sound cards now. In short:
1 We have a "sound card"* template, and a "virtual stereo sound card" for its children
2 Create the first one, set the sound card, create children and map the channels to them
3 Run /usr/pluto/bin/SetupAudioVideo

******Ok looking at the templates, I do not see them, and may have to make them.
done
Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 12, 2013, 09:14:46 am
I have paste my old config (first pastebin) into /etc/pluto/alsa/virtual_cards.conf, and let the LMCE ITS audio profile.
It is a progress but the -o parameter (audio device) is always missing and if I reboot the core, I retrive a empty virtual_cards.conf :-(.

I know about Dianemo Device Template #1994 and have use it before.
But it is actually missing on linuxmce 10.04 so I have to manually recreate the virtual cards.

Thank's for your help.


Title: Re: New audio scheme, and upgrades (Updated)
Post by: phenigma on February 12, 2013, 08:58:43 pm
Hi pga,

The proper DeviceTemplates are being added to LinuxMCE.  You will be able to update your database to receive the new DeviceTemplates soon.

J.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 12, 2013, 09:27:14 pm
Hi Phenigma,

Great !



Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 13, 2013, 09:20:14 am
Hi

I have add the Multichannel sound card #2241 on the Core but have a "No sound cards found" in the device data parameters.

My asound.conf is the ITS audio profile that LMCE give me (same as yesterday) and my /etc/pluto/alsa/vitual_cards.conf is empty.

Do I miss something ?


Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 13, 2013, 09:56:40 am
Maybe it is because I have no media director on the Core and so have not setup video and audio ?


Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on February 13, 2013, 03:33:15 pm
SetupAudioVideo should still go... but you would have to go through avwiz I would expect to set the card number.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: phenigma on February 13, 2013, 08:36:32 pm
pga: the process is not completely automatic, yet.  Couple of things:  After you create the multichannel sound card device you will need to run /usr/pluto/bin/UpdateAvailableSoundCards.sh.  This will fill in the missing device data you are referring to.  Select the proper card from the device data drop down. Next add the stereo virtual sound cards as children of the multichannel card and set the right and left channel #s for these devices.  Then you will run /usr/pluto/bin/SetupAudioVideo.sh.  This *should* generate an asound.conf and an /etc/pluto/alsa/virtual_cards.conf file.  This will create the virtual cards named: Virtual_XXX (where XXX is the device number of the virtual stereo sound card device in webadmin).  Set the Alsa Output Device of your squeezeslave devices to the appropriate Virtual_XXX device.  Quick Reload.

L3: SAV should completely ignore his audio cards and not create an asound.conf, EXCEPT for the virtual cards.  On my test headless core I got a broken asound.conf as I have not run AVWiz and do not plan on it (no mediadirector there).  AVWiz is completely optional.  Therefor SAV should only create the appropriate entries for a mediadirector sound card, xine, etc, if AVWiz is run.

J.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: pga57 on February 14, 2013, 09:25:55 am
Hi Phenigma,

Even if it is not yet automatic, it works and simplifies configuration !!

Squeezeslave work again and I suggest, L3mce, to test it because it is a nice solution to have synchronized audio in rooms. ;-)

Thank's again for your reactivity and help.


Title: Re: New audio scheme, and upgrades (Updated)
Post by: phenigma on February 15, 2013, 12:05:23 am
I am very happy to hear that it is working for you!  Thanks for testing!

J.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: bherbie on March 06, 2013, 03:21:55 am
Thanks for the great work on the audio over HDMI!  This has always been tricky to accomplish on linux and after I ran the AV wizard, it was up and running!  The problem I experience though is with the multi-channel aac... even after altering /etc/pluto/xine.conf and I can still only get 2 channel audio and no center so no voices...

My newer media is encoded with aac audio so this is something I would like to fix so any suggestions would be great!
Title: Re: New audio scheme, and upgrades (Updated)
Post by: phenigma on March 07, 2013, 05:45:31 am
The problem I experience though is with the multi-channel aac... even after altering /etc/pluto/xine.conf and I can still only get 2 channel audio and no center so no voices...

I have the same issue.  I had everything working under 0810 with no problems.  But under 1004 I get no center channel, it's like it has been removed from the mix.  If you find a solution please report back.

J.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: l3mce on March 08, 2013, 03:40:59 am
This is gonna sound nuts... but... in mythtv... somebody hit the "=" key. Please tell me if you experience a change in surround.
Title: Re: New audio scheme, and upgrades (Updated)
Post by: bherbie on March 08, 2013, 03:47:15 am
This is gonna sound nuts... but... in mythtv... somebody hit the "=" key. Please tell me if you experience a change in surround.

Doesn't appear to do anything...