Low sample rate audio was not playing 
on patrickhwood/linux-sunxi/tree/pat-3.4.75-ct over HDMI.
The following changes result in sound being played, which can be 
demonstrated with speaker-test.
I have no idea what values should go in CH_STATUS0 so they are just guesses!

Hope this is of some help.

Phil


diff --git a/drivers/video/sunxi/hdmi/hdmi_core.c 
b/drivers/video/sunxi/hdmi/hdmi_core.c
index c1c4c9c..342c8a2 100644
--- a/drivers/video/sunxi/hdmi/hdmi_core.c
+++ b/drivers/video/sunxi/hdmi/hdmi_core.c
@@ -238,11 +238,35 @@ static __s32 get_audio_info(__s32 sample_rate)
  __inf("sample_rate:%d in get_audio_info\n", sample_rate);
 
  switch (sample_rate) {
- case 32000:
+ case 8000:
+ audio_info.ACR_N = 1024;
+ audio_info.CH_STATUS0 = (3 << 24);
+ audio_info.CH_STATUS1 = 0x0000000b;
+ break; 
+ case 16000:
+ audio_info.ACR_N = 2048;
+ audio_info.CH_STATUS0 = (3 << 24);
+ audio_info.CH_STATUS1 = 0x0000000b;
+ break; 
+  case 32000:
  audio_info.ACR_N = 4096;
  audio_info.CH_STATUS0 = (3 << 24);
  audio_info.CH_STATUS1 = 0x0000000b;
  break;
+ case 11025:
+ audio_info.ACR_N = 1568;
+ audio_info.CH_STATUS0 = (0 << 24);
+ audio_info.CH_STATUS1 = 0x0000000b;
+ break;
+ case 22050:
+ audio_info.ACR_N = 3136;
+ audio_info.CH_STATUS0 = (0 << 24);
+ audio_info.CH_STATUS1 = 0x0000000b;
+ break;
  case 44100:
  audio_info.ACR_N = 6272;
  audio_info.CH_STATUS0 = (0 << 24);

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to