JetDroid can sing now :) - Audio support added

JetPlatform (Gingerbread) testing releases will be posted here by the DevTeam. This forum is open for feedback from test users.
Forum rules
Dev Team members can post testing releases here. Please give a link to the source base that was used for a release or post patches / changelogs along with your binary packages.

Registered users can reply with their test feedback. Please only post test feedback here. For general (e.g. install related questions) please use the support Q&A section.

Re: JetDroid can sing now :) - Audio support added

Postby Carlos_Manuel » Fri Aug 03, 2012 11:06 am

Nice! :)

I noticed that JetPlatform Binary (Gingerbread 0.5pre1) does not have asound.conf, isn't that needed too to get audio work correctly?

I still have MAX9877 asound.conf file which might make something better, I would test it if I can fix the SD card place myself but it still might not read SD card.. :/
JétDroid ROMs, stuff... http://code.google.com/p/android-for-jet/
My YT Channel: http://www.youtube.com/user/CarlosJacksonHD
Github: manumanfred
XDA-Devs: Carlos_Manuel

Galaxy Nexus:
ROM: My own ROM 'Dreams', (KTU84P) KitKat 4.4.4
User avatar
Carlos_Manuel
Dev Team
Dev Team
 
Posts: 883
Joined: Tue Mar 29, 2011 11:50 am
Location: Estonia / Finland

Advertisement

       

Re: JetDroid can sing now :) - Audio support added

Postby KB_JetDroid » Sat Aug 04, 2012 10:16 am

cx_star wrote:i want to use fsa9480 in my test program which booting from tf.
i know fsa9480 conmunicate with cp through iic_gpio.
but my program don't reveive a ack from fas9480 .
this is the code
Code: Select all
//iic
void usbsw_test(void)
{
   unsigned int i=0;
   for(i=0;i<255;i++)
   {
      IIC_restart();
      if(IIC_outb(i))
      {
         myprintf("add:%x",i);
         while(1);//read a ack!!
      }
      myprintf(":%x\r\n",i);
      IIC_stop();
      
   }
}
void setSDA_OUT(void)
{
    unsigned long tmp;
    tmp = GPKCON0_REG;
    tmp &= 0x0fffffff;
    tmp |= 0x10000000;  //SDA, gpk7 out
    GPKCON0_REG = tmp;
}
void setSDA_IN(void)
{
    unsigned long tmp;
    tmp = GPKCON0_REG;
    tmp &= 0x0fffffff;
    //tmp |= 0x00000000;  //SDA, gpk7 in
    GPKCON0_REG = tmp;
}
void setSCL_OUT(void)
{
    unsigned long tmp;   
    tmp = GPKCON0_REG;
    tmp &= 0xf0ffffff;
    tmp |= 0x01000000;  //SCL, gpk6 out
    GPKCON0_REG = tmp;   
}
void setSCL_IN(void)
{
    unsigned long tmp;   
    tmp = GPKCON0_REG;
    tmp &= 0xf0ffffff;
    //tmp |= 0x00000000;  //SCL, gpk6 IN
    GPKCON0_REG = tmp;   
}
void initIIC(void)
{
   //IIC_SDA_SCL_DIS_PULL;
   setSDA_OUT();
   setSCL_OUT();
   IIC_SCL_1;
   IIC_SDA_1;
   delay_us(60*1000);//60ms
   IIC_SCL_0;
   IIC_SDA_0;
   delay_us(60*1000);//reset switch
   IIC_SCL_1;
   IIC_SDA_1;      //standby
}
void IIC_start(void)
{
   IIC_SDA_0;
   delay_us(2);// >0.6us
   IIC_SCL_0;
   delay_us(4);// >1.3us
}
void IIC_restart(void)
{
//   setSDA_OUT();
   IIC_SCL_1;
   IIC_SDA_1;
   delay_us(2);// >0.6us
   IIC_SDA_0;
   delay_us(2);// >0.6us
   IIC_SCL_0;
   delay_us(2);//
}
void IIC_stop(void)
{
   IIC_SDA_0;
   IIC_SCL_1;   
   delay_us(2);// >0.6us
   IIC_SDA_1;
   delay_us(2);// >0.6us
}
int IIC_outb(unsigned char c)
{
   int i;
   for(i=7;i>=0;i--)
   {
      if((c>>i)&1)
      {
         IIC_SDA_1;
      }else
      {
         IIC_SDA_0;
      }
      delay_us(2);// >0.6us
      IIC_SCL_1;
      delay_us(4);// >0.6us
      IIC_SCL_0;
   }
   IIC_SDA_1;   
   setSDA_IN();
   delay_us(2);
   IIC_SCL_1;   
   if(IIC_SDA_DATA>0)
      i=0;   //no
   else
      i=1;   //yes
   IIC_SCL_0;
   setSDA_OUT();   
   return i;   
}
#endif


Thanks for sharing the code. Haven't looked in details, but noticed couple of things which you might wanna check.
1. Where are you sending the slave address (0x25 for fsa9480) before sending any data? Your for loop from 0 to 255 eventually might send the address but still I guess you need to send the slave address explicitely. Try the following code:
Code: Select all
void usbsw_test(void)
{
   unsigned int i=0;
   for(i=0;i<255;i++)
   {
      IIC_restart();
      if(IIC_outb(0x4A)) //7bit address + W/R = 0 for writing register address
      {
         myprintf("first ack");
      }
      if(IIC_outb(0x01)) //Address of register "Device ID"
      {
         myprintf("second ack",i);
      }
      IIC_restart();
      if(IIC_outb(0x4B)) //7bit address + W/R = 1 for reading register
      {
         myprintf("third ack");
      }
      //Some function to read register value
      //
      myprintf(":%x\r\n",i);
      IIC_stop();
      
   }
}

2. While reading ack, give some time for the fsa9480 to pull the SDA pin low. Ideally the SDA line should be low at the time when you are reading but still.
Code: Select all
//in function IIC_outb

   IIC_SDA_1;   
   setSDA_IN();
   delay_us(2);
   IIC_SCL_1;   
   for(i=3;i>=0;i--)
   {
       delay_us(4);
       if(IIC_SDA_DATA == 0) {
           IIC_SCL_0;
           setSDA_OUT();   
           return 1;
       }   
   }

   if(IIC_SDA_DATA>0)
      i=0;   //no
   else
      i=1;   //yes
   IIC_SCL_0;
   setSDA_OUT();   
   return i;   

Also can you let me know which exact hardware point (TP or resistor or whatever) you altered for booting from TF instead NAND? Also do send me the log if you have any generated using your code.

Thanks,
-KB
KB_JetDroid
Dev Team
Dev Team
 
Posts: 82
Joined: Sun Nov 14, 2010 12:18 pm

Re: JetDroid can sing now :) - Audio support added

Postby KB_JetDroid » Sat Aug 04, 2012 10:20 am

Carlos_Manuel wrote:Nice! :)

I noticed that JetPlatform Binary (Gingerbread 0.5pre1) does not have asound.conf, isn't that needed too to get audio work correctly?

I still have MAX9877 asound.conf file which might make something better, I would test it if I can fix the SD card place myself but it still might not read SD card.. :/

Hi Carlos,

I have used the new audio library HAL which tom3q has used for spica. In this the configuration is done in the library file AudioHardware.cpp itself. Hence no other configuration file is needed. Thanks for your input anyway :)

-KB
KB_JetDroid
Dev Team
Dev Team
 
Posts: 82
Joined: Sun Nov 14, 2010 12:18 pm

Re: JetDroid can sing now :) - Audio support added

Postby Carlos_Manuel » Sat Aug 04, 2012 12:13 pm

KB_JetDroid wrote:Hi Carlos,

I have used the new audio library HAL which tom3q has used for spica. In this the configuration is done in the library file AudioHardware.cpp itself. Hence no other configuration file is needed. Thanks for your input anyway :)

-KB


