MoDaCo is undergoing planned maintenance. Site functionality may be reduced - follow @modaco or @paulobrien on Twitter for updates.

  • Announcements

    • Reminder - MoDaCo position on illegal content

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such software
      Nintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)


      CUSTOM ROMS

      You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not be hosted directly in topic via the MoDaCo attachment system
      ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)
      ROMs must give full credit to the original author
      This decision has been taken in light of the huge amount of interest in this area of device customisation within the community, and member feedback! Please note that custom ROM discussion should be kept in specific device sub-areas, (e.g. Kaiser.MoDaCo.com for Kaiser based devices). ISSUES If you have any issues with this policy, please contact me directly via PM. P
    • Support MoDaCo by signing up to a MoDaCo Silver or Gold membership

      To sign up to an annual MoDaCo Silver subscription which will eliminate all ads from the site (as well as giving you access to the MoDaCo Online Kitchens for Android) for only £9.99 using PayPal, Credit or Debit Card, ensure you are logged in to the site, and then click the link below, which will take you directly to the subscription store! You can also sign up to an annual MoDaCo Gold subscription for £29.99, which adds the benefits listed below! PURCHASE A MODACO SUBSCRIPTION - FREE Titanium Backup Mobile for Android worth $5.99! - FREE 1 year PrivateInternetAccess.com worth $39.95! - FREE 1 year LastPass Premium worth $12! - FREE CalcConvert for Pocket PC from Binaryfish worth $17.95! - FREE Calendar Bar for Pocket PC from OmegaOne worth $9.99! - FREE CamerAware for Pocket PC and Smartphone from MoDaCo worth £19.99 / $30! - FREE Chronos for Pocket PC from ActiveKitten worth $14.95! - FREE CodeWallet Pro for Smartphone and Pocket PC from DeveloperOne worth up to $24.95! - FREE Concentrix for Pocket PC from eSoft Interactive worth $9.95! - FREE FlexMail for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE FTouchSL for Pocket PC from Vekoff s.r.o. worth 10 euro / $12.50! - FREE Jewel Challenge for Pocket PC from eSoft Interactive worth $9.95! - FREE John Cody's Alerts Pro for Smartphone from Omnisoft worth $14.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Dutch for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> French for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> German for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Italian for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Spanish for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Dutch for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> French for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> German for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Russian for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Turkish for Smartphone from Lingvosoft worth $49.95! - FREE Note2Self for Pocket PC and Smartphone from WebIS worth up to $19.90! - FREE Opera 8.60 for Pocket PC and Smartphone from Opera Software worth up to $48! - FREE Pocket Informant for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE Pocket Launcher for Pocket PC and Smartphone from Conduits worth $9.95! - FREE PTab for Pocket PC and Smartphone from z4soft worth up to $60! - FREE Resco Explorer for Pocket PC and Smartphone from Resco worth up to $49.90! - FREE Safemode for Pocket PC from monocube worth $12.95 - FREE SplashPhoto for Pocket PC and Smartphone from SplashData worth up to $59.90! - FREE Sprite Backup for Pocket PC and Smartphone from Sprite Software worth $29.95! - FREE Teksoft Glyphs UI for Pocket PC and Smartphone from Teksoft €9.95! - FREE Teksoft HeadsetRemote for Pocket PC and Smartphone from Teksoft €4.95! - FREE Traffic Jam for Pocket PC from eSoft Interactive worth $9.95! - FREE unlock (1 per year) from imei-check.co.uk - DISCOUNT of 10% at MoDaCo FairDeal - DISCOUNT of 10% at Semsons.com - FORUM - AD FREE SITE - FORUM - custom rank / title - FORUM - double competition entries - FORUM - double post attachment space - FORUM - no search flood control - FORUM - priority event registration - FORUM - triple PM space
    • Reminder: Selling items on the forum directly is not allowed

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspensions / ban.

[TUT-KERNEL] How to build a kernel for Acer Based ROMs

102 posts in this topic

Posted · Report post

What clock rate are you use?

And did you use my fix2 kerenl to compare?

I raise the voltage to 1300mv at 883mhz.

If your crash situation(gunfabio's kernel) was above 768mhz, change the speed to 768mhz, and try again.

BTW, i still working on the voice issue on skype, and it's not about mic, it's about audio encoding in qualcomm's dsp.

I uploaded my voice iput fix, and here is what i have done.

fix vibrator problem

--- drivers/i2c/chips/avr.c 2011-05-21 21:26:04.918463238 -0700

+++ ../gnufabio-acer_liquid_chocolate-5318d09_ori/drivers/i2c/chips/avr.c 2011-05-21 21:25:24.766483670 -0700

@@ -74,21 +74,19 @@

#define AVR_KEYMASK_DIRECTION (AVR_KEY_UP|AVR_KEY_DOWN|AVR_KEY_LEFT|AVR_KEY_RIGHT)

-#define AVR_LED_DELAY_TIME 10000

+#define AVR_LED_DELAY_TIME 5000

#define BACKLIGHT_LEVEL_ON 0x8

/* AVR Sensitivity */

#define USE_FS 1

#define SENSITIVITY_REG 0x60

-#define SENSITIVITY 20

+#define SENSITIVITY 30

/* Vibrator */

-#define PM_LIBPROG 0x30000061

-#define PM_LIBVERS 0x10001

-#define ONCRPC_PM_VIB_MOT_SET_VOLT_PROC 22

-#define ONCRPC_PM_VIB_MOT_SET_MODE_PROC 23

-#define VIB_DELAY_TIME 30

+#define VIB_DELAY_TIME 35

+void pmic_vibrator_on(struct work_struct *work);

+void pmic_vibrator_off(struct work_struct *work);

static int __init avr_init(void);

static int avr_probe(struct i2c_client *client, const struct i2c_device_id *id);

@@ -108,6 +106,7 @@

static void low_power_mode(struct i2c_client *client, int mode);

static void key_clear(struct i2c_client *client);

static void avr_led_work_func(struct work_struct *work);

+static void avr_vib_work_func(struct work_struct *work);

#ifdef CONFIG_HAS_EARLYSUSPEND

static void avr_early_suspend(struct early_suspend *h);

static void avr_early_resume(struct early_suspend *h);

@@ -119,15 +118,16 @@

static bool kpd_pwr_key_check = false;

static struct mutex avr_mutex;

static struct delayed_work led_wq;

-static bool led_call = false;

+static struct delayed_work vib_wq;

+

+static int vibr=1;

+module_param(vibr, int, S_IRUGO | S_IWUSR | S_IWGRP);

static const struct i2c_device_id avr_id[] = {

{ AVR_DRIVER_NAME, 0 },

{ }

};

-

-

/* Data for I2C driver */

static struct avr_data {

struct i2c_client *client;

@@ -139,6 +139,7 @@

#endif

unsigned long last_jiffies;

int prekey;

+ int suspended;

} avr_data;

/*File operation of AVR device file */

@@ -223,20 +224,6 @@

#endif

-static int __init avr_init(void)

-{

- int res=0;

-

- res = i2c_add_driver(&avr_driver);

-

- if (res){

- pr_err("[AVR]i2c_add_driver failed! \n");

- return res;

- }

-

- return 0;

-}

-

static int avr_probe(struct i2c_client *client, const struct i2c_device_id *id)

{

@@ -264,6 +251,7 @@

init_waitqueue_head(&avr_data.wait);

INIT_DELAYED_WORK(&led_wq, avr_led_work_func);

+ INIT_DELAYED_WORK(&vib_wq, avr_vib_work_func);

/* input register */

avr_data.input = input_allocate_device();

@@ -382,24 +370,26 @@

#ifdef CONFIG_HAS_EARLYSUSPEND

static void avr_early_suspend(struct early_suspend *h)

{

- pr_info("[AVR] %s ++ entering\n", __FUNCTION__);

+ pr_debug("[AVR] %s ++ entering\n", __FUNCTION__);

- led_call = false;

kpd_resume_check = false;

+ avr_data.suspended=1;

key_clear(avr_data.client);

+ led_off(avr_data.client);

disable_irq(avr_data.client->irq);

- low_power_mode(avr_data.client,1);

+ low_power_mode(avr_data.client, 1);

- pr_info("[AVR] %s -- leaving\n", __FUNCTION__);

+ pr_debug("[AVR] %s -- leaving\n", __FUNCTION__);

}

static void avr_early_resume(struct early_suspend *h)

{

- pr_info("[AVR] %s ++ entering\n", __FUNCTION__);

+ pr_debug("[AVR] %s ++ entering\n", __FUNCTION__);

low_power_mode(avr_data.client,0);

enable_irq(avr_data.client->irq);

+ avr_data.suspended=0;

kpd_resume_check = true;

if(kpd_pwr_key_check){

@@ -407,7 +397,7 @@

led_on(avr_data.client);

}

- pr_info("[AVR] %s -- leaving\n", __FUNCTION__);

+ pr_debug("[AVR] %s -- leaving\n", __FUNCTION__);

}

#endif

@@ -464,17 +454,17 @@

mutex_unlock(&avr_mutex);

return;

}

-

+

cancel_delayed_work(&led_wq);

- if ( key_st != 0)

- {

+ /* TODO: Check KPD LED Function */

+ if ( key_st != 0)

led_on(client);

- led_call = true;

- }

else

schedule_delayed_work(&led_wq, msecs_to_jiffies(AVR_LED_DELAY_TIME));

+

+

if(kpd_fw_check) {

switch(key_st){

case AVR_KEY_MENU:

@@ -526,6 +516,10 @@

/* Send key release if not equal to last key */

if( key_code != avr_data.prekey ){

input_report_key(avr_data.input, avr_data.prekey, 0);

+ if(vibr == 1 && key_code != 0) {

+ pmic_vibrator_on(NULL);

+ schedule_delayed_work(&vib_wq, msecs_to_jiffies(VIB_DELAY_TIME));

+ }

}

/* Send key press if key_code != 0 */

if( key_code ) {

@@ -589,14 +583,6 @@

return -ENOTTY;

}

- if(_IOC_DIR(cmd) & _IOC_READ)

- err = !access_ok(VERIFY_WRITE,(void __user*)arg, _IOC_SIZE(cmd));

- else if(_IOC_DIR(cmd) & _IOC_WRITE)

- err = !access_ok(VERIFY_READ, (void __user*)arg, _IOC_SIZE(cmd));

- if(err){

- pr_err("cmd access_ok error\n");

- return -EFAULT;

- }

if( client == NULL){

pr_err("I2C driver not install (AVR_ioctl)\n");

return -EFAULT;

@@ -613,11 +599,6 @@

pr_debug("[AVR] IOCTL_bSIMPLE_TEST_ON. \n");

break;

case IOCTL_SET_LED_ON:

- if(led_call){

- led_call = false;

- return 0;

- }

-

if(kpd_resume_check){

data_buf[0] = I2C_REG_LED_1;

data_buf[1] = AVR_LED_ON;

@@ -681,7 +662,7 @@

i2c_write(client, data_buf);

mutex_unlock(&avr_mutex);

- pr_debug("[AVR] IOCTL_SET_BL_LV, Set backlight 0x%02X. \n", data_buf[1]);

+ pr_debug("[AVR] IOCTL_SET_BL_LV, Set backlight 0x%02X (asked 0x%02X). \n", data_buf[1], arg);

return err;

case IOCTL_KEY_LOCK_TOGGLE:

data_buf[0] = I2C_REG_KEY_LOCK;

@@ -757,6 +738,8 @@

static void led_on(struct i2c_client *client){

uint8_t data_buf[2] = {0};

+ if(!client)

+ return;

data_buf[0] = I2C_REG_LED_1;

data_buf[1] = AVR_LED_ON;

i2c_write(client, data_buf);

@@ -809,10 +792,66 @@

pr_debug("[AVR] Clear Key Value.\n");

}

-static void avr_led_work_func(struct work_struct *work)

-{

+static void avr_led_work_func(struct work_struct *work) {

led_off(avr_data.client);

- led_call = false;

+ pr_debug("[AVR] Enter LED delay 5 Sec\n");

+}

+

+static void avr_vib_work_func(struct work_struct *work) {

+ pmic_vibrator_off(NULL);

+}

+

+//Blinking code

+

+static struct delayed_work blink_wq;

+static int status=0;

+

+void avr_blink(int value) {

+ status=0;

+ if(value) {

+ if(avr_data.suspended)

+ low_power_mode(avr_data.client, 0);

+ printk("Scheduling blinking\n");

+ schedule_delayed_work(&blink_wq, msecs_to_jiffies(30));

+ } else {

+ cancel_delayed_work(&blink_wq);

+ if(avr_data.suspended) {

+ low_power_mode(avr_data.client, 1);

+ } else {

+ led_on(avr_data.client);

+ printk("Scheduling 5s off\n");

+ schedule_delayed_work(&led_wq, msecs_to_jiffies(AVR_LED_DELAY_TIME));

+ }

+ }

+}

+

+static void blink_work_func(struct work_struct *work) {

+ status=!status;

+ if(status) {

+ printk("Blink turning on\n");

+ led_on(avr_data.client);

+ schedule_delayed_work(&blink_wq, msecs_to_jiffies(500));

+ } else {

+ printk("Blink turning off\n");

+ led_off(avr_data.client);

+ schedule_delayed_work(&blink_wq, msecs_to_jiffies(4500));

+ }

+}

+

+static int __init avr_init(void)

+{

+ int res=0;

+

+ INIT_DELAYED_WORK(&blink_wq, blink_work_func);

+ cancel_delayed_work(&blink_wq);

+ res = i2c_add_driver(&avr_driver);

+

+ if (res){

+ pr_err("[AVR]i2c_add_driver failed! \n");

+ return res;

+ }

+

+ return 0;

}

module_init(avr_init);

fix usb problem

--- arch/arm/mach-msm/board-qsd8x50.c 2011-05-21 22:28:35.256471390 -0700

+++ ../gnufabio-acer_liquid_chocolate-5318d09_ori/arch/arm/mach-msm/board-qsd8x50.c 2011-05-18 14:43:27.000000000 -0700

@@ -194,21 +194,12 @@

/* dynamic composition */

static struct usb_composition usb_func_composition[] = {

{

- .product_id = 0x3203,

- /* DIAG + ADB + GENERIC MODEM + GENERIC NMEA + MSC*/

- .functions = 0x2764,

- .adb_product_id = 0x3202,

- .adb_functions = 0x27614

- },

-#ifdef CONFIG_USB_ANDROID_RNDIS

- {

- /* RNDIS */

.product_id = 0x3223,

- .functions = 0x764A,

+ /* DIAG + ADB + GENERIC MODEM + GENERIC NMEA + MSC+ RNDIS*/

+ .functions = 0x2764A,

.adb_product_id = 0x3222,

- .adb_functions = 0x7614A,

+ .adb_functions = 0x27614A,

},

-#endif

};

#else

/* dynamic composition */

--- drivers/usb/gadget/android.c 2011-05-21 21:36:23.610461922 -0700

+++ ../gnufabio-acer_liquid_chocolate-5318d09_ori/drivers/usb/gadget/android.c 2011-05-18 14:43:27.000000000 -0700

@@ -68,7 +68,7 @@

MODULE_VERSION("1.0");

/* product id */

-static u16 product_id = 0x3203;

+static u16 product_id = 0x3223;

static int android_set_pid(const char *val, struct kernel_param *kp);

static int android_get_pid(char *buffer, struct kernel_param *kp);

module_param_call(product_id, android_set_pid, android_get_pid,

@@ -290,8 +290,6 @@

.label = "android",

.bind = android_bind_config,

.bConfigurationValue = 1,

- .bmAttributes = (USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER |

- USB_CONFIG_ATT_WAKEUP),

.bMaxPower = 0xFA, /* 500ma */

};

@@ -300,9 +298,7 @@

if (acm_func_cnt || gser_func_cnt)

gserial_cleanup();

#if defined(CONFIG_USB_ANDROID_CDC_ECM) || defined(CONFIG_USB_ANDROID_RNDIS)

-#ifndef CONFIG_MACH_ACER_A1

gether_cleanup();

-#endif //#ifndef CONFIG_MACH_ACER_A1f

#endif

return 0;

@@ -348,28 +344,16 @@

device_desc.idProduct = __constant_cpu_to_le16(product_id);

if (gadget->ops->wakeup)

android_config_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;

-

+ if (dev->pdata->self_powered && !usb_gadget_set_selfpowered(gadget))

+ android_config_driver.bmAttributes |= USB_CONFIG_ATT_SELFPOWER;

dev->cdev = cdev;

dev->gadget = gadget;

#if defined(CONFIG_USB_ANDROID_CDC_ECM) || defined(CONFIG_USB_ANDROID_RNDIS)

/* set up network link layer */

-#ifdef CONFIG_MACH_ACER_A1

- {

- static int x=0;

- if(!x){

- x++;

- ret = gether_setup(cdev->gadget, hostaddr);

- if (ret < 0)

- return ret;

- }

- }

-#else

ret = gether_setup(cdev->gadget, hostaddr);

if (ret < 0)

return ret;

-#endif //CONFIG_MACH_ACER_A1

-

#endif

/* register our configuration */

@@ -395,7 +379,6 @@

device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);

}

- usb_gadget_set_selfpowered(gadget);

num_ports = acm_func_cnt + gser_func_cnt;

if (acm_func_cnt || gser_func_cnt) {

ret = gserial_setup(cdev->gadget, num_ports);

@@ -708,11 +691,6 @@

static void __exit cleanup(void)

{

-#ifdef CONFIG_MACH_ACER_A1

-#if defined(CONFIG_USB_ANDROID_CDC_ECM) || defined(CONFIG_USB_ANDROID_RNDIS)

- gether_cleanup();

-#endif

-#endif //CONFIG_MACH_ACER_A1

usb_composite_unregister(&android_usb_driver);

misc_deregister(&adb_enable_device);

platform_driver_unregister(&android_platform_driver);

fix voice input

--- arch/arm/mach-msm/qdsp6/q6audio.c 2011-05-21 20:56:23.566463307 -0700

+++ ../gnufabio-acer_liquid_chocolate-5318d09_ori/arch/arm/mach-msm/qdsp6/q6audio.c 2011-05-18 14:43:27.000000000 -0700

@@ -80,28 +80,28 @@

#else

static struct q6_hw_info q6_audio_hw[Q6_HW_COUNT] = {

[Q6_HW_HANDSET] = {

- .min_gain = -903,

- .max_gain = 602,

+ .min_gain = -400,

+ .max_gain = 1100,

},

[Q6_HW_HEADSET] = {

- .min_gain = -903,

- .max_gain = 602,

+ .min_gain = -1100,

+ .max_gain = 400,

},

[Q6_HW_SPEAKER] = {

- .min_gain = -903,

- .max_gain = 602,

+ .min_gain = -1000,

+ .max_gain = 500,

},

[Q6_HW_TTY] = {

- .min_gain = -2000,

+ .min_gain = 0,

.max_gain = 0,

},

[Q6_HW_BT_SCO] = {

- .min_gain = -903,

- .max_gain = 602,

+ .min_gain = -1100,

+ .max_gain = 400,

},

[Q6_HW_BT_A2DP] = {

- .min_gain = -903,

- .max_gain = 602,

+ .min_gain = -1100,

+ .max_gain = 400,

},

};

#endif

@@ -149,54 +149,69 @@

analog_ops = ops;

}

-static struct q6_device_info *q6_lookup_device(uint32_t device_id)

+static struct q6_device_info *q6_lookup_device(uint32_t device_id,

+ uint32_t acdb_id)

{

struct q6_device_info *di = q6_audio_devices;

- for (;:P {

- if (di->id == device_id)

- return di;

- if (di->id == 0) {

- pr_err("q6_lookup_device: bogus id 0x%08x\n",

- device_id);

- return di;

+

+ if (acdb_id) {

+ for (;:rolleyes: {

+ if (di->cad_id == acdb_id && di->id == device_id)

+ return di;

+ if (di->id == 0) {

+ pr_err("q6_lookup_device: bogus id 0x%08x\n",

+ device_id);

+ return di;

+ }

+ di++;

+ }

+ } else {

+ for (;<_< {

+ if (di->id == device_id)

+ return di;

+ if (di->id == 0) {

+ pr_err("q6_lookup_device: bogus id 0x%08x\n",

+ device_id);

+ return di;

+ }

+ di++;

}

- di++;

}

}

static uint32_t q6_device_to_codec(uint32_t device_id)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, 0);

return di->codec;

}

static uint32_t q6_device_to_dir(uint32_t device_id)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, 0);

return di->dir;

}

static uint32_t q6_device_to_cad_id(uint32_t device_id)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, 0);

return di->cad_id;

}

-static uint32_t q6_device_to_path(uint32_t device_id)

+static uint32_t q6_device_to_path(uint32_t device_id, uint32_t acdb_id)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, acdb_id);

return di->path;

}

static uint32_t q6_device_to_rate(uint32_t device_id)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, 0);

return di->rate;

}

int q6_device_volume(uint32_t device_id, int level)

{

- struct q6_device_info *di = q6_lookup_device(device_id);

+ struct q6_device_info *di = q6_lookup_device(device_id, 0);

struct q6_hw_info *hw;

hw = &q6_audio_hw[di->hw];

@@ -622,8 +637,14 @@

memset(&rpc, 0, sizeof(rpc));

rpc.hdr.opcode = ADSP_AUDIO_IOCTL_SET_DEVICE_CONFIG_TABLE;

- if (q6_device_to_dir(device_id) == Q6_TX)

- rpc.hdr.data = tx_clk_freq;

+ if (q6_device_to_dir(device_id) == Q6_TX) {

+ if (tx_clk_freq > 16000)

+ rpc.hdr.data = 48000;

+ else if (tx_clk_freq > 8000)

+ rpc.hdr.data = 16000;

+ else

+ rpc.hdr.data = 8000;

+ }

rpc.device_id = device_id;

rpc.phys_addr = audio_phys;

rpc.phys_size = size;

@@ -1072,21 +1093,28 @@

{

audio_tx_analog_enable(1);

- adie_enable();

- adie_set_path(adie, audio_tx_path_id, ADIE_PATH_TX);

+ if (audio_tx_path_id) {

+ adie_enable();

+ adie_set_path(adie, audio_tx_path_id, ADIE_PATH_TX);

- if (tx_clk_freq > 8000)

- adie_set_path_freq_plan(adie, ADIE_PATH_TX, 48000);

- else

- adie_set_path_freq_plan(adie, ADIE_PATH_TX, 8000);

+ if (tx_clk_freq > 16000)

+ adie_set_path_freq_plan(adie, ADIE_PATH_TX, 48000);

+ else if (tx_clk_freq > 8000)

+ adie_set_path_freq_plan(adie, ADIE_PATH_TX, 16000);

+ else

+ adie_set_path_freq_plan(adie, ADIE_PATH_TX, 8000);

- adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_DIGITAL_READY);

- adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_DIGITAL_ANALOG_READY);

+ adie_proceed_to_stage(adie, ADIE_PATH_TX,

+ ADIE_STAGE_DIGITAL_READY);

+ adie_proceed_to_stage(adie, ADIE_PATH_TX,

+ ADIE_STAGE_DIGITAL_ANALOG_READY);

+ }

