Skip to content

Commit

Permalink
Merge pull request #231 from lrusak/cec-fix-libreelec-7.0
Browse files Browse the repository at this point in the history
backport of #230
  • Loading branch information
chewitt committed Apr 25, 2016
2 parents 5fbf8dd + 4eafb8d commit 495ec71
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions projects/WeTek_Core/patches/linux/080-amlogic-cec-driver.patch
Expand Up @@ -55,10 +55,10 @@ index 7a944cd..f74ec1f 100755
#EXTRA_CFLAGS += -O2
diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
new file mode 100644
index 0000000..a3556b3
index 0000000..1bfc29b
--- /dev/null
+++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
@@ -0,0 +1,671 @@
@@ -0,0 +1,679 @@
+/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
+ *
+ * Copyright (c) 2016 Gerald Dachs
Expand Down Expand Up @@ -549,7 +549,6 @@ index 0000000..a3556b3
+
+ retval = entry->size;
+
+ amlogic_cec_set_rx_state(STATE_RX);
+
+error_exit:
+ if (entry != NULL)
Expand All @@ -558,6 +557,11 @@ index 0000000..a3556b3
+ kfree(entry);
+ }
+
+ if (list_empty(&cec_rx_struct.list))
+ {
+ amlogic_cec_set_rx_state(STATE_RX);
+ }
+
+ spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags);
+
+ return retval;
Expand Down Expand Up @@ -651,7 +655,11 @@ index 0000000..a3556b3
+
+static u32 amlogic_cec_poll(struct file *file, poll_table *wait)
+{
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
+ {
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+ }
+
+ if (atomic_read(&cec_rx_struct.state) == STATE_DONE)
+ {
Expand Down
16 changes: 12 additions & 4 deletions projects/WeTek_Play/patches/linux/080-amlogic-cec-driver.patch
Expand Up @@ -55,10 +55,10 @@ index 7a944cd..f74ec1f 100755
#EXTRA_CFLAGS += -O2
diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
new file mode 100644
index 0000000..a3556b3
index 0000000..1bfc29b
--- /dev/null
+++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
@@ -0,0 +1,671 @@
@@ -0,0 +1,679 @@
+/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
+ *
+ * Copyright (c) 2016 Gerald Dachs
Expand Down Expand Up @@ -549,7 +549,6 @@ index 0000000..a3556b3
+
+ retval = entry->size;
+
+ amlogic_cec_set_rx_state(STATE_RX);
+
+error_exit:
+ if (entry != NULL)
Expand All @@ -558,6 +557,11 @@ index 0000000..a3556b3
+ kfree(entry);
+ }
+
+ if (list_empty(&cec_rx_struct.list))
+ {
+ amlogic_cec_set_rx_state(STATE_RX);
+ }
+
+ spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags);
+
+ return retval;
Expand Down Expand Up @@ -651,7 +655,11 @@ index 0000000..a3556b3
+
+static u32 amlogic_cec_poll(struct file *file, poll_table *wait)
+{
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
+ {
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+ }
+
+ if (atomic_read(&cec_rx_struct.state) == STATE_DONE)
+ {
Expand Down

0 comments on commit 495ec71

Please sign in to comment.