Hi KB_JetDroid!

Okay, good to know that and thanks for the reply... :)
JétDroid ROMs, stuff... http://code.google.com/p/android-for-jet/
My YT Channel: http://www.youtube.com/user/CarlosJacksonHD
Github: manumanfred
XDA-Devs: Carlos_Manuel

Galaxy Nexus:
ROM: My own ROM 'Dreams', (KTU84P) KitKat 4.4.4
User avatar
Carlos_Manuel
Dev Team
Dev Team
 
Posts: 883
Joined: Tue Mar 29, 2011 11:50 am
Location: Estonia / Finland

Re: JetDroid can sing now :) - Audio support added

Postby cx_star » Sun Aug 05, 2012 2:56 pm

While reading ack, give some time for the fsa9480 to pull the SDA pin low. Ideally the SDA line should be low at the time when you are reading but still.


i have try your code.
Code: Select all
   for(i=3;i>=0;i--)
   {
       delay_us(4);
       if(IIC_SDA_DATA == 0) {
           IIC_SCL_0;
           setSDA_OUT();   
           return 1;
       }   
   }

but it still can not read a ack in function IIC_outb......

Also can you let me know which exact hardware point (TP or resistor or whatever) you altered for booting from TF instead NAND? Also do send me the log if you have any generated using your code.

this is easy,
http://code.google.com/p/jetdroid/wiki/JetJTAG
connect the jtag pin 9 and pin 10, then the s3c6410 will boot from tf.
and the boot address is like this:
1.jpg

2.jpg
You do not have the required permissions to view the files attached to this post.
cx_star
Junior member
Junior member
 
Posts: 42
Joined: Mon Dec 27, 2010 9:56 am

Re: JetDroid can sing now :) - Audio support added

Postby fada3 » Wed Aug 22, 2012 9:03 am

finally i was able to try this new feature and it works :) thank you boys for doing such a great work ;)
fada3
Freshman
 
Posts: 6
Joined: Mon Nov 01, 2010 8:48 pm

Re: JetDroid can sing now :) - Audio support added

Postby Carlos_Manuel » Sat Jan 12, 2013 10:10 pm

The power issue (shutdown in JetDroid mode) is not yet fixed.


These lines fixed standby and then JetDroid stays in idle:
Code: Select all
   chmod 0777 /sys/class/timed_output/flash/enable
    chmod 0777 /sys/class/switch/send_end/state
    chmod 0777 /sys/class/timed_output/vibrator/enable
    chmod 0777 /sys/devices/platform/s3c-lcd/lcd_power
    chmod 0777 /sys/class/lightsensor/switch_cmd/lightsensor_file_state
    chmod 0777 /sys/class/lightsensor/switch_cmd/lightsensor_file_cmd


Unfortunately this won't work on ICS, those lines are from GT-I8000 Omnia's Froyo CM6.# ROM.

If this doesn't work then enable WiFi, enable Bluetooth, Disable WiFi and disable Bluetooth, then go to settings and press build number so many times until you see the "Easter egg ?Android and the zombies?" and then go to the home screen and press end call and soon after doing that press end call again to wake up screen, then unlock Jét and shut down and then boot to JetDroid mode, unlock Jét, let it to go into idle... then wake up screen by pressing any button..

Now standby should work well without any issues..

KB_JetDroid, when you have fixed the standby on this kernel then can you please tell me what changes you have made to fix it.? Thanks. :)
JétDroid ROMs, stuff... http://code.google.com/p/android-for-jet/
My YT Channel: http://www.youtube.com/user/CarlosJacksonHD
Github: manumanfred
XDA-Devs: Carlos_Manuel

Galaxy Nexus:
ROM: My own ROM 'Dreams', (KTU84P) KitKat 4.4.4
User avatar
Carlos_Manuel
Dev Team
Dev Team
 
Posts: 883
Joined: Tue Mar 29, 2011 11:50 am
Location: Estonia / Finland

Previous

Return to JetPlatform (Gingerbread) Testing

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement
cron