audio_update_acdb(audio_tx_device_id, acdb_id);

if (!reconf)

- qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, audio_tx_device_id);

+ qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE,

+ audio_tx_device_id);

qdsp6_standby(ac_control);

qdsp6_start(ac_control);

@@ -1097,18 +1125,26 @@

{

audio_rx_analog_enable(0);

- adie_proceed_to_stage(adie, ADIE_PATH_RX, ADIE_STAGE_ANALOG_OFF);

- adie_proceed_to_stage(adie, ADIE_PATH_RX, ADIE_STAGE_DIGITAL_OFF);

- adie_disable();

+ if (audio_rx_path_id) {

+ adie_proceed_to_stage(adie, ADIE_PATH_RX,

+ ADIE_STAGE_ANALOG_OFF);

+ adie_proceed_to_stage(adie, ADIE_PATH_RX,

+ ADIE_STAGE_DIGITAL_OFF);

+ adie_disable();

+ }

}

static void _audio_tx_path_disable(void)

{

audio_tx_analog_enable(0);

- adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_ANALOG_OFF);

- adie_proceed_to_stage(adie, ADIE_PATH_TX, ADIE_STAGE_DIGITAL_OFF);

- adie_disable();

+ if (audio_tx_path_id) {

+ adie_proceed_to_stage(adie, ADIE_PATH_TX,

+ ADIE_STAGE_ANALOG_OFF);

+ adie_proceed_to_stage(adie, ADIE_PATH_TX,

+ ADIE_STAGE_DIGITAL_OFF);

+ adie_disable();

+ }

}

