Jump to content


Photo

How to tune a FM radio station


  • Please log in to reply
208 replies to this topic

#181
fu0212

fu0212

    Newbie

  • Members
  • Pip
  • 2 posts
  • Devices:dell mini5
  • Twitter:@fu0212

Hello all,
Where does one need to write this code on dell streak?
Sorry! But i am new to android
Look forward for a reply.


use eclipse write code

  • 0

#182
XsCode

XsCode

    Enthusiast

  • Members
  • PipPipPip
  • 227 posts
  • Devices:Dell Streak
  • Twitter:@XsCode
nice job!

much better than my effort :P

Based on your files fm_hcitool
i've got it made GUI

my English is poor sorry

Chinese interface

Thanks your job


  • 0

#183
keithwwalker

keithwwalker

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:Dell Streak 5
Can someone post a screenshot? Thanks!

nice job!

much better than my effort :P


  • 0

#184
dbsjacky

dbsjacky

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:Dell Streak
It can not control the volume, please tell me how can I set up to control the volume. Thank you!

Edited by dbsjacky, 26 May 2011 - 02:06 PM.

  • 0

#185
XsCode

XsCode

    Enthusiast

  • Members
  • PipPipPip
  • 227 posts
  • Devices:Dell Streak
  • Twitter:@XsCode
It can't

It can not control the volume, please tell me how can I set up to control the volume. Thank you!


  • 0

#186
haynesteve

haynesteve

    Regular

  • Members
  • PipPip
  • 60 posts
  • Location:Sheffield
  • Devices:Dell Streak ; HTC Desire HD
  • Twitter:@haynesteve

Can someone post a screenshot? Thanks!


here you go !

Attached Files


  • 0
Streak (DJ Steve 1.9.0) ; Desire HD (Unity 2.3.5) : Galaxy S 2 (Criskelo v15)

#187
Crinos512

Crinos512

    Regular

  • Members
  • PipPip
  • 108 posts
https://market.andro...mikersmicros.fm

would this app work with the streak? .... Nevermind, answering my own question.

"No. No it won't."

Edited by Crinos512, 20 June 2011 - 12:18 AM.

  • 0

#188
gypsydigi

gypsydigi

    Newbie

  • Members
  • Pip
  • 47 posts
  • Devices:Dell STreak
EXCELLENT! :) works perfectly.

Thanks

  • 0

#189
A freddled gruntbuggly

A freddled gruntbuggly

    Newbie

  • Members
  • Pip
  • 3 posts
  • Devices:Dell Streak
I've been playing with StreakRadio a bit… well, a lot. Works mostly fine on rooted 2.2 with setuid+setgid fm_hcitool here, though sometimes the audio hardware and/or the audio drivers in the kernel get stuck.

I haven't tested with it invoking fm_hcitool via a root shell (since I have su locked down and slightly out of the way). It does prefer su, though I suspect that it'll need to read from the root shell's stdout & stderr…

If anybody knows how to set the radio volume level, I'd like to know. (I do know that it'll be done via SetVolumeControlStream(), but it doesn't seem to be any of 0…9, and 10 causes the volume control tool to abort.)

I would attach the source, but I need clarification here: there's no licence information in the archive which I downloaded (from this thread) therefore no rights are granted (in addition to any granted by law) so technically I have no rights to distribute it.

XsCode – want to clarify the licensing?

