The short answer is, it won't work well.
You may get some sound from it, but it won't be room filling.
I based my answer, on finding some examples of mobile phone speakers
with a rating of 1 watt of sound, with 8 ohm impedance, implying they
are regular speakers with a coil inside. Some speakers may use
piezoelectric devices instead, and would have different characteristics.
*******
I checked one advert for a mobile phone speaker, and it was
rated "1 watt" audio output, with a speaker impedance of 8 ohms.
Computers have line level audio, roughly around 1 volt RMS output.
Sometimes they manage a little bit more than that, but not by much.
Built-in sound, takes the form of AC'97 CODEC chip or HDAudio CODEC
chip. There is a typical datasheet you can download on this page,
with representative values. ( ALC850_DataSheet_1.4.pdf , 597,887 bytes )
http://www.realtek.com.tw/downloads...=59&DownTypeID=1&GetDown=false&Downloads=true
Typical built-in sound solutions, don't come with a "power amplifier".
The sound chips typically have headphone drive, and even that may
be restricted to the green Line-Out jack. This can manage to
drive 1 volt RMS into 32 ohms (32 ohms being a typical headphone
impedance). The RealTek part manages "50 milliwatts into 20 ohms".
That would represent a slight stronger drive level (lower ohms
value in that case, being stronger). Using V**2 over R the resistance,
that would correspond to 1**2/20 = 1/20 = 0.050, so we know
the specification is saying the output is 1 volt RMS in that
case.
The datasheets aren't really that well specified. They don't show
power output curves for example.
The theory says, maximum power transfer happens, when the load
matches the output impedance of the amplifier. Page 49 of the
datasheet, claims the output impedance is 5 ohms. Which means it
should work well with an 8 ohm mobile speaker (in terms of
transferring the available power, which isn't much). The second data
point is "Amplifier Maximum Output Power", which is 50 milliwatts
with a 20 ohm load. You would think it would make sense to quote
the power available at 5 ohms instead, but that's not how they did it.
In any case, barring the tiny technical details, I'd say you can't
expect to get more than about 50 milliwatts of audio power.
That is 0.050 watts. Now, compare that to the average table radio,
which would be 2 watts output. 2 watts output is sufficient to
produce "room filling sound". Not loud enough to hurt your eardrums,
but loud enough to be heard. 0.050 watts is 40 times less than that.
So that should give you some perspective on what kind of sound level
to expect. It'll be weak.
Another annoying detail, is they don't say what happens if you short
circuit the computer output on the 3.5mm jack. Some chips will state
they can withstand a short circuit indefinitely on one output signal,
but I can't find such a description in a couple different CODEC data
sheets. So you'd want to take some care, when making your electrical
connections.
You may get enough sound, to prove the speaker works, but not
enough sound to actually use it to listen to music...
A small speaker will not have a very good frequency response.
When using the computer for the audio test, select a tone around
2KHz or so as a test. The mobile speaker will be optimized for
voice frequencies, and the speaker might have no low frequency
response to speak of. If you tested with a 100Hz signal, you
might not hear anything.
Paul