static int icodec_rx_clk_refcount;

@@ -1151,12 +1187,20 @@

static void _audio_tx_clk_enable(void)

{

uint32_t device_group = q6_device_to_codec(audio_tx_device_id);

+ uint32_t icodec_tx_clk_rate;

switch (device_group) {

case Q6_ICODEC_TX:

icodec_tx_clk_refcount++;

if (icodec_tx_clk_refcount == 1) {

- clk_set_rate(icodec_tx_clk, tx_clk_freq * 256);

+ if (tx_clk_freq > 16000)

+ icodec_tx_clk_rate = 48000;

+ else if (tx_clk_freq > 8000)

+ icodec_tx_clk_rate = 16000;

+ else

+ icodec_tx_clk_rate = 8000;

+

+ clk_set_rate(icodec_tx_clk, icodec_tx_clk_rate * 256);

clk_enable(icodec_tx_clk);

}

break;

@@ -1243,7 +1287,7 @@

}

}

-static void _audio_rx_clk_reinit(uint32_t rx_device)

+static void _audio_rx_clk_reinit(uint32_t rx_device, uint32_t acdb_id)

{

uint32_t device_group = q6_device_to_codec(rx_device);

@@ -1251,14 +1295,14 @@

_audio_rx_clk_disable();

audio_rx_device_id = rx_device;

- audio_rx_path_id = q6_device_to_path(rx_device);

+ audio_rx_path_id = q6_device_to_path(rx_device, acdb_id);

if (device_group != audio_rx_device_group)

_audio_rx_clk_enable();

}

-static void _audio_tx_clk_reinit(uint32_t tx_device)

+static void _audio_tx_clk_reinit(uint32_t tx_device, uint32_t acdb_id)

{

uint32_t device_group = q6_device_to_codec(tx_device);

@@ -1266,7 +1310,7 @@

_audio_tx_clk_disable();

audio_tx_device_id = tx_device;

- audio_tx_path_id = q6_device_to_path(tx_device);

+ audio_tx_path_id = q6_device_to_path(tx_device, acdb_id);

if (device_group != audio_tx_device_group)

_audio_tx_clk_enable();

@@ -1404,7 +1448,7 @@

static void do_rx_routing(uint32_t device_id, uint32_t acdb_id)

{

if (device_id == audio_rx_device_id &&

- audio_rx_path_id == q6_device_to_path(device_id)) {

+ audio_rx_path_id == q6_device_to_path(device_id, acdb_id)) {

if (acdb_id != rx_acdb) {

audio_update_acdb(device_id, acdb_id);

qdsp6_devchg_notify(ac_control, ADSP_AUDIO_RX_DEVICE, device_id);

@@ -1417,18 +1461,18 @@

if (audio_rx_path_refcount > 0) {

qdsp6_devchg_notify(ac_control, ADSP_AUDIO_RX_DEVICE, device_id);

_audio_rx_path_disable();

- _audio_rx_clk_reinit(device_id);

+ _audio_rx_clk_reinit(device_id, acdb_id);

_audio_rx_path_enable(1, acdb_id);

} else {

audio_rx_device_id = device_id;

- audio_rx_path_id = q6_device_to_path(device_id);

+ audio_rx_path_id = q6_device_to_path(device_id, acdb_id);

}

}

static void do_tx_routing(uint32_t device_id, uint32_t acdb_id)

{

if (device_id == audio_tx_device_id &&

- audio_tx_path_id == q6_device_to_path(device_id)) {

+ audio_tx_path_id == q6_device_to_path(device_id, acdb_id)) {

if (acdb_id != tx_acdb) {

audio_update_acdb(device_id, acdb_id);

qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, device_id);

@@ -1441,11 +1485,12 @@

if (audio_tx_path_refcount > 0) {

qdsp6_devchg_notify(ac_control, ADSP_AUDIO_TX_DEVICE, device_id);

_audio_tx_path_disable();

- _audio_tx_clk_reinit(device_id);

+ _audio_tx_clk_reinit(device_id, acdb_id);

_audio_tx_path_enable(1, acdb_id);

} else {

audio_tx_device_id = device_id;

- audio_tx_path_id = q6_device_to_path(device_id);

+ audio_tx_path_id = q6_device_to_path(device_id, acdb_id);

+ tx_acdb = acdb_id;

}

}

@@ -1559,9 +1604,9 @@

}

} else {

/* TODO: consider concurrency with voice call */

- tx_clk_freq = rate;

audio_tx_path_refcount++;

if (audio_tx_path_refcount == 1) {

+ tx_clk_freq = rate;

_audio_tx_clk_enable();

_audio_tx_path_enable(0, acdb_id);

}

@@ -1632,10 +1677,11 @@

ac->flags = flags;

if (ac->flags & AUDIO_FLAG_WRITE)

- audio_rx_path_enable(1, 0);

+ audio_rx_path_enable(1, rx_acdb);

else {

- tx_clk_freq = 8000;

- audio_tx_path_enable(1, 0);

+ if (!audio_tx_path_refcount)

+ tx_clk_freq = 8000;

+ audio_tx_path_enable(1, tx_acdb);

}

return ac;

@@ -1754,7 +1800,8 @@

if (ac->flags & AUDIO_FLAG_WRITE)

audio_rx_path_enable(1, acdb_id);

else{

- tx_clk_freq = 48000;

+ if (!audio_tx_path_refcount)

+ tx_clk_freq = 48000;

audio_tx_path_enable(1, acdb_id);

}

@@ -1793,7 +1840,8 @@

if (ac->flags & AUDIO_FLAG_WRITE)

audio_rx_path_enable(1, acdb_id);

else{

- tx_clk_freq = 8000;

+ if (!audio_tx_path_refcount)

+ tx_clk_freq = 8000;

audio_tx_path_enable(1, acdb_id);

}

@@ -1829,7 +1877,8 @@

if (ac->flags & AUDIO_FLAG_WRITE)

audio_rx_path_enable(1, acdb_id);

else{

- tx_clk_freq = 8000;

+ if (!audio_tx_path_refcount)

+ tx_clk_freq = 8000;

audio_tx_path_enable(1, acdb_id);

}

0

Share this post


Link to post
Share on other sites

Posted · Report post

Great, thanks rithchen :P The only thing to fix now is the drain related to wifi

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

V 110522-1255: http://www.multiupload.com/D69TIGKB92

You can find the logcat in the first page

can i use it on top of the fear 1.0b1, or it can cause issues?

Edited by zorginho
0

Share this post


Link to post
Share on other sites

Posted · Report post

can i use it on top of the fear 1.0b1, or it can cause issues?

Yep, i use it with fear rom every day, it runs great. The only problem is that you have to enable and disable the wifi on each boot to fix the fast battery drain. I'm trying to fix it but it seems to be hard :P

0

Share this post


Link to post
Share on other sites

Posted · Report post

Yep, i use it with fear rom every day, it runs great. The only problem is that you have to enable and disable the wifi on each boot to fix the fast battery drain. I'm trying to fix it but it seems to be hard :P

So I never noticed battery drain because I use green power and it does that automatically to save power... lol!!!

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

New version released.

Battery drain fix, see the first page for more details

Download: http://goo.gl/j7FTU

Edited by gnufabio
0

Share this post


Link to post
Share on other sites

Posted · Report post

How do you get this to work on the nightly build №83?

0

Share this post


Link to post
Share on other sites

Posted · Report post

How do you get this to work on the nightly build №83?

This kernel is for Acer Based ROMs (stock, t&l ecc)

0

Share this post


Link to post
Share on other sites

Posted · Report post

New version released.

Battery drain fix, see the first page for more details

Download: http://goo.gl/93Mae

My first battery cicle with this kernel.. very impressive!

Medium usage got 1 day and 7 hours and still got 34% left.

great job fabio

0

Share this post


Link to post
Share on other sites

Posted · Report post

My first battery cicle with this kernel.. very impressive!

Medium usage got 1 day and 7 hours and still got 34% left.

great job fabio

Thanks :D

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

gnufabio can u build latest kernel for this rom CM6.1 Roggin/Dario93 V2? thx!

Sorry, i mean choco kernel))))

Edited by Hilo27
0

Share this post


Link to post
Share on other sites

Posted · Report post

gnufabio can u build latest kernel for this rom CM6.1 Roggin/Dario93 V2? thx!

Sorry, i mean choco kernel))))

Will try when porting cm 6.1.1 :D

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Will try when porting cm 6.1.1 :D

this would be great, but i think that if u use a phoenix's ver of chocolate kernel (the ones included in froyo miui) it can be easyer to port to a cm6.1.1 without issues.

sry for my bad eng

Edited by zorginho
0

Share this post


Link to post
Share on other sites

Posted · Report post

this would be great, but i think that if u use a phoenix's ver of chocolate kernel (the ones included in froyo miui) it can be easyer to port to a cm6.1.1 without issues.

sry for my bad eng

that kernel is a bit old... if the switch define "MIUI" to change screen calibration is still present on thepasto sources, you could use that sources without patches with cm 6.1 and froyo miui.

0

Share this post


Link to post
Share on other sites

Posted · Report post

that kernel is a bit old... if the switch define "MIUI" to change screen calibration is still present on thepasto sources, you could use that sources without patches with cm 6.1 and froyo miui.

u're more expert than me, but I would like to avoid the newsernsors, the softkey issue, the wifi issue, and other issues related to the new kernel builds.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

