Android 6 No sound output from SGTL5000

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

Android 6 No sound output from SGTL5000

1,844 Views
dcraw
Contributor II

I am using the Android 6.0.1 release with an imx6 board using the sgtl500 audio codec.  I can successfully hear wave files played with tinyalsa.  But, when the Android OS plays a sound I get this error repeated over and over in logcat

05-24 17:37:04.947   242   978 I audio_hw_primary: start_output_stream... -1241455296, device 2

05-24 17:37:04.947   242   978 W audio_hw_primary: card -1, port 0 device 0x2

05-24 17:37:04.947   242   978 W audio_hw_primary: rate 44100, channel 2 period_size 0xc0

05-24 17:37:04.947   242   978 E audio_hw_primary: cannot open pcm_out driver 0: cannot open device '/dev/snd/pcmC4294967295D0p': No such file or directory

What adds /dev/snd/pcmC4294967295D0p under the dev tree.  I added config_sgtl5000 to hardware/imx/alsa/tinyalsa_hal.c  But, perhaps something is not setup correctly?

cat /proc/asound/cards

0 [imx6qqmx6sgtl50]: imx6q-qmx6-sgtl - imx6q-qmx6-sgtl5000

                      imx6q-qmx6-sgtl5000

0 Kudos
4 Replies

915 Views
igorpadykov
NXP Employee
NXP Employee

Hi Doug

sgtl5000 is supported on boundary devices boards and one can look at example

linux-imx6/imx6dl-nitrogen6x.dts at boundary-imx_3.14.52_1.1.0_ga · boundarydevices/linux-imx6 · Git...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

915 Views
dcraw
Contributor II

I got it working.  I had to make this change to hardware/imx/alsa/config_sgtl5000.h.  Not sure if all of those supported out devices were necessary, but at least one of them was.

static struct audio_card  sgtl5000_card = {

    .name = "imx6q-qmx6-sgtl5000",

    .driver_name = "imx6q-qmx6-sgtl",

-    .supported_out_devices = AUDIO_DEVICE_OUT_AUX_DIGITAL,

-    .supported_in_devices  = AUDIO_DEVICE_IN_AUX_DIGITAL,

+      .supported_out_devices = (AUDIO_DEVICE_OUT_EARPIECE |

+              AUDIO_DEVICE_OUT_SPEAKER |

+              AUDIO_DEVICE_OUT_WIRED_HEADSET |

+              AUDIO_DEVICE_OUT_WIRED_HEADPHONE |

+              AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |

+              AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |

+              AUDIO_DEVICE_OUT_ALL_SCO |

+              AUDIO_DEVICE_OUT_DEFAULT),

+      .supported_in_devices = (

+              AUDIO_DEVICE_IN_COMMUNICATION |

+              AUDIO_DEVICE_IN_AMBIENT |

+              AUDIO_DEVICE_IN_BUILTIN_MIC |

+              AUDIO_DEVICE_IN_WIRED_HEADSET |

0 Kudos

915 Views
leavs
Contributor IV

hi,

can you send me the config_sgtl5000.h ? i meet the problem same to you. but i don't know where can i get the config_sgtl5000.h file. you can send me by email lxq@chipsee.com. thanks.

0 Kudos

915 Views
danwei_luo
NXP Employee
NXP Employee

Hi Leavs,

Here is a config_sgtl5000.h for i.MX6UL. You may use as a reference.

Best regards,

Danwei Luo

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos