Audio Playback issue on IMX53 Gingerbread (from Adeneo)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Audio Playback issue on IMX53 Gingerbread (from Adeneo)

1,352 Views
gruger
Contributor III

Dear community,

 

We have been porting our custom board to Adeneo's Gingerbread BSP for IMX53 and have faced an issue related to audio playback.

We are using SGTL5000 as codec and would expect that the integration should be easier.

 

First of all, our hardware has a dedicated oscillator for this codec, which is enabled by OSC_CKIH1_EN GPIO. Here is a code snipped of our custom board file (based on the mx53_loco.c file)

 

static struct mxc_asrc_platform_data mxc_asrc_data = {     .channel_bits = 4,     .clk_map_ver = 2, };  static int headphone_det_status(void) {     return (gpio_get_value(HPHONE_DET));  }  static int mxc_sgtl5000_init(void);  static struct mxc_audio_platform_data sgtl5000_data = {     .ssi_num = 1,     .src_port = 2,     .ext_port = 5,     .hp_irq = gpio_to_irq(HPHONE_DET),     .hp_status = headphone_det_status,     .init = mxc_sgtl5000_init,     .ext_ram_rx = 1,     .ext_ram_tx = 1, };  static int mxc_sgtl5000_init(void) {          /* Enable OSC_CKIH1_EN for audio */     gpio_request(OSC_CKIH1_EN, "osc-en");     gpio_direction_output(OSC_CKIH1_EN, 1);     gpio_set_value(OSC_CKIH1_EN, 1);     gpio_free(OSC_CKIH1_EN);      sgtl5000_data.sysclk = 12288000;     return 0; }  static void __init mxc_board_init(void) { ...         /* Enable OSC_CKIH1_EN for audio */     gpio_request(OSC_CKIH1_EN, "osc-en");     gpio_direction_output(OSC_CKIH1_EN, 1);     gpio_set_value(OSC_CKIH1_EN, 1);     gpio_free(OSC_CKIH1_EN); ...     /* ASRC is only available for MX53 TO2.0 */     if (mx53_revision() >= IMX_CHIP_REVISION_2_0) {         mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk");         clk_put(mxc_asrc_data.asrc_core_clk);         mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk");         clk_put(mxc_asrc_data.asrc_audio_clk);         mxc_register_device(&mxc_asrc_device, &mxc_asrc_data);     } ...     sgtl5000_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk");     clk_put(sgtl5000_data.ext_ram_clk);     mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data);  }    

 

Android is able to boot and we are trying to play a ringtone from the Settings app. Here comes our issue:

 

1) In order to listen to any song, for some unknown reason, we need to enable 48KHz on the ASRC, using ALSA controls, otherwise, the sound can not be listened.

# alsa_amixer -c 0 sset "ASRC" "48KHz"

 

2) After that, when the song is finished, the system crashes. Please refer to the full log attached for further details.

 

Any help would be much appreciated.

 

Thanks in advance.

Original Attachment has been moved to: log-kernel-2014-04-03.txt.zip

0 Kudos
Reply
1 Reply

796 Views
admin
Specialist II

Deactivated user

Hi Adeneo, can someone help with this issue?  Thanks.

0 Kudos
Reply