Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AC97 : problem cat /dev/audio > file
PostPosted: Mon Dec 17, 2007 2:56 pm 
Offline

Joined: Tue Sep 04, 2007 6:38 am
Posts: 9
Location: mysore
Hi,

I am using AT91SAM9263 controller and linux2.6.20-4 for development. I need to develop voice communication within the intranet between these embedded devices.

I am able to “cat abcd.au > /dev audio” and play the audio file on the speaker, after unmuting the register in the file sound/arm/at91-ac97.c.

But when I do cat /dev/audio > /tmp/123 it says

#cat /dev/audio > /tmp123
cat /dev/audio : Invalid argument.

I am not sure why this problem is occurring. I put lots of printk messages in the file sound/arm/at91-ac97.c.

I have enabled debug messages in the kernel and don’t see any debug messages also.

I am not sure why this is happening.

Hoping positive reply from you.


With regards

Shashi Kumar. M.S.

Software Engineer,
Aspire Communications (P) Limited
Plot 64-C1, Hootagalli Industrial Area
Kasaba Hobli, Mysore 570 018
Ph: +91-821-4288772/3
Fax ;+91-821-4287774
Cell: +91-99001-46678
URL: www.aspirecommunication.com


Top
 Profile  
 
 Post subject: cat xyz.au>/dev/audio...Problem in playing the audio file
PostPosted: Mon Dec 24, 2007 7:02 am 
Offline

Joined: Wed Nov 14, 2007 3:04 pm
Posts: 3
Location: Bangalore
Dear Sir,

Thanks for reading.

Can i know the register used to unmute the sound in at91-ac97 file available in /sound/arm/

Failed to hear sound from a headphone when an audio file is played using this command..
cat xyz.au >/dev/audio

Eventhough i enabled all debug options in kernel configuration, but dont see any error messages on console when my audio file is played.

Please acknowledge.

Regards,

_________________
janardhan@eilabs.com
Bangalore.


Top
 Profile  
 
 Post subject: AC97 : problem cat /dev/audio > file
PostPosted: Wed Dec 26, 2007 6:21 am 
Offline

Joined: Tue Sep 04, 2007 6:38 am
Posts: 9
Location: mysore
Hi,
Hope you are using 2.6.20-11 linux kernel provided by timesys.

I did the following changes to un mute the speaker. you can do these things with the ALSA utils using the ALSA control (alsactl).

Add the following code in the file sound/pci/ac97/ac97_codec.c and in the function snd_ac97_mixer before returning from this function.

snd_ac97_write(ac97, AC97_MASTER, 0x0707);
snd_ac97_write(ac97, AC97_HEADPHONE, 0x0707);
snd_ac97_write(ac97, AC97_MASTER_MONO, 0x0007);
snd_ac97_write(ac97, AC97_PHONE, 0x0007);
snd_ac97_write(ac97, AC97_MIC, 0x0007);
snd_ac97_write(ac97, AC97_LINE, 0x0707);
snd_ac97_write(ac97, AC97_PCM, 0x0707);


these line of code will unmute the things. may be all things are not required. but atleast first two lines and the last lines are mandatory as PCM_OUT has to be muted.

with regards
Shashi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: