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-01 09:11

[Announce/Request] N900 as speaker for Audio/Video devices
 
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"


godofwar424 2011-08-02 12:53

Re: n900 as PC Speaker
 
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:

Hey, AWESOME script :)

Could this possibly be tweaked so that we could input using the N900's 3.5mm jack and then output the sound through the FM Transmitter? :)

gorgezilla 2011-08-02 13:06

Re: n900 as PC Speaker
 
Quote:

Originally Posted by godofwar424 (Post 1062795)
Hey, AWESOME script :)

Could this possibly be tweaked so that we could input using the N900's 3.5mm jack and then output the sound through the FM Transmitter? :)

...and what would you use that for?

rotoflex 2011-08-02 19:13

Re: n900 as PC Speaker
 
Quote:

Originally Posted by gorgezilla (Post 1062800)
...and what would you use that for?

The N900 would then be used as an FM transmitter from some other audio source.

It would for example enable music played from a PC connected to an N900 to be transmitted via FM to nearby radios, like in adjoining office cubicles, etc.

Another possibility: a passenger with an mp3 player can use the N900 as an FM transmitter to play its music through a car sound system that doesn't have an aux input.

P4d0uch 2011-08-03 10:23

Re: n900 as PC Speaker
 
Hi, i have got a little problem. is there any way to play stereo from n900. It plays only from one speaker

godofwar424 2011-08-03 14:17

Re: n900 as PC Speaker
 
Quote:

Originally Posted by gorgezilla (Post 1062800)
...and what would you use that for?

Quote:

Originally Posted by rotoflex (Post 1062947)
The N900 would then be used as an FM transmitter from some other audio source.

It would for example enable music played from a PC connected to an N900 to be transmitted via FM to nearby radios, like in adjoining office cubicles, etc.

Another possibility: a passenger with an mp3 player can use the N900 as an FM transmitter to play its music through a car sound system that doesn't have an aux input.


Exactly :) The ability to plug my ipod into my N900 via an 3.5mm jack lead, and then play it through the radio in my garage, as my N900 has a faulty USB meaning I have no way to put new songs onto it.

HtheB 2011-08-03 14:39

Re: n900 as PC Speaker
 
Quote:

Originally Posted by godofwar424 (Post 1063461)
my N900 has a faulty USB meaning I have no way to put new songs onto it.

You can still use Bluetooth file transfer or WiFi :)

rotoflex 2011-08-03 15:38

Re: n900 as PC Speaker
 
Quote:

Originally Posted by P4d0uch (Post 1063302)
Hi, i have got a little problem. is there any way to play stereo from n900. It plays only from one speaker

It sounds like a hardware problem. Is your N900 still under warranty?

P4d0uch 2011-08-03 20:19

Re: n900 as PC Speaker
 
Quote:

Originally Posted by rotoflex (Post 1063534)
It sounds like a hardware problem. Is your N900 still under warranty?

yes but when i playinng normaly songs from n900 it works on both speakers but when i try connect pc to n900 plays only from 1 speaker. so maybe damaged cabel?

rotoflex 2011-08-04 13:39

Re: n900 as PC Speaker
 
Yes, it does sound like one of the following:
1. Damaged jack on N900
2. Damaged cable
3. Damaged jack on PC
4. PC stereo balance somehow set all the way to left or right

Do the headphones sound OK when connected to the N900?

I'd check what happens using another PC.
If it persists, then try another cable.

godofwar424 2011-08-04 14:57

Re: n900 as PC Speaker
 
Quote:

Originally Posted by P4d0uch (Post 1063682)
yes but when i playinng normaly songs from n900 it works on both speakers but when i try connect pc to n900 plays only from 1 speaker. so maybe damaged cabel?

Don't fully plug the cable into your N900 if your using this script :) Leave it slightly out and it should fix your issue :)

godofwar424 2011-08-04 14:58

Re: n900 as PC Speaker
 
Quote:

Originally Posted by HtheB (Post 1063491)
You can still use Bluetooth file transfer or WiFi :)

Its ridiculously slow.. :( Anyways, my N900 has a reboot bug now and I refuse to send it to Nokia care for them to completely wipe ALL of my tweaks off of it, so im gonna try and resolder the USB port myself.

rm42 2011-08-04 14:58

Re: n900 as PC Speaker
 
Quote:

Originally Posted by rotoflex (Post 1064047)
Yes, it does sound like one of the following:
1. Damaged jack on N900
2. Damaged cable
3. Damaged jack on PC
4. PC stereo balance somehow set all the way to left or right

Do the headphones sound OK when connected to the N900?

I'd check what happens using another PC.
If it persists, then try another cable.

Also try pulling the jack a little bit from the N900.

Alfred 2011-08-04 15:09

Re: n900 as PC Speaker
 
OMFG, works like a charm.
And it is actually pretty handy with my netbook that has angry-user-throwing-****-around broken speakers

EDIT:
Anybody thinking about creating a widget-switch?

P4d0uch 2011-08-05 09:27

Re: n900 as PC Speaker
 
widget switch is no problem at all. for example use Queen Beecon Widget. and use "sh /path/to/file.sh"

iTor 2011-08-05 14:23

Re: n900 as PC Speaker
 
Did anybody try FM transmitting?

SABROG 2011-08-05 15:13

Re: n900 as PC Speaker
 
Quote:

Originally Posted by iTor (Post 1064655)
Did anybody try FM transmitting?

It's partially worked with it:

Code:

amixer -D hw:0 set 'Left PGA Bypass Mixer Line Swit' on
But phone try switch off fm transmitter after few seconds, because can't detect sound out.

archl 2011-08-06 01:11

Re: n900 as PC Speaker
 
Could we use Bluetooth to transmit the audio?

Pyro1099 2011-08-06 03:43

Re: n900 as PC Speaker
 
Why not change to thread title to:
[Announce/Request] N900 as speaker for Audio/Video devices?

It can be a very useful app for iPods, cheap MP3's and other media devices without speakers. It would greatly expand on what the N900 can already do and would be a quite a unique app which I haven't seen on any other phones.

Very nice idea SABROG.

If it was an application instead of a widget it could have options for FM or Bluetooth.

shuraizo 2011-08-06 03:51

Re: n900 as PC Speaker
 
Sorry if it's a bit out of topic.
My right speaker is no longer functioning after NCC repair.
I closed the left speaker when playing music, and there's no sound coming out at all

As i post here
http://talk.maemo.org/showthread.php?p=964239

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...

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 02:26.

vBulletin® Version 3.8.8