PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #171 (permalink)  
Old 07-23-2010, 01:54 PM
[ACL]'s Avatar
VIP Member
Offline
Pocket PC: tp2
Carrier: Sprint
Location: NY
 
Join Date: Feb 2010
Posts: 1,534
Reputation: 6350
[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

Quote:
Originally Posted by jonpry View Post
When wavedev.dll boots up, it makes 3 calls to InterruptInitialize() with strange parameters. I couldn't figure out the mapping between the interrupts in wince and hardware interrupts. Unfortunately the code that does the mapping is somehow built into nk.exe, which has no entry points and therefore is difficult to reverse.

I tried enabling more interrupts to see if it was happening somewhere else. I only got to 5 more or so. None seemed to be it. They have to be enabled one at a time because some of them cannot be cleared and hang the kernel.

Phh assured me that the interrupt numbers were correct and that they were checked in multiple ways multiple times. But I never was able to check them myself.
I just spoke to phh about it. I'm going to try to enable some irqs by hand to see if it helps.

We did disassembled nk.exe. I'll look for those functions calls and see what they do.
Reply With Quote
This post has been thanked 4 times.
  #172 (permalink)  
Old 07-23-2010, 03:35 PM
Reefermattness's Avatar
VIP Member
Offline
Pocket PC: HTC Touch Pro 2 (Tilt2)
Carrier: AT&T
 
Join Date: Apr 2009
Posts: 240
Reputation: 2740
Reefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIPReefermattness is a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

Quote:
Originally Posted by [ACL] View Post
I just spoke to phh about it. I'm going to try to enable some irqs by hand to see if it helps.

We did disassembled nk.exe. I'll look for those functions calls and see what they do.

Hi guys! Great work in here by the way! I watch this thread all the time.

One quick question for ya. I see you guys working with these .dlls, and I need both htcservices.dll and wavedev.dll. I was hoping you guys would be kind enough and could direct me on how to acquire them. Plz?
Reply With Quote
This post has been thanked 2 times.
  #173 (permalink)  
Old 07-23-2010, 03:47 PM
[ACL]'s Avatar
VIP Member
Offline
Pocket PC: tp2
Carrier: Sprint
Location: NY
 
Join Date: Feb 2010
Posts: 1,534
Reputation: 6350
[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

Quote:
Originally Posted by Reefermattness View Post
Hi guys! Great work in here by the way! I watch this thread all the time.

One quick question for ya. I see you guys working with these .dlls, and I need both htcservices.dll and wavedev.dll. I was hoping you guys would be kind enough and could direct me on how to acquire them. Plz?
Sup Reef.. try this link out. It should have all the oem dlls

http://www.4shared.com/file/39sLIx_Z/OEMDrivers.html
Reply With Quote
This post has been thanked 2 times.
  #174 (permalink)  
Old 07-23-2010, 05:24 PM
jonpry's Avatar
PPCGeeks Regular
Offline
Pocket PC: rhodium
Carrier: tmobile
 
Join Date: Apr 2010
Posts: 70
Reputation: 715
jonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

ACL, i have my kernel setup with the DSP interrupt always enabled, and when it goes off it just writes to console that the mysterious event has happened, but it still does not work.

I have disassemblies of NK as well, but they don't seem to do any good. I can't figure out what code handles a particular sys call.

All implementatations are required to implement this http://msdn.microsoft.com/en-us/library/ms904913.aspx, which does the interrupt mapping from user to hardware. I couldn't find this in NK.

Maybe writing some windows ce code that hooks all of the interrupts and then checks for changes in VIC memory would work to figure out what the mapping is.
Reply With Quote
This post has been thanked 3 times.
  #175 (permalink)  
Old 07-23-2010, 05:29 PM
ahuynh's Avatar
Lurker
Offline
Pocket PC: treo pro
Carrier: sprint
 
Join Date: Jul 2007
Posts: 10
Reputation: 10
ahuynh is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

this is exciting, thanks guys
Reply With Quote
  #176 (permalink)  
Old 07-23-2010, 09:15 PM
kaos's Avatar
VIP Member
Offline
Pocket PC: Htc EVO 3D™
Carrier: Sprint
Location: bronx
 
Join Date: Dec 2007
Posts: 1,040
Reputation: 1142
kaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on repkaos is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

keep up the good work guys. you give us all hope.
__________________

Phone:
Sprint EVO 3D Rom:Kaos Hybrid 4.20 V8 Radio: 0.97 Storage Card: Micro 32GB SDHC

Reply With Quote
This post has been thanked 1 times.
  #177 (permalink)  
Old 07-23-2010, 11:05 PM
hyperfire21's Avatar
PPCGeeks Regular
Offline
Pocket PC: touch pro
Carrier: sprint
 
Join Date: Aug 2008
Posts: 86
Reputation: 20
hyperfire21 is just getting started
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

this thread is so important to me i check it multiple times daily..
Reply With Quote
  #178 (permalink)  
Old 07-24-2010, 03:53 AM
[ACL]'s Avatar
VIP Member
Offline
Pocket PC: tp2
Carrier: Sprint
Location: NY
 
Join Date: Feb 2010
Posts: 1,534
Reputation: 6350
[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community[ACL] is a trusted member of the community
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

Quote:
Originally Posted by jonpry View Post
ACL, i have my kernel setup with the DSP interrupt always enabled, and when it goes off it just writes to console that the mysterious event has happened, but it still does not work.

I have disassemblies of NK as well, but they don't seem to do any good. I can't figure out what code handles a particular sys call.

All implementatations are required to implement this http://msdn.microsoft.com/en-us/library/ms904913.aspx, which does the interrupt mapping from user to hardware. I couldn't find this in NK.

Maybe writing some windows ce code that hooks all of the interrupts and then checks for changes in VIC memory would work to figure out what the mapping is.
That looks really familiar. Check this out.

.text:80067BC0 sub_80067BC0 ; CODE XREF: sub_80056E84+64p
.text:80067BC0 ; sub_80056E84+8Cp ...
.text:80067BC0 STMFD SP!, {R4,R5,LR}
.text:80067BC4 MOV R4, R0
.text:80067BC8 MOV R5, #1
.text:80067BCC CMP R4, #0x1B
.text:80067BD0 BEQ loc_80067BF0
.text:80067BD4 MOV R1, #0x84000000
.text:80067BD8 MOV R0, #0x800
.text:80067BDC BL sub_8006B6C0
.text:80067BE0 CMP R0, #0
.text:80067BE4 LDRNE R0, =aOeminterrupten
.text:80067BE8 SUBNE R1, R4, #0x10
.text:80067BEC BLNE sub_8005364C

Eventually this gets called

sub_800275AC
MRS R1, CPSR
CMP R0, #0
ORREQ R2, R1, #0x80
BICNE R2, R1, #0x80
MSR CPSR_cf, R2
ANDS R1, R1, #0x80
MOVEQ R0, #1
MOVNE R0, #0
RET

Ahh, now that looks very similar to this below. So i'm pretty sure thats what's actually enabling the interrupts. We might wanna check with Cotulla or Phh. Either way i think we already do this in our code.

/* NewState=1 will enable IRQ, NewState=0 will disable IRQ */
/* ARM core must be in a privileged mode, e.g. supervisor */
void ChangeIRQ(unsigned int NewState)
{
int my_cpsr;
__asm
{
MRS my_cpsr, CPSR /* get current program status */
ORR my_cpsr, my_cpsr, #0x80 /* set IRQ disable bit flag */
BIC my_cpsr, my_cpsr, NewState, LSL #7 /* reset IRQ bit with new value */
MSR CPSR_c, my_cpsr /* store updated program status */
}
}
http://infocenter.arm.com/help/index...qs/ka3540.html

I have reason to believe that the VIC mapping is similar to the 7200. But i wouldnt mind testing with some wince code. Just disabling via api calls and reading bit changes should suffice.

Bits Name Description
31 tChscrn2 Touchscreen controller interrupt 1 of 2 (includes pendown (penirq_n)
30 TChscrn1 Touchscreen controller interrupt 1 of 2 (includes pendown (penirq_n)
29 tchscrn_ssbi Touchscreen controller interrupt 1 of 2 (includes pendown (penirq_n
28 Keysense Keypad key press detected
27 sdc2_1 Secure digital controller 2, source 1
26 sdc2_0 Secure digital controller 2, source 0
25 sdc1_1 Secure digital controller 1, source 1
24 sdc1_0 Secure digital controller 1, source 0
23 adsp_a9a11 ADSP source to both ARM9 and ARM11
22 adsp_a11 ADSP source to ARM11
21 adm_aarm Applications data mover
20 graphics Graphics engine source
19 mdp Mobile display processor source
18 mddi_client MDDI client (camera) source
17 mddi_ext MDDI external display source
16 mddi_pri MDDI primary display source
15 usb_otg USB on-the-go
14 uart3_rx Activity start on UART3 interface
13 UART2_RX Activity start on UART2 interface
12 uart1_Rx Activity start on UART1 interface
11 uart3 UART3 controller source
10 uart2 UART2 controller source
9 uart1 UART1 controller source
8 dEBUg_timer_exp Debug GP timer has expired
7 gp_timer_exp RTOS GP timer has expired
6 a9_m2a_6 Interprocessor interrupt source from modem ARM
5 a9_m2a_5 Interprocessor interrupt source from modem ARM
4 a9_m2a_4 Interprocessor interrupt source from modem ARM
3 a9_m2a_3 Interprocessor interrupt source from modem ARM
2 a9_m2a_2 Interprocessor interrupt source from modem ARM
1 a9_m2a_1 Interprocessor interrupt source from modem ARM
0 a9_m2a_0 Interprocessor interrupt source from modem ARM

I tried enabling irqs on linux today by changing those bits and no luck with 3d. However i do notice sometime the device freezes when enabling 3d app. This can be good or bad, i just cant get any info since the phone crashes.
Reply With Quote
This post has been thanked 3 times.
  #179 (permalink)  
Old 07-24-2010, 07:53 AM
deechte's Avatar
Lurker
Offline
Pocket PC: htc d2
Carrier: vodafone
 
Join Date: Mar 2010
Posts: 5
Reputation: 10
deechte is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

Just wanted to let you know I appreciate your work and effort! Keep going guys!
Reply With Quote
  #180 (permalink)  
Old 07-25-2010, 02:03 AM
jonpry's Avatar
PPCGeeks Regular
Offline
Pocket PC: rhodium
Carrier: tmobile
 
Join Date: Apr 2010
Posts: 70
Reputation: 715
jonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuffjonpry knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Why sound isn't working on the TP2.

So the interrupt indentifiers in WinCE for audio are 0x3d, 0x3e, 0x3d, 0x40 and 0x33. Not sure what they do individually. I could figure it out if need be. But even if we could just find out what VIC entries those are for it would narrow it down quite a bit.

Again, I have no way to compile code for WinCE. I wouldn't mind writing the code if somebody wants to get it running. Disabling the already enabled interrupts will likely crash the phone sooner or later. In particular if it tries to play a sound. It seems as though we can disable another processes interrupt handler, but without getting its event id, there is no way to restore it.
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 01:38 PM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com