gnufabio, small bugreport for last chocolate kernel... During the call, after a while the sound in the speaker becomes distorted: a lot of treble and no low and mid freq. Changing CPU mode, CPU frequency, a reboot does not help. But sometimes pressing the volume down button during a call helps, the distortion disappears

Edited by _vadim_
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

_vadim_ переключи на громкеую и обратно, помогает

small bugreport for last chocolate kernel... During the call, after a while the sound in the speaker becomes distorted: a lot of treble and no low and mid freq
yeah i have this bug too. If you turn on the speakerphone and then switch back, the problem will disappear. Edited by Hilo27
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

_vadim_ переключи на громкеую и обратно, помогает

спасибо за подсказку :D

But in otherwise this kernel I really like, especially the poor appetite for battery :D

Edited by _vadim_
0

Share this post


Link to post
Share on other sites

Posted · Report post

спасибо за подсказку :D

But in otherwise this kernel I really like, especially the poor appetite for battery :D

Don't worry i will try to fix this problem when I have time...sorry in this days school is eating my time :o

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Open shell and make it executable with chmod +x filename

gnufabio, сan you further explain this part of the code, what file name? thx!

Edited by Hilo27
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

gnufabio, сan you further explain this part of the code, what file name? thx!

Hilo27, качаешь скрипт kacer с гитхаба и делаешь его исполняемым в терминале командой

chmod +x kaser

Без этого скрипты не могут быть запущены в Linux - политика безопасности :D

Edited by _vadim_
0

Share this post


Link to post
Share on other sites

Posted · Report post

пишет файл или команда не найдены)))

0

Share this post


Link to post
Share on other sites

Posted · Report post

пишет файл или команда не найдены)))

попробуй полный путь к скрипту прописать и перед chmod допиши sudo (это если Ubuntu)

дааа... на 4пда как-то удобнее форум организован

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

помогло! надо было писать sudo chmod +x ./kacer, спасибо)!

да уж 4пда по удобней

ан нет, рно обрадовался, создаётся архив, но он пустой, а если зайти в терминал и написать kacer до выдаёт что команда не найдена.

gnufabio can u help me? I can't handle with your kacer script)))))

what i was done:

1. in terminal i wrote sudo chmod +x kacer, then wrote my password, it's seems correct

2. then i execute a kacer script by double clicking on it.

3. when it request the number of cpu and started cooking, after a while, script close without any warning

4. after i found in workspace dir acer-choco-kernel-DATE-HOUR.zip, but it was almost empty (without boot.img inside)

Where did I go wrong? thx for your time!

Oh forgotten, of course i prepared a script, according my workspace path

Edited by Hilo27
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.