LinuxMCE Forums
May 23, 2013, 01:55:11 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
  Home Help Search Chat Login Register  
  Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 69
61  LinuxMCE / Users / Re: HDMI AUDIO PROBLEM on: December 30, 2012, 06:46:50 am
Quote
aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav plays sound
-D = device
plughw = output to hardware (and resample based on DAC)
0,3 = Card 0, Device 3

I would expect that board to only work as hw:0

As your sound is now working, if you cat /etc/asound.conf I expect you will see that is what is being output to.

In myth, you will need to go to the frontend (not backend) setup. Go to General... after a couple of menus you will see Audio. Move it from "Default" to the hw:0,3 and change it to hw:0.

For some reason backspace in myth is interpreted as a "go back one menu"... so use delete. I am working on fixing this default problem in myth.
62  LinuxMCE / Users / Re: LinuxMCE 10.04 Gtalk Setup on: December 29, 2012, 09:57:58 pm
cfernandes, while the changes I made to General_Info_Plugin.cpp built on my end, it is breaking the build fluffy side as sFrom is not defined anywhere, just referenced in the change. Please advise. The monsters are angry with me.
63  LinuxMCE / Users / Re: HDMI AUDIO PROBLEM on: December 29, 2012, 09:56:48 pm
I would expect the m3n78-VM to not want a device assignment (3 in your case).

add "AlternateSC = 1" to /etc/pluto.conf without quotes. rm /etc/asound.conf /etc/X11/xorg.con* and reboot. This will take you to avwiz.

Though, again, would ONLY expect it to work with "AlternateSC = 0" (it will not exist currently in pluto.conf, which is equal to 0).
64  LinuxMCE / Users / Re: LinuxMCE 10.04 Gtalk Setup on: December 24, 2012, 06:20:20 pm
Riggs... or anyone really I guess... need your help testing if you don't mind. Trying to fix this today and tomorrow.
65  LinuxMCE / Developers / Re: Orbiter generating bug on LMCE-1004-20121215102626939 on: December 24, 2012, 02:28:15 am
That is sort of a generic "I cannot send readable media to the prescribed player" (xine in this case)
dvdcss is just a suggestion for trying to solve the issue. This isn't a read issue, it is a stream issue. Must fix xine... so we must figure out why it breaks.

Please post logs.
66  LinuxMCE / Users / Re: LMCE and Gentoo on: December 24, 2012, 02:24:01 am
Porting lmce to Gentoo would be a large undertaking. Tremendous. We will all help you if you want to take a stab at it... but... you clearly need to look at how LMCE functions currently.
67  LinuxMCE / Users / Re: mythtv mpg playback problems on: December 24, 2012, 02:16:41 am
If you play the media from lmce menu this behavior occurs. If you play it in the myth menu, it does not.
68  LinuxMCE / Users / Re: Question about Asterisk tickets on: December 23, 2012, 09:34:34 pm
I sent you a PM cfernandes.

Is this something I need to fold into the existing source? I was asked to close the ticket, and a works for one guy is not really how that should work... or was his situation a one off problem?
69  LinuxMCE / Users / Re: Disabling autofs for usb drives on: December 22, 2012, 05:26:12 pm
It just sounds like the ntfs/fat drive is not clean. I would stick it in a windows machine and fix that.
70  LinuxMCE / Users / Re: Question about Asterisk tickets on: December 22, 2012, 01:00:53 pm
Pff... never apologize for helping fix/troubleshoot asterisk... I don't understand the first thing about it... I was just looking at format.



On that subject... still think you need an \ at the end of 416
Wink
71  LinuxMCE / Developers / Re: Orbiter generating bug on LMCE-1004-20121215102626939 on: December 22, 2012, 06:55:12 am
No... that would be a blocker.

Something is hanging in Xine it sounds like.

Please reboot, then play a dvd... stop it... and play another, then post /var/log/pluto/XX_Xine_Player.log   where XX is the MD number.
I expect it will be pretty big. Might pastebin it.
72  LinuxMCE / Users / Re: Question about Asterisk tickets on: December 22, 2012, 06:47:30 am
I think that script was edited with microsomething.

Attached one without invisible formatting, and also found a problem in what was line 416
        ('$context','$phonenumber','16','Goto','custom-linuxmce,$line,1');"
It should not close like that, it is half way through a list. I changed it to
        ('$context','$phonenumber','16','Goto','custom-linuxmce,$line,1'), \
73  LinuxMCE / Installation issues / Re: NO sound on MD used to work out of the box. on: December 20, 2012, 03:33:27 am
Can I see tail -4 /etc/pluto/xine.conf

The thing is, it is setup correctly outside of one oddity.

Please rm /etc/asound.conf   edit /etc/pluto/xine.conf (go all the way to the end of the very long config file) and delete everything below the line:
#vcd.title_format:%F - %I %N%L%S, disk %c of %C - %v %A

leaving a space... then run /usr/pluto/bin/SetupAudioVideo.sh
It will spit back a few things, including FATAL: Module such-n-such in use. You could paste that output as well...

I am expecting the configuration, the way you have it, to be creating a slightly different asound, and we will see about the /xine.conf

If you could drop into IRC this would probably go faster.
74  LinuxMCE / Installation issues / Re: NO sound on MD used to work out of the box. on: December 19, 2012, 04:21:17 pm
I don't understand how this ever worked but doesn't now...

I need to change how I am dealing with these device numbers. All sorts of chipsets use their own designation for device types. Please replace /usr/pluto/bin/SetupAudioVideo.sh with the following:
Code:
#!/bin/bash
. /usr/pluto/bin/pluto.func
. /usr/pluto/bin/Config_Ops.sh
. /usr/pluto/bin/Utils.sh
. /usr/pluto/bin/SQL_Ops.sh

DEVICECATEGORY_Media_Director="8"
DEVICECATEGORY_Video_Cards="125"
DEVICECATEGORY_Sound_Cards="124"
DEVICETEMPLATE_OnScreen_Orbiter="62"
DEVICETEMPLATE_Stereo_virtual_sound_card="2223"
DEVICEDATA_Video_settings="89"
DEVICEDATA_Audio_settings="88"
DEVICEDATA_Reboot="236"
DEVICEDATA_Connector="68"
DEVICEDATA_TV_Standard="229"
DEVICEDATA_Setup_Script="189"
DEVICEDATA_Sound_Card="288"
DEVICEDATA_Channel_Left="311"
DEVICEDATA_Channel_Right="312"
DEVICEDATA_Channel="81"
DEVICEDATA_Sampling_Rate="310"
SettingsFile="/etc/pluto/lastaudiovideo.conf"
# don't let KDE override xorg.conf
rm -f {/home/*,/root}/.kde/share/config/displayconfigrc

Reboot="NoReboot"
ReloadX="NoReloadX"
AudioSetting_Override="$1"
SoundCard_Override="$2"
XineConf_Override="$3"
ComputerDev=$(FindDevice_Category "$PK_Device" "$DEVICECATEGORY_Media_Director" '' 'include-parent')
OrbiterDev=$(FindDevice_Template "$ComputerDev" "$DEVICETEMPLATE_OnScreen_Orbiter")
VideoCardDev=$(FindDevice_Category "$ComputerDev" "$DEVICECATEGORY_Video_Cards")
AsoundConf="/usr/pluto/templates/asound.conf"
ConfGet "AlternateSC"

if [[ -z "$VideoCardDev" ]]; then
VideoCardDev=$(FindDevice_Category "$PK_Device" "$DEVICECATEGORY_Video_Cards")
fi

SoundCardDev=$(FindDevice_Category "$ComputerDev" "$DEVICECATEGORY_Sound_Cards")

if [[ -z "$SoundCardDev" ]]; then
SoundCardDev=$(FindDevice_Category "$PK_Device" "$DEVICECATEGORY_Sound_Cards")
fi

ReadConf()
{
## config file format (direcly parsable by bash):
# name=value
if [[ -f "$SettingsFile" ]]; then
while read line; do
eval "OldSetting_$line"
done <"$SettingsFile"
fi
}

GetVideoSetting()
{
local Q
local VideoSetting

VideoSetting=$(GetDeviceData "$ComputerDev" "$DEVICEDATA_Video_settings")

if [[ -n "$VideoSetting" ]]; then
Refresh=$(echo "$VideoSetting" | cut -d '/' -f2)
ResolutionInfo=$(echo "$VideoSetting" | cut -d '/' -f1)
ResX=$(echo "$ResolutionInfo" | cut -d' ' -f1)
ResY=$(echo "$ResolutionInfo" | cut -d' ' -f2)
if [[ -z "$Refresh" || -z "$ResX" || -z "$ResY" ]]; then
Logging "$TYPE" "$SEVERITY_CRITICAL" "SetupAudioVideo.sh" "Malformed DeviceData: VideoSetting='${VideoSetting}'"
MalformedVideoSetting='Malformed VideoSetting'
fi
fi

if [[ -z "$MalformedVideoSetting" ]]; then
echo "$VideoSetting"
fi
}

SaveSettings()
{
local Var VarName

for Var in ${!OldSetting_*}; do
VarName="${Var#OldSetting_}"
eval "Save_$VarName=\"${!Var}\""
done

for Var in ${!NewSetting_*}; do
VarName="${Var#NewSetting_}"
eval "Save_$VarName=\"${!Var}\""
done

for Var in ${!Save_*}; do
VarName="${Var#Save_}"
echo "$VarName=\"${!Var}\""
done >"$SettingsFile"
}

Setup_VirtualCards()
{
local Q R
mkdir -p /etc/pluto/alsa
local Vfile=/etc/pluto/alsa/virtual_cards.conf
local Devices=$(FindDevice_Template "$PK_Device" "$DEVICETEMPLATE_Stereo_virtual_sound_card" "" "" all)
local Dev ParentDev SoundCard
local Channel_Left Channel_Right
local SampleRate IpcKey

>"$Vfile"
for Dev in $Devices; do
Channel_Left=$(GetDeviceData "$Dev" "$DEVICEDATA_Channel_Left")
Channel_Right=$(GetDeviceData "$Dev" "$DEVICEDATA_Channel_Right")
Q="SELECT FK_Device_ControlledVia FROM Device WHERE PK_Device=$Dev"
R=$(RunSQL "$Q")

ParentDev=$(Field 1 "$R")
SoundCard=$(GetDeviceData "$ParentDev" "$DEVICEDATA_Sound_Card")
SoundCard=$(TranslateSoundCard "$SoundCard")

if [[ -z "$SoundCard" ]]; then
continue
fi

Channels=$(GetDeviceData "$ParentDev" "$DEVICEDATA_Channel")
if [[ ! "$Channels" =~ ^[0-9]+$ ]]; then
continue
fi

SampleRate=$(GetDeviceData "$ParentDev" "$DEVICEDATA_Sampling_Rate")
if [[ -z "$SampleRate" ]]; then
SampleRate=44100
fi

IpcKey=$(printf "0x%08x" $((0x72380000 + ParentDev)))
cat >>"$Vfile" <<END
pcm.Virtual_$Dev {
type plug
slave.pcm {
type dmix
ipc_key $IpcKey
bindings.0 $Channel_Left
bindings.1 $Channel_Right
slave {
pcm "hw:$SoundCard,0"
channels $Channels
rate $SampleRate
}
}
}
END
done
}

Enable_Audio_Channels()
{
# Added this to correctly unmute channels for setup wizard, and to
# inject necessary unmuting commands for later bootup.
yalpa=$(aplay -l)
grep -iwo "card ." <<< "$yalpa" | awk '{print $2}' | uniq | while read CardNumber; do
amixer -c "$CardNumber" | grep '\[off\]' -B5 | grep "Simple" | sed 's/Simple mixer control //g' | grep -vi "capture" | while read MuteStatus; do
amixer -c "$CardNumber" sset "$MuteStatus" unmute
done
alsactl store
amixer -c "$CardNumber" | grep '\[.*\%\]' -B5 | grep "Simple" | sed 's/Simple mixer control //g' | grep -vi "capture" | while read VolLevel; do
amixer -c "$CardNumber" sset "$VolLevel" 80%
done 2>&1>/dev/null
alsactl store
done
}

Setup_AsoundConf()
{
local AudioSetting="$1"
SoundOut="hw:"
Yalpa=$(aplay -l 2>&1)
# Do not mess with asound.conf if Audio Setting is set to Manual. This will only happen after the asound.conf has been generated at least once.
if [[ "$AudioSetting" == "M" ]]; then
return
fi
if grep 'no soundcards found' <<< "$Yalpa"; then
return
fi

local Q R
local MD_Device="$PK_Device"

Setup_VirtualCards

Q="SELECT FK_DeviceTemplate FROM Device WHERE PK_Device=$PK_Device"
R=$(RunSQL "$Q")

if [[ "$R" == "7" ]]; then
Q="SELECT PK_Device FROM Device WHERE FK_DeviceTemplate=28 AND FK_Device_ControlledVia=$PK_Device"
R=$(RunSQL "$Q")
MD_Device=$(Field 1 "$R")
fi

if [[ -n "$SoundCard_Override" ]]; then
SoundCard="$SoundCard_Override"
else
SoundCard=$(GetDeviceData "$MD_Device" "$DEVICEDATA_Sound_Card")
fi

SoundCard=$(TranslateSoundCard "$SoundCard")
HWOnlyCard="$SoundCard"

# Handle nVidia GT card types
case "$AudioSetting" in
*[CO]*)
CardDevice=$(grep -i "card" <<< "$Yalpa" | grep -v "device 0" | grep -vi "HDMI" | grep -wo "device ." | awk '{print $2}' | head -1)
ConnectType="spdif"
PlaybackPCM="${ConnectType}_playback"
if [[ "$AlternateSC" -ge "1" ]]; then
SoundOut="plughw:"
SoundCard="${HWOnlyCard},${CardDevice}"
fi
if [[ "$AlternateSC" == "2" ]]; then
AsoundConf="/usr/pluto/templates/asound.conf.backup"
fi
;;
*H*)
CardDevice=$(grep -i "hdmi" <<< "$Yalpa" | grep -wo "device ." | awk '{print $2}')
if [[ $(wc -l <<< "$CardDevice") -gt "3" ]]; then
if grep "7" <<< "$CardDevice"; then
CardDevice="7"
fi
fi
if [[ "$AlternateSC" -ge "1" ]]; then
SoundOut="plughw:"
SoundCard="${HWOnlyCard},${CardDevice}"
fi
if [[ "$AlternateSC" == "2" ]]; then
AsoundConf="/usr/pluto/templates/asound.conf.backup"
fi
ConnectType="hdmi"
PlaybackPCM="${ConnectType}_playback"
;;
*)
CardDevice="0"
SoundOut="plug:dmix:"
ConnectType="analog"

if [[ "$AlternateSC" -ge "1" ]]; then
SoundOut="plughw:"
SoundCard="${HWOnlyCard},${CardDevice}"
fi

if [[ "$AlternateSC" == "2" ]]; then
AsoundConf="/usr/pluto/templates/asound.conf.backup"
fi
PlaybackPCM="${SoundOut}${SoundCard}"
;;
esac

local PlaybackCard="${SoundOut}${SoundCard}"
sed -r "s#%CONNECT_TYPE%#$ConnectType#g; s#%MAIN_CARD%#$SoundCard#g; s#%PLAYBACK_PCM%#$PlaybackPCM#g;" "$AsoundConf" > /etc/asound.conf

Setup_XineConf "$AudioSetting" "$PlaybackCard"
/usr/pluto/bin/RestartALSA.sh
Enable_Audio_Channels
}

Setup_XineConf()
{
local AudioSetting="$1" PlaybackCard="$2"
local XineConf=/etc/pluto/xine.conf
sed -i '/audio\.device.*/d' "$XineConf"
sed -i '/audio\.output.*/d' "$XineConf"

if [[ -n "$XineConf_Override" ]]; then
XineConf="$XineConf_Override"
fi

if [[ "$AlternateSC" -ne "2" ]]; then
case "$AudioSetting" in
*[COH]*)
XineConfSet audio.device.alsa_front_device "$PlaybackCard" "$XineConf"
XineConfSet audio.device.alsa_default_device "$PlaybackCard" "$XineConf"
XineConfSet audio.output.speaker_arrangement 'Pass Through' "$XineConf"
XineConfSet audio.device.alsa_passthrough_device "$PlaybackCard" "$XineConf"
;;
*)
XineConfSet audio.device.alsa_front_device "$PlaybackCard" "$XineConf"
XineConfSet audio.device.alsa_default_device "$PlaybackCard" "$XineConf"
;;
esac
else
case "$AudioSetting" in
*[COH]*)
XineConfSet audio.device.alsa_front_device "$PlaybackCard" "$XineConf"
XineConfSet audio.device.alsa_default_device "$PlaybackCard" "$XineConf"
XineConfSet audio.device.alsa_passthrough_device "$PlaybackCard" "$XineConf"
;;
*)
XineConfSet audio.device.alsa_front_device "$PlaybackCard" "$XineConf"
XineConfSet audio.device.alsa_default_device "$PlaybackCard" "$XineConf"
sed -i '/audio\.device\.alsa_passthrough_device.*/d' "$XineConf"
;;
esac
fi

case "$AudioSetting" in
*3*)
XineConfSet audio.output.speaker_arrangement 'Pass Through' "$XineConf"
XineConfSet audio.device.alsa_passthrough_device "$PlaybackCard" "$XineConf"
;;

*)
XineConfSet audio.output.speaker_arrangement 'Stereo 2.0' "$XineConf"
sed -i '/audio\.device\.alsa_passthrough_device.*/d' "$XineConf"
;;
esac
}

VideoSettings_Check()
{
local Update_XorgConf="NoXorgConf"
local DB_VideoSetting DB_OpenGL DB_AlphaBlending DB_Connector DB_TVStandard DB_Reboot

DB_VideoSetting=$(GetVideoSetting)
DB_OpenGL=$(OpenGLeffects)
DB_AlphaBlending=$(AlphaBlendingEnabled)
DB_Connector=$(GetDeviceData "$ComputerDev" "$DEVICEDATA_Connector")
DB_TVStandard=$(GetDeviceData "$ComputerDev" "$DEVICEDATA_TV_Standard")
DB_Reboot=$(GetDeviceData "$VideoCardDev" "$DEVICEDATA_Reboot")

if [[ -n "$DB_VideoSetting" && "$DB_VideoSetting" != "$OldSetting_VideoSetting" ]]; then
Update_XorgConf="XorgConf"
NewSetting_VideoSetting="$DB_VideoSetting"
fi

if [[ -n "$DB_OpenGL" && "$DB_OpenGL" != "$OldSetting_OpenGL" ]]; then
Update_XorgConf="XorgConf"
NewSetting_OpenGL="$DB_OpenGL"
fi

if [[ -n "$DB_AlphaBlending" && "$DB_AlphaBlending" != "$OldSetting_AlphaBlending" ]]; then
Update_XorgConf="XorgConf"
NewSetting_AlphaBlending="$DB_AlphaBlending"
fi

if [[ -n "$DB_Connector" && "$DB_Connector" != "$OldSetting_Connector" ]]; then
Update_XorgConf="XorgConf"
NewSetting_Connector="$DB_Connector"
fi

if [[ -n "$DB_TVStandard" && "$DB_TVStandard" != "$OldSetting_TVStandard" ]]; then
Update_XorgConf="XorgConf"
NewSetting_TVStandard="$DB_TVStandard"
fi

if [[ "$Update_XorgConf" == "XorgConf" ]]; then
/usr/pluto/bin/Xconfigure.sh
if [[ "$DB_Reboot" == 1 ]]; then
Reboot="Reboot"
else
ReloadX="ReloadX"
fi

# Orbiter Regen
Q="
UPDATE Orbiter
SET Regen=1
WHERE PK_Orbiter='$OrbiterDev'
"
RunSQL "$Q"
fi
}

AudioSettings_Check()
{
local DB_AudioSetting DB_AudioScript DB_Reboot
local ScriptPath

if [[ -z "$AudioSetting_Override" ]]; then
DB_AudioSetting=$(GetDeviceData "$ComputerDev" "$DEVICEDATA_Audio_settings")
else
DB_AudioSetting="$AudioSetting_Override"
fi

DB_Reboot=$(GetDeviceData "$AudioCardDev" "$DEVICEDATA_Reboot")
Logging "$TYPE" "$SEVERITY_NORMAL" "SetupAudioVideo" "'"
DB_AudioScript=$(GetDeviceData "$SoundCardDev" "$DEVICEDATA_Setup_Script")
ScriptPath="/usr/pluto/bin/$DB_AudioScript"
Logging "$TYPE" "$SEVERITY_NORMAL" "SetupAudioVideo" "DBSetting: $DB_AudioSetting Reboot: $DB_Reboot Script Path: $ScriptPath"

if [[ -n "$DB_AudioSetting" && -f "$ScriptPath" ]]; then
Logging "$TYPE" "$SEVERITY_NORMAL" "SetupAudioVideo" "Running: $ScriptPath $DB_AudioSetting"
"$ScriptPath" "$DB_AudioSetting"
fi

NewSetting_AudioSetting="$DB_AudioSetting"

if [[ "$NewSetting_AudioSetting" == *S* ]]; then
# S3 is not a valid combination and will break things
NewSetting_AudioSetting="${NewSetting_AudioSetting//3}"
fi

if [[ -z "$AlternateSC" ]]; then
AlternateSC="0"
fi

Setup_AsoundConf "$NewSetting_AudioSetting" "$AlternateSC"

if [[ "$DB_Reboot" == "1" ]]; then
Reboot="Reboot"
fi
}

Logging "$TYPE" "$SEVERITY_NORMAL" "SetupAudioVideo" "Starting"
ReadConf
VideoSettings_Check
AudioSettings_Check
SaveSettings

if [[ -z "$(pidof X)" ]]; then
exit # no X is running
fi

if [[ "$Reboot" == "Reboot" ]]; then
reboot
elif [[ "$ReloadX" == "ReloadX" ]]; then
/usr/pluto/bin/RestartLocalX.sh &
disown -a
fi


And please be aware of this: http://wiki.linuxmce.org/index.php/Audio_in_1004
75  LinuxMCE / Users / Re: driver fglrx - disabling underscan. Making aticonfig command persistent [solved] on: December 18, 2012, 10:15:11 pm
The problem is that this should only occur or be necessary for certain cards (very popular ones mind you). So this should not be run unless necessary. I might make a "get me a new catalyst" script that does all of this which people can run if theirs breaks. I can include whatever you need included. Should be fairly simple todo.

Pages: 1 ... 3 4 [5] 6 7 ... 69
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!