Re: [linux-sunxi] Re: [PATCH 3.4 00/11] sunxi-disp: hotplug + dpms support

2014-01-29 Thread Phil Scull
No worries, thanks for the reply.

Phil

On Tue, Jan 28, 2014 at 3:57 PM, Hans de Goede hdego...@redhat.com wrote:

 Hi,


 On 01/27/2014 10:28 PM, Phil Scull wrote:

 Hans,

 I still have trouble getting the HDMI monitor to come out of suspend
 running linaro on CT.
 Removing the lines that switch the clock off and back on again seems to
 sort the problem. There is probably a deeper underlying issue tho.

 Interested if you have any thoughts.


 I don't have any insights on this I'm afraid.


 Regards,

 Hans

 --
 You received this message because you are subscribed to a topic in the
 Google Groups linux-sunxi group.
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/linux-sunxi/XuJweI-19s0/unsubscribe.
 To unsubscribe from this group and all of its topics, send an email to
 linux-sunxi+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4] sunxi-hdmiaudio: enable low sample-rate HDMI audi

2014-01-28 Thread Phil Scull
Cubietruck (A20) connected to a BenQ monitor. The driver 
advertises SNDRV_PCM_RATE_8000_192000 in sndhdmi.c which I guess is 
incorrect if HDMI does not support it + I must be very lucky :-)

On Tuesday, 28 January 2014 06:39:30 UTC, Rudi wrote:

 Am 27.01.2014 21:54, schrieb Phil Scull: 

  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. 

 On which devcie did you try ? AFAIK, the HDMI spec does not allow rates 
 below 32kHz. 
 So if that works, it's just good luck. My Yamaha AVR for example would not 
 accept 
 anything these rates. Not even on S/PDIF. 


 -- 

 Ruediger Rudi Ihle 




-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[linux-sunxi] Re: [PATCH 3.4 00/11] sunxi-disp: hotplug + dpms support

2014-01-27 Thread Phil Scull
Hans,

I still have trouble getting the HDMI monitor to come out of suspend 
running linaro on CT.
Removing the lines that switch the clock off and back on again seems to 
sort the problem. There is probably a deeper underlying issue tho.

Interested if you have any thoughts.

Kind regards,

Phil

diff --git a/drivers/video/sunxi/disp/dev_disp.c 
b/drivers/video/sunxi/disp/dev_disp.c
index 9b59810..7463318 100644
--- a/drivers/video/sunxi/disp/dev_disp.c
+++ b/drivers/video/sunxi/disp/dev_disp.c
@@ -548,7 +548,9 @@ int disp_suspend(int clk, int status)
  else if (suspend_output_type[i] == DISP_OUTPUT_TYPE_HDMI)
  BSP_disp_hdmi_close(i);
  }
- BSP_disp_clk_off(clk);
+
+// Dont turn off the clock as it wont start again
+// BSP_disp_clk_off(clk);
  suspend_status |= status;
 
  return 0;
@@ -560,7 +562,8 @@ int disp_resume(int clk, int status)
 
  __inf(disp_resume clk %d status %d call\n, clk, status);
 
- BSP_disp_clk_on(clk);
+// This does not seem to restart the clock
+// BSP_disp_clk_on(clk);
 
  if (clk != 1)
  for (i = 0; i  2; i++) {

On Tuesday, 12 February 2013 10:57:33 UTC, Hans de Goede wrote:

 This patchset combines the best of Michal Suchanek's, Floris Bos' and my 
 patches to fix various issues with hotplugging hdmi and adds dpms support. 

 After this the only remaining known issue is the following 
 1) If EDID is used, and no EDID is found on bootup so the fallback mode is 
selected; and 
 2) A hdmi/dvi monitor gets plugged in, and its EDID does not advertise 
the fallback mode; and 
 3) X is running 

 Then the fbcon code will change the mode underneath X to a supported mode, 
 and 
 X will show a garbled display. This can be worked around by switching to a 
 text VC and restarting X. This is more of an Xorg bug then a bug of the 
 sunxi 
 fb driver. 

 Regards, 

 Hans 


-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[linux-sunxi] sunxi 3.4: stuttering video playback

2014-01-27 Thread Phil Scull
Video playback in linaro using cedar and libhybris stutters and sometimes the 
frame rate drops very low.

There may be an issue in disp_video.c as the included changes sort the issue 
for me. 

My possibly flawed reasoning goes something like...
Its not a good idea to update display_cnt in Hal_Set_Frame called during 
blanking and BSP_disp_video_set_fb which is called from an IOCTL. The value is 
incremented in Hal_Set_Frame and may have been updated (to 0) by a call to 
BSP_disp_video_set_fb. The result is calls to ioctl(fd, 
DISP_CMD_VIDEO_GET_FRAME_ID, args) never returning the updated frame number 
(this I have observed).

Hope this is of some help.

Any thoughts appreciated.

Kind regards,

Phil


diff --git a/drivers/video/sunxi/disp/disp_video.c 
b/drivers/video/sunxi/disp/disp_video.c
index aa07364..460def8 100644
--- a/drivers/video/sunxi/disp/disp_video.c
+++ b/drivers/video/sunxi/disp/disp_video.c
@@ -144,11 +144,19 @@ static inline __s32 Hal_Set_Frame(__u32 sel, __u32 
tcon_index, __u32 id)
return DIS_FAIL;
}
 
-   if (g_video[sel][id].display_cnt == 0) {
+  __u32 new_id = g_video[sel][id].video_new.id;
+  __u32 cur_id = g_video[sel][id].video_cur.id;
+  
+// if (g_video[sel][id].display_cnt == 0) {
+   if (cur_id != new_id) {
g_video[sel][id].pre_frame_addr0 =
g_video[sel][id].video_cur.addr[0];
+
+g_video[sel][id].video_new.id = cur_id;
+
memcpy(g_video[sel][id].video_cur, g_video[sel][id].video_new,
   sizeof(__disp_video_fb_t));
+   g_video[sel][id].display_cnt = 0;
}
 
if (gdisp.screen[sel].layer_manage[id].para.mode ==
@@ -382,6 +390,9 @@ static inline __s32 Hal_Set_Frame(__u32 sel, __u32 
tcon_index, __u32 id)
g_video[sel][id].video_cur.addr_right[1];
gdisp.screen[sel].layer_manage[id].para.fb.trd_right_addr[2] =
g_video[sel][id].video_cur.addr_right[2];
+
+  g_video[sel][id].video_cur.id = new_id;
+  
return DIS_SUCCESS;
 }
 
@@ -408,7 +419,7 @@ __s32 BSP_disp_video_set_fb(__u32 sel, __u32 hid, 
__disp_video_fb_t *in_addr)
memcpy(g_video[sel][hid].video_new, in_addr,
   sizeof(__disp_video_fb_t));
g_video[sel][hid].have_got_frame = TRUE;
-   g_video[sel][hid].display_cnt = 0;
+// g_video[sel][hid].display_cnt = 0;
 
return DIS_SUCCESS;
} else
@@ -462,6 +473,7 @@ __s32 BSP_disp_video_start(__u32 sel, __u32 hid)
if (gdisp.screen[sel].layer_manage[hid].status  LAYER_USED) {
memset(g_video[sel][hid], 0, sizeof(frame_para_t));
g_video[sel][hid].video_cur.id = -1;
+   g_video[sel][hid].video_new.id = -1;
g_video[sel][hid].enable = TRUE;
 
video_enhancement_start(sel, hid);

-- 
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 linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.