maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   [Announce/Request] N900 as speaker for Audio/Video devices (https://talk.maemo.org/showthread.php?t=75388)

SABROG 2011-08-06 06:34

Re: n900 as PC Speaker
 
Quote:

Originally Posted by shuraizo (Post 1064995)
Is there anyway to turn it on and off using part of your code?
I'm trying to figure out if this is a hardware or software problem...

You can test it with it:

Code:

# Left speaker On, Right speaker Off
amixer -D hw:0 set PCM 100%,0

# Left speaker Off, Right speaker On
amixer -D hw:0 set PCM 0%,100%

Also you can run alsamixer -c0 and change volume on 'PCM' for each speaker independent with shortcuts:
Q,Z - left speaker volume
W,X - both volume (same as arrows keypad)
E,C - right speaker volume

shuraizo 2011-08-06 10:57

Re: n900 as PC Speaker
 
Quote:

Originally Posted by SABROG (Post 1065009)
You can test it with it:

Code:

# Left speaker On, Right speaker Off
amixer -D hw:0 set PCM 100%,0

# Left speaker Off, Right speaker On
amixer -D hw:0 set PCM 0%,100%

Also you can run alsamixer -c0 and change volume on 'PCM' for each speaker independent with shortcuts:
Q,Z - left speaker volume
W,X - both volume (same as arrows keypad)
E,C - right speaker volume

Thanks,
just as i thought, when i use

amixer -D hw:0 set PCM 0%,100%

And play a song, no sound is coming out at all..
Using the of first code there's sound coming from the left speaker
I guess this is s a hardware issue?

SABROG 2011-08-06 13:01

Re: n900 as PC Speaker
 
Quote:

Originally Posted by shuraizo (Post 1065068)
I guess this is s a hardware issue?

Yes, i guess. All mixer settings resetting when reboot device, so if no sound from right speaker after reboot i think is it hardware problem.

P4d0uch 2011-08-06 13:37

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
i bought new cabel and still donīt work. when i play someting normaly on N900 everithing work just fine but when i try play from PC (I tried 2 PC and a mobile phone) it plays only form one speaker (left speaker) I also try amixer -D hw:0 set PCM 0%,100% and no sound at all. So what's wrong?

SABROG 2011-08-06 20:03

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
Quote:

Originally Posted by P4d0uch (Post 1065133)
i bought new cabel and still donīt work. when i play someting normaly on N900 everithing work just fine but when i try play from PC (I tried 2 PC and a mobile phone) it plays only form one speaker (left speaker) I also try amixer -D hw:0 set PCM 0%,100% and no sound at all. So what's wrong?

try to pull out the plug a little

qwazix 2011-08-06 20:53

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
I reckon this uses the mic in and outputs to both speakers, so that is why the jack has to be partially pluged (so that the mic in of N900 touches both audio outs of the stereo cable) Is there a way to make the N900 have stereo in? (switch the audio out contacts to audio in ones - can be done on some laptops) apart from the nokia n-gage I still can't find a device that can record in stereo.

SHARP66 2011-08-06 21:24

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
Quote:

Originally Posted by SABROG (Post 1062144)
At work i don't have speakers on my desktop, but i have headphone out. So i found two out Jack Plug
http://t2.gstatic.com/images?q=tbn:A...7qs4ZTTBLxxjdg

and connect it to headphone port in n900 and soundcard on desktop pc. But don't plug it on full size in n900, and disconnect USB cable (electrical interference). Then just run this script:

Speaker ON
Code:

#!/bin/sh
amixer -c0 set PCM 100%
amixer -c0 set 'Right PGA Bypass Mixer HP Switc' on
amixer -c0 set 'Left PGA Bypass Mixer HP' on
amixer -c0 set 'Left PGA Mixer Line1L' on
amixer -c0 set 'Left PGA Mixer Line2L' on
amixer -c0 set 'HP PGA Bypass' 100%
amixer -c0 set 'Speaker Function' On
echo "Speaker is ON"

Speaker OFF

Code:

#!/bin/sh
amixer -c0 set PCM 100%
amixer -c0 set 'Right PGA Bypass Mixer HP Switc' off
amixer -c0 set 'Left PGA Bypass Mixer HP' off
amixer -c0 set 'Left PGA Mixer Line1L' off
amixer -c0 set 'Left PGA Mixer Line2L' off
amixer -c0 set 'HP PGA Bypass' 0%
echo "Speaker is OFF"


I think is better solution to buy 2 cheap speakers.

wumpwoast 2011-08-06 22:16

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
Yeah, because the N900 only has a mono audio input on its headphone port.

Enjoyed/appreciated the amixer commands, but you can't overcome hardware. The number of phones/PDAs with builtin stereo recording on its input jack are vanishingly small.

rotoflex 2011-08-07 03:26

Re: [Announce/Request] N900 as speaker for Audio/Video devices
 
Quote:

Originally Posted by wumpwoast (Post 1065303)
Yeah, because the N900 only has a mono audio input on its headphone port.

That is interesting.
Is the FM transmitter stereo?

Edit:
I read too fast & missed that you were referring to the input only.

For anyone who wants to check, here is an .mp3 with a low tone in the left channel for 5 seconds, then a higher tone in the right channel for 5 seconds, then 10 seconds of the separated tones simultaneously.

It's on Sendspace, since Maemo.org is probably keeping out of trouble by not allowing .mp3's as attachments.

http://www.sendspace.com/file/ng0uz5


All times are GMT. The time now is 22:19.

vBulletin® Version 3.8.8