LinuxMCE Forums
May 22, 2013, 04:06:02 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  
Pages: [1]
  Print  
Author Topic: Customize /etc/asound.conf  (Read 988 times)
m3freak
Veteran
***
Posts: 125


View Profile
« on: October 24, 2011, 01:36:12 am »

How do I customize /etc/asound.conf on my MDs so that the changes survive reboots?

The auto generated asound.conf doesn't give my any sound over HDMI.  This is what it looks like:

Code:
pcm_slave.spdif_convert48k {
pcm "spdif:0"
rate 48000
}

pcm.spdif_playback {
type plug
slave spdif_convert48k
}

pcm_slave.hdmi_convert48k {
pcm "hdmi:0"
rate 48000
}

pcm.hdmi_playback {
type plug
slave hdmi_convert48k
}

pcm.asym_spdif {
type asym
playback.pcm "spdif_playback"
capture.pcm "plughw:0"
}

pcm.asym_hdmi {
type asym
playback.pcm "hdmi_playback"
capture.pcm "plughw:0"
}

pcm.asym_analog {
type asym
playback.pcm "plug:dmix:0"
capture.pcm "plughw:0"
}
pcm.!default asym_hdmi

If I comment the "pcm.!default asym_hdmi" and put the following default lines in, sound over HDMI works:

Code:
pcm.!default {
type hw
card 0
device 7
}

So, how do I make that change stick?
Logged
m3freak
Veteran
***
Posts: 125


View Profile
« Reply #1 on: October 25, 2011, 01:40:43 am »

Gah!  I'd really like some help on this.  Does anyone know how I could make my changes stick?
Logged
darrenmason
Addicted
*
Posts: 529


View Profile
« Reply #2 on: October 25, 2011, 06:06:52 am »

There is a template file that is used to generate it. If you change the template (it is only for that MD) then it will generate the working one each time.

Can't remember filenames and locations and I am at work at the moment so I can't check. But if you have trouble finding it let me know and I will look up on the MD that I changed at home.

Looks like a similar change to what I had to do. What sort of machine?
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #3 on: October 25, 2011, 06:39:14 am »

Most of LinuxMCE's files are in directories below /usr/pluto. Diskless MD stuf is in diskless, the binaries are in bin, the templates are in ... templates Wink
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #4 on: October 25, 2011, 04:07:27 pm »

I am wondering if we should provide a devicedata so that device templates for sound cards could carry what is needed to make them work.

-Thom
Logged
m3freak
Veteran
***
Posts: 125


View Profile
« Reply #5 on: October 25, 2011, 09:25:58 pm »

There is a template file that is used to generate it. If you change the template (it is only for that MD) then it will generate the working one each time.

Can't remember filenames and locations and I am at work at the moment so I can't check. But if you have trouble finding it let me know and I will look up on the MD that I changed at home.

Found it in /usr/pluto - thanks posde!

I added the following to it:

Code:
pcm.nvidia_hdmi {
type hw
card 0
device 7
}

pcm.!default pcm.nvidia_hdmi

Funny thing is, I don't see the line, "pcm.!default asym_hdmi", like I did when the MD was up and running.  I'm going to guess something else sets the default, so I'm not sure if I should put the default in manually.  I will be testing this out tonight.

Looks like a similar change to what I had to do. What sort of machine?

This, though I'm not 100% sure my version has the exact same specs:

http://www.jetway.com.tw/jw/Barebone_view.asp?productid=760&proname=JBC600C99352W-BW%20%28Mini-top%29

After sound over HDMI is working 100%, my next task is going to be getting the remote working.  Right now, only a few of the buttons work.  The MD doesn't see the remote as a remote.  I think right now it's just being recognized as a mouse (based on its current behaviour).  Anyway, I'll leave this remote stuff to a new thread.
Logged
m3freak
Veteran
***
Posts: 125


View Profile
« Reply #6 on: October 26, 2011, 02:37:21 am »

I have no idea what I'm doing.  I know next to nothing about LinuxMCE and making any custom changes is extremely confusing.  I wish I could spend more time learning, but these days I don't have a lot of free time.

So, with that said, I guess editing /usr/pluto/templates/asound.conf was a mistake because after the MD booted up, /etc/asound.conf on the MD hadn't changed at all. Just great.

I then looked on the core in /usr/pluto/diskless/29/usr/pluto/templates, and found the MD's asound.conf.  It has some macros in it for automagically finding the card number.  Can I put the lines I mentioned before straight into this file?  Also, I don't see the "default" line.  Can I manually put that in here too, or will something else come along and add another default line?
Logged
m3freak
Veteran
***
Posts: 125


View Profile
« Reply #7 on: October 29, 2011, 02:56:44 am »

Any tips for my newest dilemma?
Logged
m3freak
Veteran
***
Posts: 125


View Profile
« Reply #8 on: November 06, 2011, 01:48:00 am »

There is a template file that is used to generate it. If you change the template (it is only for that MD) then it will generate the working one each time.

Can't remember filenames and locations and I am at work at the moment so I can't check. But if you have trouble finding it let me know and I will look up on the MD that I changed at home.

Looks like a similar change to what I had to do. What sort of machine?

I changed the template file for the MD in question, but the generated config file didn't change.  I'm not sure what to do next.   Could you tell me which file you edited for your MD and what you did?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!