<div dir="ltr">The original commit fixes configuring the direction of the GPIO pins on the 2832 so it actually works. The FC0012 failure is probably a side-effect of the direction bits now really being set.<div><div><br></div><div>The tuner initialization does this:</div><div><br></div><div>rtlsdr_set_gpio_output(dev, 5); /* should set GPIO 5 to output mode, but actually does not touch the direction bits and instead turns on GPIO output 5 */</div><div><div>rtlsdr_set_gpio_bit(dev, 5, 1);   /* turns on GPIO 5 output */</div><div>rtlsdr_set_gpio_bit(dev, 5, 0);   /* turns off GPIO 5 output */</div></div><div><br></div><div>I don't know the reset state of the 2832 offhand but assuming GPIO 5 is not set as an output on reset, then that tuner reset was doing nothing much before the GPIO fix.</div><div>Maybe the FC0012 takes a while to settle after a reset, so when it really gets reset the detection immediately afterwards fails. You could try commenting out those three lines and see if anything changes.</div><div><br></div><div>Oliver</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 October 2017 at 18:13, Marcus Müller <span dir="ltr"><<a href="mailto:mueller@kit.edu" target="_blank">mueller@kit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Sylvain,<br>
<br>
I'd love to, but I honestly don't even have the symptom (whatever that is) of what this commit fixes. Admittedly, I'd assume myself that maybe I just haven't looked hard enough for a symptom, but if you'd have insight on what the fact that the register was wrong effects, then I'd be thankful!<br>
<br>
I really just observe that this commit breaks something, and that I haven't been able to find out what out fixes :(<br>
<br>
Cheers<br>
Marcus<div><div class="h5"><br><br><div class="gmail_quote">On 27 October 2017 6:09:18 PM GMT+02:00, Sylvain Munaut <<a href="mailto:246tnt@gmail.com" target="_blank">246tnt@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<pre class="m_-4914259294658559210k9mail">That commit might break something but it still looks like the right thing to do.<br>This is just a symptom of another underlying problem. Find that<br>problem and fix it.<br><br><br>On Fri, Oct 27, 2017 at 5:03 PM, Marcus Müller <<a href="mailto:mueller@kit.edu" target="_blank">mueller@kit.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 1ex 0.8ex;border-left:1px solid #729fcf;padding-left:1ex"> This reverts commit ba64a7459a43652354990855176a7d<wbr>8dad5b9d54.<br><br> The mentioned commit leads to nonfunctionality of Fitipower FC0012<br> dongles (tested by a small horde of students) and doesn't increase<br> functionality on my "<a href="http://RTL-SDR.com" target="_blank">RTL-SDR.com</a>" branded R820T-based dongle.<br> ---<br>  src/librtlsdr.c | 2 +-<br>  1 file changed, 1 insertion(+), 1 deletion(-)<br><br> diff --git a/src/librtlsdr.c b/src/librtlsdr.c<br> index b369a5d..6c079a5 100644<br> --- a/src/librtlsdr.c<br> +++ b/src/librtlsdr.c<br> @@ -570,7 +570,7 @@ void rtlsdr_set_gpio_output(rtlsdr_<wbr>dev_t *dev, uint8_t gpio)<br>         gpio = 1 << gpio;<br><br>         r = rtlsdr_read_reg(dev, SYSB, GPD, 1);<br> -       rtlsdr_write_reg(dev, SYSB, GPD, r & ~gpio, 1);<br> +       rtlsdr_write_reg(dev, SYSB, GPO, r & ~gpio, 1);<br>         r = rtlsdr_read_reg(dev, SYSB, GPOE, 1);<br>         rtlsdr_write_reg(dev, SYSB, GPOE, r | gpio, 1);<br>  }<br> --<br> 2.13.6</blockquote><br></pre></blockquote></div><br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</font></span></div></blockquote></div><br></div>