Re: [PATCH 8/9] hackrf: add support for transmitter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Moikka!

On 06/08/2015 12:26 PM, Hans Verkuil wrote:
Hi Antti,

I've got one comment:

On 06/06/2015 02:03 PM, Antti Palosaari wrote:
HackRF SDR device has both receiver and transmitter. There is limitation
that receiver and transmitter cannot be used at the same time
(half-duplex operation). That patch implements transmitter support to
existing receiver only driver.

Cc: Hans Verkuil <hverkuil@xxxxxxxxx>
Signed-off-by: Antti Palosaari <crope@xxxxxx>
---
  drivers/media/usb/hackrf/hackrf.c | 855 ++++++++++++++++++++++++++++----------
  1 file changed, 640 insertions(+), 215 deletions(-)

diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c
index 5bd291b..6ad6937 100644
--- a/drivers/media/usb/hackrf/hackrf.c
+++ b/drivers/media/usb/hackrf/hackrf.c
+/*
+ * TODO: That blocks whole transmitter device open when receiver is opened and
+ * the other way around, even only streaming is not allowed. Better solution
+ * needed...

Exactly. Why not use a similar approach as for video:

Return EBUSY when the applications tries to call:

S_FREQUENCY, S_MODULATOR, S_TUNER or REQBUFS/CREATE_BUFS and the other
vb2 queue is marked 'busy'. The check for REQBUFS/CREATE_BUFS can be done
in hackrf_queue_setup.

You should always be able to open a device node in V4L2.

It is now changed. All the other operations are allowed, but not streaming. Driver caches configuration values for both RX and TX mode and those are programmed when streaming is started.

regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux