Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,192 Members 38,681 Now Online
XDA Developers Android and Mobile Development Forum

FM Radio on the Nook?

Tip us?
 
Jon Lee
Old
#1  
Member - OP
Thanks Meter 84
Posts: 74
Join Date: Jan 2014
Default FM Radio on the Nook?

Has anyone tried this? We have the hardware behind it (twl6040).

I compiled the driver for it, and found the firmware blobs it wanted to load.

Insmod dmesg logs:
Code:
<3>[ 3012.835601] init: no such service 'fm_dl'
<3>[ 3014.386718] init: untracked pid 2225 exited
<3>[ 3015.045623] init: untracked pid 2213 exited
<6>[ 3015.710144] (stc): st_register(8)
<6>[ 3015.710174] (stc):  chnl_id list empty :8
<6>[ 3015.710205] (stk) : st_kim_start
<6>[ 3015.710205] Enable wl12xx power
<6>[ 3015.917175] (stk) :ldisc_install = 1
<6>[ 3015.968597] (stc): st_tty_open
<6>[ 3015.968627] (stk) :line discipline installed
<6>[ 3015.969879] (stk) :TIInit_7.6.15.bts
<6>[ 3016.060791] (stc): add_channel_to_table: id 8
<6>[ 3016.726562] (stc): remove_channel_from_table: id 8
<6>[ 3016.726623] (stc):  all chnl_ids unregistered
<6>[ 3016.726684] (stk) :ldisc_install = 0
<6>[ 3016.727081] (stc): st_tty_close
<6>[ 3016.729278] Disable wl12xx power
<6>[ 3023.407836] (stc): st_register(8)
<6>[ 3023.407897] (stc):  chnl_id list empty :8
<6>[ 3023.407928] (stk) : st_kim_start
<6>[ 3023.407958] Enable wl12xx power
<6>[ 3023.615295] (stk) :ldisc_install = 1
<6>[ 3023.666046] (stc): st_tty_open
<6>[ 3023.666107] (stk) :line discipline installed
<6>[ 3023.666595] (stk) :TIInit_7.6.15.bts
<6>[ 3023.755706] (stc): add_channel_to_table: id 8
The radio app, itself, seems to want to work.

logcat logs
Code:
D/fm_apln ( 2190): freq_set_dlg_shw: Frequency changing to : 106500 KHz
D/fm_srvc ( 2190): dhrdw_freq_set     fd: 6  freq: 106500
D/fm_hrdw ( 2190): hrdw_so_freq_set api_hndl: 6  freq: 106500
D/fm_hrdw ( 2190): gen_freq_set freq: 106500  limited: 106500
D/fm_hrdw ( 2190): rds_reset
D/fm_hrdw ( 2190): v4_freq_set: 106500
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_pi_chngd
D/fm_srvc ( 2190): dhrdw_pi_get       fd: 6
D/fm_hrdw ( 2190): hrdw_so_pi_get api_hndl: 6  pi: 0x0
D/fm_apln ( 2190): on_pi_chngd
D/fm_hrdw ( 2190): v4_freq_set VIDIOC_S_FREQUENCY success
D/fm_sttn ( 2190): pt_parse: 0
D/fm_apln ( 2190): run_on_pi_chngd run
D/fm_apln ( 2190): run_on_pi_chngd run pi: 0  cs: null
D/fm_apln ( 2190): run_on_pi_chngd run cs: 0000  m_just_pi: true  m_just_pi_time: 1395133231826
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_freq_chngd: freq: 106500
D/fm_apln ( 2190): on_freq_chngd freq: 106500
D/fm_apln ( 2190): ui_sttn_info_reset m_freq: 106500  sttn_name: 106.5
D/fm_sttn ( 2190): pt_parse: 0
D/fm_apln ( 2190): sttn_id_tv_set m_station_id: 0  sttn_id: PI: 0
D/fm_apln ( 2190): prefs_set int: last_frequency = 106500
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): dhrdw_pt_get       fd: 6
D/fm_hrdw ( 2190): hrdw_so_pt_get api_hndl: 6  pt: -1
D/fm_srvc ( 2190): evt_pt_chngd: -1
D/fm_apln ( 2190): cb_on_pt_chngd
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_ps_chngd: 
D/fm_apln ( 2190): run_on_pt_chngd: -1
D/fm_sttn ( 2190): pt_parse: -1
D/fm_sttn ( 2190): pt_parse: -1
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_rt_chngd: 
D/fm_hrdw ( 2190): v4_rssi_get VIDIOC_G_TUNER success name: FM  type: 1  cap: 0x91  lo: 1400000  hi: 1728000  sc: 3  am: 1  sig: 31097  afc: 0
No audio. I'm not sure if I just need to use a mixer to map it or if I have further driver problems.
Sometimes I get these errors?
Code:
<3>[ 3081.753814] fmdrv: Response SKB ptr not NULL
<3>[ 3081.754577] fmdrv: Response SKB is missing
<3>[ 3082.530303] fmdrv: Response SKB ptr not NULL
<3>[ 3082.531036] fmdrv: Response SKB is missing
Anyway, I'm thinking it's possible with some work.
The Following User Says Thank You to Jon Lee For This Useful Post: [ Click to Expand ]
 
Jon Lee
Old
#2  
Member - OP
Thanks Meter 84
Posts: 74
Join Date: Jan 2014
Well I definitely know that it's going to be possible with a little bit of work.
I managed to get a split second of audio from radio station while I was messing with spirit radio settings and unplugged the headset.
Don't know what I did because I haven't managed to recreate, but it was enough to let me know that it was there and just needs to be mapped.
If anyone else would like to work with me on this, here's the files:
http://www.mediafire.com/download/62...adio_files.zip

the *.bts files go in /system/etc/firmware
fm_drv.ko goes in /system/lib/modules
omap audio-tool (which I just compiled) goes in /system/xbin

You have to procure spirit FM unlocked (from market or elsewhere).
The Following User Says Thank You to Jon Lee For This Useful Post: [ Click to Expand ]
 
sandsofmyst
Old
#3  
Senior Member
Thanks Meter 70
Posts: 260
Join Date: Oct 2009
I'm not going to get involved but that's cool and unexpected. Good stuff.
Moto G 4G | latest official rom 4.4.4NEW (Longest recorded uptime: 503 hours with 4.4.3)
Nook HD+ 32 | cm11 emmc official rom (331 hours is about the most I can get before forced reboot or other.)
 
Jon Lee
Old
#4  
Member - OP
Thanks Meter 84
Posts: 74
Join Date: Jan 2014
Well at least I found a practical use for audio-tool. Apparently our sound chipset is normally configured for low-power operation. You can use audio-tool to change this to high performance.