As for setuid+setgid fm_hcitool (assuming that it's in /system/bin):
# chown 0.0 /system/bin/hci_tool
# chmod 6755 /system/bin/fm_hcitool

  • 0

#190
XsCode

XsCode

    Enthusiast

  • Members
  • PipPipPip
  • 227 posts
  • Devices:Dell Streak
  • Twitter:@XsCode
You can't change the volume without the fm_hcitool source, it doesn't hook into the android volume API's and my app just acts as a GUI to it..

The source is completely opensource and Licenceless as long as it's not compiled and stuck on the market to make money..

If anybody knows how to set the radio volume level, I'd like to know. (I do know that it'll be done via SetVolumeControlStream(), but it doesn't seem to be any of 0…9, and 10 causes the volume control tool to abort.)

XsCode – want to clarify the licensing?


  • 0

#191
A freddled gruntbuggly

A freddled gruntbuggly

    Newbie

  • Members
  • Pip
  • 3 posts
  • Devices:Dell Streak

You can't change the volume without the fm_hcitool source, it doesn't hook into the android volume API's and my app just acts as a GUI to it..

Hmm… Source or relevant details?

The source is completely opensource

Fine so far. (OSI definition?)

and Licenceless

No licence == no rights granted. What's needed is you saying what's permitted, be it here or in a text file in the source archive.

as long as it's not compiled and stuck on the market to make money..

That to me looks like a licence condition.

If you've done anything to it since 6 Oct, could you perhaps post a diff or fresh source?

On the assumption that you won't object, here's what I've done to it. Licence is… basically up to you: what I've done to it I consider to be modifiable and redistributable, but if you distribute the binary, you must also make available the corresponding source (ref. GPLv2 and later). I provide it as is, without warranty of any sort.

Source (no .apk) Attached File  streakradio.zip   24.7KB   75 downloads
It's still far from ideal: for instance, typed values aren't handled until you use an adjustment button, and leaving the UI doesn't yet work well. But it does work on 2.2 :)

I just hope that it doesn't cause nasal demons. B)

  • 0

#192
cedarman

cedarman

    Newbie

  • Members
  • Pip
  • 3 posts

https://market.andro...mikersmicros.fm

would this app work with the streak? .... Nevermind, answering my own question.

"No. No it won't."


it will work with the streak PROVIDED you load any one of the two working applications before hand , ie load fm_radio.rar , then load the spirit fm ,
a tricky workaround but it works with rds etc

  • 0

#193
mrmrmrmr

mrmrmrmr

    Diehard

  • Members
  • PipPipPipPip
  • 410 posts
  • Devices:htc tytn

it will work with the streak PROVIDED you load any one of the two working applications before hand , ie load fm_radio.rar , then load the spirit fm , a tricky workaround but it works with rds etc

<BR><BR>how do you do that ? <BR>"load fm_radio.rar" ? <BR>"then load the spirit fm" ? <BR><BR>I'd love to have a working radio solution with RDS... please let us know how to make it work... <BR><BR>thx <BR><BR><BR>edit:<BR>I've installed the Spirit FM application and it works great on Steve's 1.9.1 ROM.<BR>RDS is also working.<BR>

Edited by mrmrmrmr, 14 July 2011 - 11:26 AM.

  • 0

#194
buzzed

buzzed

    Newbie

  • Members
  • Pip
  • 1 posts
  • Devices:Dell Streak
It worked as you guys said it would. Thanks alot!!!!!. I have downloaded the code and will look at it to see what i can learn.

  • 0

#195
Mike Reid

Mike Reid

    Newbie

  • Members
  • Pip
  • 8 posts

it will work with the streak PROVIDED you load any one of the two working applications before hand , ie load fm_radio.rar , then load the spirit fm ,
a tricky workaround but it works with rds etc


Hi. I'm the author of the Spirit FM Radio app.

------
First I have a question. :) Could anyone point me to or send me the bcom_fm.h file I've read here about ? I can't find it in any of the files linked on this thread.

I don't know if this is part of the source code for fm_hcitool (or fm_hcitool_speaker), but if anyone has the source for that it would be wonderful.

If not I will eventually reverse engineer the Ioctls used for setting the audio paths to headset or speaker etc.

I've seen references to arch/arm/mach-msm/include/mach/bcom_fm.h but Google can't find me that source code tree.

--------
In the latest version of my app on the Market, I added an Audio Method setting of "fm_hcitool". At present it just calls this binary that I embedded in my app.

In this post on my XDA thread, cedarman reported success without loading any other FM app: http://forum.xda-dev...1&postcount=738

But he also reported it's only working with the speakers. For the speaker mode I run "fm_hcitool 9 2" and for headset "fm_hcitool 9 1". I'm not sure why headset isn't working.

  • 0

#196
mrmrmrmr

mrmrmrmr

    Diehard

  • Members
  • PipPipPipPip
  • 410 posts
  • Devices:htc tytn

Hi. I'm the author of the Spirit FM Radio app.

------
First I have a question. :) Could anyone point me to or send me the bcom_fm.h file I've read here about ? I can't find it in any of the files linked on this thread.

I don't know if this is part of the source code for fm_hcitool (or fm_hcitool_speaker), but if anyone has the source for that it would be wonderful.

If not I will eventually reverse engineer the Ioctls used for setting the audio paths to headset or speaker etc.

I've seen references to arch/arm/mach-msm/include/mach/bcom_fm.h but Google can't find me that source code tree.

--------
In the latest version of my app on the Market, I added an Audio Method setting of "fm_hcitool". At present it just calls this binary that I embedded in my app.

In this post on my XDA thread, cedarman reported success without loading any other FM app: http://forum.xda-dev...1&postcount=738

But he also reported it's only working with the speakers. For the speaker mode I run "fm_hcitool 9 2" and for headset "fm_hcitool 9 1". I'm not sure why headset isn't working.


Hi,

Updated Spirit FM works on my Dell Streak with fm_hcitool method. However, as stated it only outputs to the Speaker. Before that I was able to run it just after starting another radio app which uses fm_hcitool. IF Irun that way, I can get sound to headphones.
Just let me know if you want me to test anything else.

  • 0

#197
XsCode

XsCode

    Enthusiast

  • Members
  • PipPipPip
  • 227 posts
  • Devices:Dell Streak
  • Twitter:@XsCode
https://github.com/c.../mach/bcom_fm.h

this isn't the file i referred to tho.. i'll keep looking for that..

Edit: Found the file i was working with before i gave up...

https://github.com/C..._fm_bcm4325.cpp


Hi. I'm the author of the Spirit FM Radio app.

------
First I have a question. :) Could anyone point me to or send me the bcom_fm.h file I've read here about ? I can't find it in any of the files linked on this thread.

I don't know if this is part of the source code for fm_hcitool (or fm_hcitool_speaker), but if anyone has the source for that it would be wonderful.

If not I will eventually reverse engineer the Ioctls used for setting the audio paths to headset or speaker etc.

I've seen references to arch/arm/mach-msm/include/mach/bcom_fm.h but Google can't find me that source code tree.

--------
In the latest version of my app on the Market, I added an Audio Method setting of "fm_hcitool". At present it just calls this binary that I embedded in my app.

In this post on my XDA thread, cedarman reported success without loading any other FM app: http://forum.xda-dev...1&postcount=738

But he also reported it's only working with the speakers. For the speaker mode I run "fm_hcitool 9 2" and for headset "fm_hcitool 9 1". I'm not sure why headset isn't working.


Edited by XsCode, 26 July 2011 - 10:51 AM.

  • 0

#198
Mike Reid

Mike Reid

    Newbie

  • Members
  • Pip
  • 8 posts

https://github.com/c.../mach/bcom_fm.h

this isn't the file i referred to tho.. i'll keep looking for that..

Edit: Found the file i was working with before i gave up...

https://github.com/C..._fm_bcm4325.cpp


Thanks a lot !

I saw android_hardware_fm_bcm4325.cpp long ago, but was hoping bcom_fm.h would reveal more "secrets" about Broadcom FM.

I DID find a few new bits of information in the bcom_fm.h you linked. It's too bad Broadcom keeps their chip specs so secret.

  • 0

#199
Mike Reid

Mike Reid

    Newbie

  • Members
  • Pip
  • 8 posts

Hi,

Updated Spirit FM works on my Dell Streak with fm_hcitool method. However, as stated it only outputs to the Speaker. Before that I was able to run it just after starting another radio app which uses fm_hcitool. IF Irun that way, I can get sound to headphones.
Just let me know if you want me to test anything else.


Hopefully when I reverse engineer fm_hcitool, I will learn more about that.

  • 0

#200
mrmrmrmr

mrmrmrmr

    Diehard

  • Members
  • PipPipPipPip
  • 410 posts
  • Devices:htc tytn

Hopefully when I reverse engineer fm_hcitool, I will learn more about that.


I noticed that if I run your app and then exit, my battery drains faster.
To stop the drain, I have to restart phone after exiting app.
I believe radio power stays runningbackground.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users