Code:
root@android:/ # audio-tool mix   
Number of controls: 71
ctl	type	num	name                                     value
0	ENUM	1	DL1 Equalizer                            Flat response
1	ENUM	1	Sidetone Equalizer                       Flat response
2	ENUM	1	AMIC Equalizer                           High-pass 0dB
3	ENUM	1	DMIC Equalizer                           High-pass 0dB
4	INT	1	DL1 Media Playback Volume                132
5	INT	1	DL1 Tones Playback Volume                0
6	INT	1	DL1 Voice Playback Volume                130
7	INT	1	DL1 Capture Playback Volume              0
8	INT	1	VXREC Media Volume                       0
9	INT	1	VXREC Tones Volume                       0
10	INT	1	VXREC Voice DL Volume                    0
11	INT	1	VXREC Voice UL Volume                    0
12	INT	1	AUDUL Media Volume                       0
13	INT	1	AUDUL Tones Volume                       0
14	INT	1	AUDUL Voice UL Volume                    120
15	INT	1	AUDUL Voice DL Volume                    0
16	INT	1	SDT UL Volume                            101
17	INT	1	SDT DL Volume                            120
18	INT	2	DMIC1 UL Volume                          120 120
19	INT	2	DMIC2 UL Volume                          120 120
20	INT	2	DMIC3 UL Volume                          120 120
21	INT	2	AMIC UL Volume                           120 120
22	INT	2	BT UL Volume                             126 126
23	BOOL	1	DL1 Mono Mixer                           Off
24	BOOL	1	AUDUL Mono Mixer                         Off
25	BOOL	1	DL1 MM_EXT Switch                        Off
26	BOOL	1	DL1 BT_VX Switch                         Off
27	BOOL	1	DL1 PDM_DL2 Switch                       On
28	BOOL	1	DL1 PDM Switch                           Off
29	BOOL	1	Sidetone Mixer Capture                   Off
30	BOOL	1	Sidetone Mixer Playback                  On
31	BOOL	1	Capture Mixer Tones                      Off
32	BOOL	1	Capture Mixer Voice Playback             Off
33	BOOL	1	Capture Mixer Voice Capture              Off
34	BOOL	1	Capture Mixer Media Playback             Off
35	BOOL	1	Voice Capture Mixer Tones Playback       Off
36	BOOL	1	Voice Capture Mixer Media Playback       Off
37	BOOL	1	Voice Capture Mixer Capture              Off
38	BOOL	1	DL1 Mixer Tones                          Off
39	BOOL	1	DL1 Mixer Voice                          Off
40	BOOL	1	DL1 Mixer Capture                        Off
41	BOOL	1	DL1 Mixer Multimedia                     On
42	ENUM	1	MUX_VX1                                  None
43	ENUM	1	MUX_VX0                                  None
44	ENUM	1	MUX_UL11                                 None
45	ENUM	1	MUX_UL10                                 None
46	ENUM	1	MUX_UL07                                 None
47	ENUM	1	MUX_UL06                                 None
48	ENUM	1	MUX_UL05                                 None
49	ENUM	1	MUX_UL04                                 None
50	ENUM	1	MUX_UL03                                 None
51	ENUM	1	MUX_UL02                                 None
52	ENUM	1	MUX_UL01                                 None
53	ENUM	1	MUX_UL00                                 None
54	INT	2	Capture Preamplifier Volume              1 1
55	INT	2	Capture Volume                           4 4
56	INT	2	Aux FM Volume                            3 3
57	INT	2	Headset Playback Volume                  7 7
58	INT	2	Handsfree Playback Volume                26 26
59	INT	1	Earphone Playback Volume                 15
60	ENUM	1	Headset Power Mode                       Low-Power
61	BOOL	1	Earphone Playback Switch                 Off
62	BOOL	1	Spk Right Playback Switch                On
63	BOOL	1	Spk Left Playback Switch                 On
64	ENUM	1	Headset Right Playback                   Off
65	ENUM	1	Headset Left Playback                    Off
66	ENUM	1	Handsfree Right Playback                 HF DAC
67	ENUM	1	Handsfree Left Playback                  HF DAC
68	ENUM	1	Analog Right Capture Route               Off
69	ENUM	1	Analog Left Capture Route                Off
70	ENUM	1	TWL6040 Power Mode                       Low-Power
root@android:/ # audio-tool mix 70 1
root@android:/ # audio-tool mix                                                
Number of controls: 71
ctl	type	num	name                                     value
0	ENUM	1	DL1 Equalizer                            Flat response
1	ENUM	1	Sidetone Equalizer                       Flat response
2	ENUM	1	AMIC Equalizer                           High-pass 0dB
3	ENUM	1	DMIC Equalizer                           High-pass 0dB
4	INT	1	DL1 Media Playback Volume                132
5	INT	1	DL1 Tones Playback Volume                0
6	INT	1	DL1 Voice Playback Volume                130
7	INT	1	DL1 Capture Playback Volume              0
8	INT	1	VXREC Media Volume                       0
9	INT	1	VXREC Tones Volume                       0
10	INT	1	VXREC Voice DL Volume                    0
11	INT	1	VXREC Voice UL Volume                    0
12	INT	1	AUDUL Media Volume                       0
13	INT	1	AUDUL Tones Volume                       0
14	INT	1	AUDUL Voice UL Volume                    120
15	INT	1	AUDUL Voice DL Volume                    0
16	INT	1	SDT UL Volume                            101
17	INT	1	SDT DL Volume                            120
18	INT	2	DMIC1 UL Volume                          120 120
19	INT	2	DMIC2 UL Volume                          120 120
20	INT	2	DMIC3 UL Volume                          120 120
21	INT	2	AMIC UL Volume                           120 120
22	INT	2	BT UL Volume                             126 126
23	BOOL	1	DL1 Mono Mixer                           Off
24	BOOL	1	AUDUL Mono Mixer                         Off
25	BOOL	1	DL1 MM_EXT Switch                        Off
26	BOOL	1	DL1 BT_VX Switch                         Off
27	BOOL	1	DL1 PDM_DL2 Switch                       On
28	BOOL	1	DL1 PDM Switch                           Off
29	BOOL	1	Sidetone Mixer Capture                   Off
30	BOOL	1	Sidetone Mixer Playback                  On
31	BOOL	1	Capture Mixer Tones                      Off
32	BOOL	1	Capture Mixer Voice Playback             Off
33	BOOL	1	Capture Mixer Voice Capture              Off
34	BOOL	1	Capture Mixer Media Playback             Off
35	BOOL	1	Voice Capture Mixer Tones Playback       Off
36	BOOL	1	Voice Capture Mixer Media Playback       Off
37	BOOL	1	Voice Capture Mixer Capture              Off
38	BOOL	1	DL1 Mixer Tones                          Off
39	BOOL	1	DL1 Mixer Voice                          Off
40	BOOL	1	DL1 Mixer Capture                        Off
41	BOOL	1	DL1 Mixer Multimedia                     On
42	ENUM	1	MUX_VX1                                  None
43	ENUM	1	MUX_VX0                                  None
44	ENUM	1	MUX_UL11                                 None
45	ENUM	1	MUX_UL10                                 None
46	ENUM	1	MUX_UL07                                 None
47	ENUM	1	MUX_UL06                                 None
48	ENUM	1	MUX_UL05                                 None
49	ENUM	1	MUX_UL04                                 None
50	ENUM	1	MUX_UL03                                 None
51	ENUM	1	MUX_UL02                                 None
52	ENUM	1	MUX_UL01                                 None
53	ENUM	1	MUX_UL00                                 None
54	INT	2	Capture Preamplifier Volume              1 1
55	INT	2	Capture Volume                           4 4
56	INT	2	Aux FM Volume                            3 3
57	INT	2	Headset Playback Volume                  7 7
58	INT	2	Handsfree Playback Volume                26 26
59	INT	1	Earphone Playback Volume                 15
60	ENUM	1	Headset Power Mode                       Low-Power
61	BOOL	1	Earphone Playback Switch                 Off
62	BOOL	1	Spk Right Playback Switch                On
63	BOOL	1	Spk Left Playback Switch                 On
64	ENUM	1	Headset Right Playback                   Off
65	ENUM	1	Headset Left Playback                    Off
66	ENUM	1	Handsfree Right Playback                 HF DAC
67	ENUM	1	Handsfree Left Playback                  HF DAC
68	ENUM	1	Analog Right Capture Route               Off
69	ENUM	1	Analog Left Capture Route                Off
70	ENUM	1	TWL6040 Power Mode                       High-Performance
root@android:/ #
I'm not real sure where to start as far as mapping.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes