All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: saa7134 and RDS
@ 2009-03-05 12:07 Hans Verkuil
  2009-03-05 16:36 ` Hans Verkuil
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-05 12:07 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media


> Hi Hans
>
> I build fresh video4linux with your patch and my config for our cards.
> In a dmesg i see : found RDS decoder.
> cat /dev/radio0 give me some slow junk data. Is this RDS data??
> Have you any tools for testing RDS?
> I try build rdsd from Hans J. Koch, but build crashed with:
>
> rdshandler.cpp: In member function ‘void
> std::RDShandler::delete_client(std::RDSclient*)’:
> rdshandler.cpp:363: error: no matching function for call to
> ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**,
> std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> __gnu_cxx::__normal_iterator<std::RDSclient**,
> std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> std::RDSclient*&)’

Ah yes, that's right. I had to hack the C++ source to make this compile.
I'll see if I can post a patch for this tonight.

          Hans

> P.S. Debian Lenny.
>
> With my best regards, Dmitry.
>
>> On Wednesday 04 March 2009 13:02:46 Dmitri Belimov wrote:
>> > > Dmitri,
>> > >
>> > > I have a patch pending to fix this for the saa7134 driver. The i2c
>> > > problems are resolved, so this shouldn't be a problem anymore.
>> >
>> > Good news!
>> >
>> > > The one thing that is holding this back is that I first want to
>> > > finalize the RFC regarding the RDS support. I posted an RFC a few
>> > > weeks ago, but I need to make a second version and for that I
>> > > need to do a bit of research into the US version of RDS. And I
>> > > haven't found the time to do that yet.
>> >
>> > Yes, I found your discussion in linux-media mailing list. If you
>> > need any information from chip vendor I'll try find. I can get it
>> > under NDA and help you.
>> >
>> > > I'll see if I can get the patch merged anyway.
>>
>> I've attached my patch for the saa7134. I want to wait with the final
>> pull request until I've finished the RDS RFC, but this gives you
>> something to play with.
>>
>> Regards,
>>
>> 	Hans
>>
>> --
>> Hans Verkuil - video4linux developer - sponsored by TANDBERG
>
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-05 12:07 saa7134 and RDS Hans Verkuil
@ 2009-03-05 16:36 ` Hans Verkuil
  2009-03-07  1:55   ` Hans J. Koch
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-05 16:36 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

On Thursday 05 March 2009 13:07:10 Hans Verkuil wrote:
> > Hi Hans
> >
> > I build fresh video4linux with your patch and my config for our cards.
> > In a dmesg i see : found RDS decoder.
> > cat /dev/radio0 give me some slow junk data. Is this RDS data??
> > Have you any tools for testing RDS?
> > I try build rdsd from Hans J. Koch, but build crashed with:
> >
> > rdshandler.cpp: In member function ‘void
> > std::RDShandler::delete_client(std::RDSclient*)’:
> > rdshandler.cpp:363: error: no matching function for call to
> > ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**,
> > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > __gnu_cxx::__normal_iterator<std::RDSclient**,
> > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > std::RDSclient*&)’
>
> Ah yes, that's right. I had to hack the C++ source to make this compile.
> I'll see if I can post a patch for this tonight.

Attached is the diff that makes rdsd compile on my system.

Regards,

	Hans


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

[-- Attachment #2: rdsd.diff --]
[-- Type: text/x-diff, Size: 1940 bytes --]

diff -ur rdsd-0.0.1/src/rdsclient.cpp tmp/rdsd-0.0.1/src/rdsclient.cpp
--- rdsd-0.0.1/src/rdsclient.cpp	2009-02-10 23:07:02.000000000 +0100
+++ tmp/rdsd-0.0.1/src/rdsclient.cpp	2005-12-29 18:01:12.000000000 +0100
@@ -18,7 +18,6 @@
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 #include "rdsclient.h"
-#include <stdlib.h>
 #include <sstream>
 
 namespace std {
diff -ur rdsd-0.0.1/src/rdsd.cpp tmp/rdsd-0.0.1/src/rdsd.cpp
--- rdsd-0.0.1/src/rdsd.cpp	2009-02-10 23:05:29.000000000 +0100
+++ tmp/rdsd-0.0.1/src/rdsd.cpp	2005-12-29 11:51:42.000000000 +0100
@@ -26,8 +26,7 @@
 #include "rdshandler.h"
 #include <csignal>
 #include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
+#include <string>
 #include <sstream>
 
 using namespace std;
diff -ur rdsd-0.0.1/src/rdshandler.cpp tmp/rdsd-0.0.1/src/rdshandler.cpp
--- rdsd-0.0.1/src/rdshandler.cpp	2009-02-10 23:06:18.000000000 +0100
+++ tmp/rdsd-0.0.1/src/rdshandler.cpp	2005-12-29 11:52:40.000000000 +0100
@@ -25,7 +25,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sstream>
-#include <algorithm>
 
 namespace std {
 
@@ -355,7 +354,7 @@
       FD_CLR(fd,&all_fds);
       cli->Close();
     }
-    RDSclientList::iterator it = std::find(clientlist.begin(),clientlist.end(),cli);
+    RDSclientList::iterator it = find(clientlist.begin(),clientlist.end(),cli);
     if (it != clientlist.end()) clientlist.erase(it);
     delete cli;
     calc_maxfd();
diff -ur rdsd-0.0.1/src/rdssource.cpp tmp/rdsd-0.0.1/src/rdssource.cpp
--- rdsd-0.0.1/src/rdssource.cpp	2009-02-10 23:06:39.000000000 +0100
+++ tmp/rdsd-0.0.1/src/rdssource.cpp	2005-12-29 18:03:56.000000000 +0100
@@ -26,7 +26,6 @@
 #include <linux/videodev.h>
 #include <linux/videodev2.h>
 //#include <linux/i2c.h> //lots of errors if I include this...
-#include <string.h>
 #include <sstream>
 
 namespace std {

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-05 16:36 ` Hans Verkuil
@ 2009-03-07  1:55   ` Hans J. Koch
  2009-03-07  8:54     ` Hans Verkuil
  0 siblings, 1 reply; 17+ messages in thread
From: Hans J. Koch @ 2009-03-07  1:55 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Dmitri Belimov, Hans J. Koch, hermann pitton, Hans J. Koch,
	video4linux-list, linux-media

On Thu, Mar 05, 2009 at 05:36:44PM +0100, Hans Verkuil wrote:
> On Thursday 05 March 2009 13:07:10 Hans Verkuil wrote:
> > > Hi Hans
> > >
> > > I build fresh video4linux with your patch and my config for our cards.
> > > In a dmesg i see : found RDS decoder.
> > > cat /dev/radio0 give me some slow junk data. Is this RDS data??
> > > Have you any tools for testing RDS?
> > > I try build rdsd from Hans J. Koch, but build crashed with:
> > >
> > > rdshandler.cpp: In member function ‘void
> > > std::RDShandler::delete_client(std::RDSclient*)’:
> > > rdshandler.cpp:363: error: no matching function for call to
> > > ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**,
> > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > > __gnu_cxx::__normal_iterator<std::RDSclient**,
> > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > > std::RDSclient*&)’
> >
> > Ah yes, that's right. I had to hack the C++ source to make this compile.
> > I'll see if I can post a patch for this tonight.
> 
> Attached is the diff that makes rdsd compile on my system.

Great, thanks! The problem is, I really haven't got the time for RDS anymore.
I simply cannot test your patch and check it in. From your previous
contributions I know you as a competent and trustworthy v4l developer and
would give you write access to the repository. Interested?

Thanks,
Hans, too :)

> 
> Regards,
> 
> 	Hans
> 
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by TANDBERG

> diff -ur rdsd-0.0.1/src/rdsclient.cpp tmp/rdsd-0.0.1/src/rdsclient.cpp
> --- rdsd-0.0.1/src/rdsclient.cpp	2009-02-10 23:07:02.000000000 +0100
> +++ tmp/rdsd-0.0.1/src/rdsclient.cpp	2005-12-29 18:01:12.000000000 +0100
> @@ -18,7 +18,6 @@
>   *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
>   ***************************************************************************/
>  #include "rdsclient.h"
> -#include <stdlib.h>
>  #include <sstream>
>  
>  namespace std {
> diff -ur rdsd-0.0.1/src/rdsd.cpp tmp/rdsd-0.0.1/src/rdsd.cpp
> --- rdsd-0.0.1/src/rdsd.cpp	2009-02-10 23:05:29.000000000 +0100
> +++ tmp/rdsd-0.0.1/src/rdsd.cpp	2005-12-29 11:51:42.000000000 +0100
> @@ -26,8 +26,7 @@
>  #include "rdshandler.h"
>  #include <csignal>
>  #include <fcntl.h>
> -#include <string.h>
> -#include <stdlib.h>
> +#include <string>
>  #include <sstream>
>  
>  using namespace std;
> diff -ur rdsd-0.0.1/src/rdshandler.cpp tmp/rdsd-0.0.1/src/rdshandler.cpp
> --- rdsd-0.0.1/src/rdshandler.cpp	2009-02-10 23:06:18.000000000 +0100
> +++ tmp/rdsd-0.0.1/src/rdshandler.cpp	2005-12-29 11:52:40.000000000 +0100
> @@ -25,7 +25,6 @@
>  #include <unistd.h>
>  #include <fcntl.h>
>  #include <sstream>
> -#include <algorithm>
>  
>  namespace std {
>  
> @@ -355,7 +354,7 @@
>        FD_CLR(fd,&all_fds);
>        cli->Close();
>      }
> -    RDSclientList::iterator it = std::find(clientlist.begin(),clientlist.end(),cli);
> +    RDSclientList::iterator it = find(clientlist.begin(),clientlist.end(),cli);
>      if (it != clientlist.end()) clientlist.erase(it);
>      delete cli;
>      calc_maxfd();
> diff -ur rdsd-0.0.1/src/rdssource.cpp tmp/rdsd-0.0.1/src/rdssource.cpp
> --- rdsd-0.0.1/src/rdssource.cpp	2009-02-10 23:06:39.000000000 +0100
> +++ tmp/rdsd-0.0.1/src/rdssource.cpp	2005-12-29 18:03:56.000000000 +0100
> @@ -26,7 +26,6 @@
>  #include <linux/videodev.h>
>  #include <linux/videodev2.h>
>  //#include <linux/i2c.h> //lots of errors if I include this...
> -#include <string.h>
>  #include <sstream>
>  
>  namespace std {


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-07  1:55   ` Hans J. Koch
@ 2009-03-07  8:54     ` Hans Verkuil
  2009-03-07  9:02       ` Dmitri Belimov
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-07  8:54 UTC (permalink / raw)
  To: Hans J. Koch
  Cc: Dmitri Belimov, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

On Saturday 07 March 2009 02:55:06 Hans J. Koch wrote:
> On Thu, Mar 05, 2009 at 05:36:44PM +0100, Hans Verkuil wrote:
> > On Thursday 05 March 2009 13:07:10 Hans Verkuil wrote:
> > > > Hi Hans
> > > >
> > > > I build fresh video4linux with your patch and my config for our
> > > > cards. In a dmesg i see : found RDS decoder.
> > > > cat /dev/radio0 give me some slow junk data. Is this RDS data??
> > > > Have you any tools for testing RDS?
> > > > I try build rdsd from Hans J. Koch, but build crashed with:
> > > >
> > > > rdshandler.cpp: In member function ‘void
> > > > std::RDShandler::delete_client(std::RDSclient*)’:
> > > > rdshandler.cpp:363: error: no matching function for call to
> > > > ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**,
> > > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > > > __gnu_cxx::__normal_iterator<std::RDSclient**,
> > > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >,
> > > > std::RDSclient*&)’
> > >
> > > Ah yes, that's right. I had to hack the C++ source to make this
> > > compile. I'll see if I can post a patch for this tonight.
> >
> > Attached is the diff that makes rdsd compile on my system.
>
> Great, thanks! The problem is, I really haven't got the time for RDS
> anymore. I simply cannot test your patch and check it in. From your
> previous contributions I know you as a competent and trustworthy v4l
> developer and would give you write access to the repository. Interested?

Erm, not really. When the API is finalized I want to make some sort of a 
simple reference utility/library for this and add it to v4l-dvb. To be 
honest, I think having a daemon just complicates matters unnecessarily.

Regards,

	Hans


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-07  8:54     ` Hans Verkuil
@ 2009-03-07  9:02       ` Dmitri Belimov
  2009-03-07  9:19         ` Hans Verkuil
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-07  9:02 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

Hi 

I build rdsd. But can't start. See log:

Fri Mar  6 03:44:20 2009 RDS handler initialized.
Fri Mar  6 03:44:20 2009 Added source definition: Beholder M6 Exra
Fri Mar  6 03:44:20 2009 RDS sources setup OK.
Fri Mar  6 03:44:20 2009 Unix domain socket created and listening.
Fri Mar  6 03:44:20 2009 TCP/IP socket created and listening.
Fri Mar  6 03:44:20 2009 Using V4L2 for Beholder M6 Exra
Fri Mar  6 03:44:20 2009 open_sources() failed.
Fri Mar  6 03:44:20 2009 rdsd terminating with error code 13

With my best regards, Dmitry.

> On Saturday 07 March 2009 02:55:06 Hans J. Koch wrote:
> > On Thu, Mar 05, 2009 at 05:36:44PM +0100, Hans Verkuil wrote:
> > > On Thursday 05 March 2009 13:07:10 Hans Verkuil wrote:
> > > > > Hi Hans
> > > > >
> > > > > I build fresh video4linux with your patch and my config for
> > > > > our cards. In a dmesg i see : found RDS decoder.
> > > > > cat /dev/radio0 give me some slow junk data. Is this RDS
> > > > > data?? Have you any tools for testing RDS?
> > > > > I try build rdsd from Hans J. Koch, but build crashed with:
> > > > >
> > > > > rdshandler.cpp: In member function ‘void
> > > > > std::RDShandler::delete_client(std::RDSclient*)’:
> > > > > rdshandler.cpp:363: error: no matching function for call to
> > > > > ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**,
> > > > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*>
> > > > > > >, __gnu_cxx::__normal_iterator<std::RDSclient**,
> > > > > std::vector<std::RDSclient*, std::allocator<std::RDSclient*>
> > > > > > >, std::RDSclient*&)’
> > > >
> > > > Ah yes, that's right. I had to hack the C++ source to make this
> > > > compile. I'll see if I can post a patch for this tonight.
> > >
> > > Attached is the diff that makes rdsd compile on my system.
> >
> > Great, thanks! The problem is, I really haven't got the time for RDS
> > anymore. I simply cannot test your patch and check it in. From your
> > previous contributions I know you as a competent and trustworthy v4l
> > developer and would give you write access to the repository.
> > Interested?
> 
> Erm, not really. When the API is finalized I want to make some sort
> of a simple reference utility/library for this and add it to v4l-dvb.
> To be honest, I think having a daemon just complicates matters
> unnecessarily.
> 
> Regards,
> 
> 	Hans
> 
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-07  9:02       ` Dmitri Belimov
@ 2009-03-07  9:19         ` Hans Verkuil
  2009-03-10  2:49           ` Dmitri Belimov
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-07  9:19 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

On Saturday 07 March 2009 10:02:24 Dmitri Belimov wrote:
> Hi
>
> I build rdsd. But can't start. See log:
>
> Fri Mar  6 03:44:20 2009 RDS handler initialized.
> Fri Mar  6 03:44:20 2009 Added source definition: Beholder M6 Exra
> Fri Mar  6 03:44:20 2009 RDS sources setup OK.
> Fri Mar  6 03:44:20 2009 Unix domain socket created and listening.
> Fri Mar  6 03:44:20 2009 TCP/IP socket created and listening.
> Fri Mar  6 03:44:20 2009 Using V4L2 for Beholder M6 Exra
> Fri Mar  6 03:44:20 2009 open_sources() failed.
> Fri Mar  6 03:44:20 2009 rdsd terminating with error code 13
>
> With my best regards, Dmitry.

Did you setup the /etc/rdsd.conf file correctly?

Here is mine:

$ cat /etc/rdsd.conf
[global]
unix-socket = "/var/tmp/rdsd.sock"
tcpip-port = 4321
logfile = "/var/tmp/rdsd.log"
pidfile = "/var/tmp/rdsd.pid"
console-log = yes
file-log = yes
loglevel = 5

[source]
name = "Terratec PCI card"
path = "/dev/radio0"
type = "radiodev"

After setting up this file I run 'rdsd'.
With rdsquery -f you can set the frequency in khz.
Then run

rdsquery -t \ 
rxfre,rxsig,rflags,picode,ptype,pname,locdt,utcdt,rtxt,lrtxt,tmc,aflist -c0

and watch the rds data appear.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-07  9:19         ` Hans Verkuil
@ 2009-03-10  2:49           ` Dmitri Belimov
  2009-03-10  7:17             ` Hans Verkuil
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-10  2:49 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

Hi 

> On Saturday 07 March 2009 10:02:24 Dmitri Belimov wrote:
> > Hi
> >
> > I build rdsd. But can't start. See log:
> >
> > Fri Mar  6 03:44:20 2009 RDS handler initialized.
> > Fri Mar  6 03:44:20 2009 Added source definition: Beholder M6 Exra
> > Fri Mar  6 03:44:20 2009 RDS sources setup OK.
> > Fri Mar  6 03:44:20 2009 Unix domain socket created and listening.
> > Fri Mar  6 03:44:20 2009 TCP/IP socket created and listening.
> > Fri Mar  6 03:44:20 2009 Using V4L2 for Beholder M6 Exra
> > Fri Mar  6 03:44:20 2009 open_sources() failed.
> > Fri Mar  6 03:44:20 2009 rdsd terminating with error code 13
> >
> > With my best regards, Dmitry.
> 
> Did you setup the /etc/rdsd.conf file correctly?
> 
> Here is mine:
> 
> $ cat /etc/rdsd.conf
> [global]
> unix-socket = "/var/tmp/rdsd.sock"
> tcpip-port = 4321
> logfile = "/var/tmp/rdsd.log"
> pidfile = "/var/tmp/rdsd.pid"
> console-log = yes
> file-log = yes
> loglevel = 5
> 
> [source]
> name = "Terratec PCI card"
> path = "/dev/radio0"
> type = "radiodev"
> 

I had tunerfreq = 102000 line. After removing this line rdsd started well.

> After setting up this file I run 'rdsd'.
> With rdsquery -f you can set the frequency in khz.

When run rdsquery -f 102000 the programm was hold without any messages.
I pressed Crt+C for exit.

> Then run
> 
> rdsquery -t \ 
> rxfre,rxsig,rflags,picode,ptype,pname,locdt,utcdt,rtxt,lrtxt,tmc,aflist
> -c0

This command not work too, hold and sleep.

With my best regards, Dmitry.

> and watch the rds data appear.
> 
> Regards,
> 
> 	Hans
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-10  2:49           ` Dmitri Belimov
@ 2009-03-10  7:17             ` Hans Verkuil
  2009-03-10  8:04               ` Dmitri Belimov
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-10  7:17 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

On Tuesday 10 March 2009 03:49:57 Dmitri Belimov wrote:
> Hi
>
> > On Saturday 07 March 2009 10:02:24 Dmitri Belimov wrote:
> > > Hi
> > >
> > > I build rdsd. But can't start. See log:
> > >
> > > Fri Mar  6 03:44:20 2009 RDS handler initialized.
> > > Fri Mar  6 03:44:20 2009 Added source definition: Beholder M6 Exra
> > > Fri Mar  6 03:44:20 2009 RDS sources setup OK.
> > > Fri Mar  6 03:44:20 2009 Unix domain socket created and listening.
> > > Fri Mar  6 03:44:20 2009 TCP/IP socket created and listening.
> > > Fri Mar  6 03:44:20 2009 Using V4L2 for Beholder M6 Exra
> > > Fri Mar  6 03:44:20 2009 open_sources() failed.
> > > Fri Mar  6 03:44:20 2009 rdsd terminating with error code 13
> > >
> > > With my best regards, Dmitry.
> >
> > Did you setup the /etc/rdsd.conf file correctly?
> >
> > Here is mine:
> >
> > $ cat /etc/rdsd.conf
> > [global]
> > unix-socket = "/var/tmp/rdsd.sock"
> > tcpip-port = 4321
> > logfile = "/var/tmp/rdsd.log"
> > pidfile = "/var/tmp/rdsd.pid"
> > console-log = yes
> > file-log = yes
> > loglevel = 5
> >
> > [source]
> > name = "Terratec PCI card"
> > path = "/dev/radio0"
> > type = "radiodev"
>
> I had tunerfreq = 102000 line. After removing this line rdsd started
> well.
>
> > After setting up this file I run 'rdsd'.
> > With rdsquery -f you can set the frequency in khz.
>
> When run rdsquery -f 102000 the programm was hold without any messages.
> I pressed Crt+C for exit.

Try using v4l2-ctl -d /dev/radio0 -f 102 to set the frequency. That may have 
been what I was actually using rather than rdsquery.

>
> > Then run
> >
> > rdsquery -t \
> > rxfre,rxsig,rflags,picode,ptype,pname,locdt,utcdt,rtxt,lrtxt,tmc,aflist
> > -c0
>
> This command not work too, hold and sleep.

If the frequency wasn't set, then that might explain it. Or perhaps you 
should combine the -f with the -t flag?

You can also attempt to debug in the saa6588 to see whether it picks up any 
packets.

Regards,

	Hans

>
> With my best regards, Dmitry.
>
> > and watch the rds data appear.
> >
> > Regards,
> >
> > 	Hans
> >
> > --
> > Hans Verkuil - video4linux developer - sponsored by TANDBERG



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-10  7:17             ` Hans Verkuil
@ 2009-03-10  8:04               ` Dmitri Belimov
  0 siblings, 0 replies; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-10  8:04 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

Hi

> > > Did you setup the /etc/rdsd.conf file correctly?
> > >
> > > Here is mine:
> > >
> > > $ cat /etc/rdsd.conf
> > > [global]
> > > unix-socket = "/var/tmp/rdsd.sock"
> > > tcpip-port = 4321
> > > logfile = "/var/tmp/rdsd.log"
> > > pidfile = "/var/tmp/rdsd.pid"
> > > console-log = yes
> > > file-log = yes
> > > loglevel = 5
> > >
> > > [source]
> > > name = "Terratec PCI card"
> > > path = "/dev/radio0"
> > > type = "radiodev"
> >
> > I had tunerfreq = 102000 line. After removing this line rdsd started
> > well.
> >
> > > After setting up this file I run 'rdsd'.
> > > With rdsquery -f you can set the frequency in khz.
> >
> > When run rdsquery -f 102000 the programm was hold without any
> > messages. I pressed Crt+C for exit.
> 
> Try using v4l2-ctl -d /dev/radio0 -f 102 to set the frequency. That
> may have been what I was actually using rather than rdsquery.

This command works right.
 
> >
> > > Then run
> > >
> > > rdsquery -t \
> > > rxfre,rxsig,rflags,picode,ptype,pname,locdt,utcdt,rtxt,lrtxt,tmc,aflist
> > > -c0
> >
> > This command not work too, hold and sleep.
> 
> If the frequency wasn't set, then that might explain it. Or perhaps
> you should combine the -f with the -t flag?

Out from rdsquery

rxfre:102000
rxsig:32768
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=1
picode:20480
ptype:5
rtxt:            io T 020
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=1
picode:20480
ptype:5
rtxt:            io T 020            2004
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=1
picode:20480
ptype:5
rtxt:            io T 020            2004            roni
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
pname:STN   +
rxfre:102000
rxsig:32768
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
rtxt:         Rad
rflags:TP=0 TA=0 MUSIC=0 STEREO=0 AH=0 COMP=0 DPTY=0 AB=0
picode:20480
ptype:5
rtxt:TRDS     Rad

With my best regards, Dmitry.

> You can also attempt to debug in the saa6588 to see whether it picks
> up any packets.
> 
> Regards,
> 
> 	Hans
> 
> >
> > With my best regards, Dmitry.
> >
> > > and watch the rds data appear.
> > >
> > > Regards,
> > >
> > > 	Hans
> > >
> > > --
> > > Hans Verkuil - video4linux developer - sponsored by TANDBERG
> 
> 
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-05 12:01     ` Dmitri Belimov
@ 2009-03-07  1:50       ` Hans J. Koch
  0 siblings, 0 replies; 17+ messages in thread
From: Hans J. Koch @ 2009-03-07  1:50 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans Verkuil, Hans J. Koch, hermann pitton, Hans J. Koch,
	video4linux-list, linux-media

On Thu, Mar 05, 2009 at 09:01:10PM +0900, Dmitri Belimov wrote:
> Hi Hans 
> 
> I build fresh video4linux with your patch and my config for our cards.
> In a dmesg i see : found RDS decoder.
> cat /dev/radio0 give me some slow junk data. Is this RDS data??

Yes, because that's all you can read from /dev/radioX.

> Have you any tools for testing RDS?
> I try build rdsd from Hans J. Koch, but build crashed with:
> 
> rdshandler.cpp: In member function ‘void std::RDShandler::delete_client(std::RDSclient*)’:
> rdshandler.cpp:363: error: no matching function for call to ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**, std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >, __gnu_cxx::__normal_iterator<std::RDSclient**, std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >, std::RDSclient*&)’
> 

Unfortunately, rdsd (and all the other RDS userspace software) is somehow
unmaintained ATM. I haven't got the time anymore, and there are not many
_active_ developers to take over the project. One serious problem is that
I wrote it in C++ (I wouldn't do it again).

Anyway, if you're really interested, I'll happily give you full write access
to the repository. The project is about to die without active developers.

If there's anyone out there who would like to take over maintainership of the
RDS userspace stuff, please let me know.


> P.S. Debian Lenny.
> 
> With my best regards, Dmitry.
> 
> > On Wednesday 04 March 2009 13:02:46 Dmitri Belimov wrote:
> > > > Dmitri,
> > > >
> > > > I have a patch pending to fix this for the saa7134 driver. The i2c
> > > > problems are resolved, so this shouldn't be a problem anymore.
> > >
> > > Good news!
> > >
> > > > The one thing that is holding this back is that I first want to
> > > > finalize the RFC regarding the RDS support. I posted an RFC a few
> > > > weeks ago, but I need to make a second version and for that I
> > > > need to do a bit of research into the US version of RDS. And I
> > > > haven't found the time to do that yet.
> > >
> > > Yes, I found your discussion in linux-media mailing list. If you
> > > need any information from chip vendor I'll try find. I can get it
> > > under NDA and help you.

I could help with docs, too.

> > >

Thanks,
Hans

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-04 17:45   ` Hans Verkuil
@ 2009-03-05 12:01     ` Dmitri Belimov
  2009-03-07  1:50       ` Hans J. Koch
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-05 12:01 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

Hi Hans 

I build fresh video4linux with your patch and my config for our cards.
In a dmesg i see : found RDS decoder.
cat /dev/radio0 give me some slow junk data. Is this RDS data??
Have you any tools for testing RDS?
I try build rdsd from Hans J. Koch, but build crashed with:

rdshandler.cpp: In member function ‘void std::RDShandler::delete_client(std::RDSclient*)’:
rdshandler.cpp:363: error: no matching function for call to ‘find(__gnu_cxx::__normal_iterator<std::RDSclient**, std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >, __gnu_cxx::__normal_iterator<std::RDSclient**, std::vector<std::RDSclient*, std::allocator<std::RDSclient*> > >, std::RDSclient*&)’

P.S. Debian Lenny.

With my best regards, Dmitry.

> On Wednesday 04 March 2009 13:02:46 Dmitri Belimov wrote:
> > > Dmitri,
> > >
> > > I have a patch pending to fix this for the saa7134 driver. The i2c
> > > problems are resolved, so this shouldn't be a problem anymore.
> >
> > Good news!
> >
> > > The one thing that is holding this back is that I first want to
> > > finalize the RFC regarding the RDS support. I posted an RFC a few
> > > weeks ago, but I need to make a second version and for that I
> > > need to do a bit of research into the US version of RDS. And I
> > > haven't found the time to do that yet.
> >
> > Yes, I found your discussion in linux-media mailing list. If you
> > need any information from chip vendor I'll try find. I can get it
> > under NDA and help you.
> >
> > > I'll see if I can get the patch merged anyway.
> 
> I've attached my patch for the saa7134. I want to wait with the final
> pull request until I've finished the RDS RFC, but this gives you
> something to play with.
> 
> Regards,
> 
> 	Hans
> 
> -- 
> Hans Verkuil - video4linux developer - sponsored by TANDBERG

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-04 12:02 ` Dmitri Belimov
@ 2009-03-04 17:45   ` Hans Verkuil
  2009-03-05 12:01     ` Dmitri Belimov
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-04 17:45 UTC (permalink / raw)
  To: Dmitri Belimov
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

On Wednesday 04 March 2009 13:02:46 Dmitri Belimov wrote:
> > Dmitri,
> >
> > I have a patch pending to fix this for the saa7134 driver. The i2c
> > problems are resolved, so this shouldn't be a problem anymore.
>
> Good news!
>
> > The one thing that is holding this back is that I first want to
> > finalize the RFC regarding the RDS support. I posted an RFC a few
> > weeks ago, but I need to make a second version and for that I need to
> > do a bit of research into the US version of RDS. And I haven't found
> > the time to do that yet.
>
> Yes, I found your discussion in linux-media mailing list. If you
> need any information from chip vendor I'll try find. I can get it
> under NDA and help you.
>
> > I'll see if I can get the patch merged anyway.

I've attached my patch for the saa7134. I want to wait with the final pull 
request until I've finished the RDS RFC, but this gives you something to 
play with.

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

[-- Attachment #2: saa7134-rds.diff --]
[-- Type: text/x-diff, Size: 4156 bytes --]

diff -r 54ae11f1e777 linux/drivers/media/video/saa6588.c
--- a/linux/drivers/media/video/saa6588.c	Wed Feb 11 23:28:30 2009 +0100
+++ b/linux/drivers/media/video/saa6588.c	Fri Feb 13 09:07:20 2009 +0100
@@ -541,7 +541,6 @@
 	.command = saa6588_command,
 	.probe = saa6588_probe,
 	.remove = saa6588_remove,
-	.legacy_class = I2C_CLASS_TV_ANALOG,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 	.id_table = saa6588_id,
 #endif
diff -r 54ae11f1e777 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed Feb 11 23:28:30 2009 +0100
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Fri Feb 13 09:07:20 2009 +0100
@@ -1699,6 +1699,7 @@
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
+		.rds_addr 	= 0x10,
 		.tda9887_conf   = TDA9887_PRESENT,
 		.inputs         = {{
 			.name = name_tv,
diff -r 54ae11f1e777 linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c	Wed Feb 11 23:28:30 2009 +0100
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c	Fri Feb 13 09:07:20 2009 +0100
@@ -1050,6 +1050,17 @@
 			sd->grp_id = GRP_EMPRESS;
 	}
 
+	if (saa7134_boards[dev->board].rds_addr) {
+		unsigned short addrs[2] = { 0, I2C_CLIENT_END };
+		struct v4l2_subdev *sd;
+
+		addrs[0] = saa7134_boards[dev->board].rds_addr;
+		sd = v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "saa6588",
+			    "saa6588", addrs);
+		if (sd)
+			printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
+	}
+
 	request_submodules(dev);
 
 	v4l2_prio_init(&dev->prio);
diff -r 54ae11f1e777 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Wed Feb 11 23:28:30 2009 +0100
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Fri Feb 13 09:07:20 2009 +0100
@@ -30,6 +30,7 @@
 #include "saa7134-reg.h"
 #include "saa7134.h"
 #include <media/v4l2-common.h>
+#include <media/rds.h>
 
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
 /* Include V4L1 specific functions. Should be removed soon */
@@ -1467,6 +1468,7 @@
 {
 	struct saa7134_fh  *fh  = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
+	struct rds_command cmd;
 	unsigned long flags;
 
 	/* turn off overlay */
@@ -1500,6 +1502,8 @@
 	saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
 
 	saa_call_all(dev, core, s_standby, 0);
+	if (fh->radio)
+		saa_call_all(dev, core, ioctl, RDS_CMD_CLOSE, &cmd);
 
 	/* free stuff */
 	videobuf_mmap_free(&fh->cap);
@@ -1518,6 +1522,37 @@
 	struct saa7134_fh *fh = file->private_data;
 
 	return videobuf_mmap_mapper(saa7134_queue(fh), vma);
+}
+
+static ssize_t radio_read(struct file *file, char __user *data,
+			 size_t count, loff_t *ppos)
+{
+	struct saa7134_fh *fh = file->private_data;
+	struct saa7134_dev *dev = fh->dev;
+	struct rds_command cmd;
+
+	cmd.block_count = count/3;
+	cmd.buffer = data;
+	cmd.instance = file;
+	cmd.result = -ENODEV;
+
+	saa_call_all(dev, core, ioctl, RDS_CMD_READ, &cmd);
+
+	return cmd.result;
+}
+
+static unsigned int radio_poll(struct file *file, poll_table *wait)
+{
+	struct saa7134_fh *fh = file->private_data;
+	struct saa7134_dev *dev = fh->dev;
+	struct rds_command cmd;
+
+	cmd.instance = file;
+	cmd.event_list = wait;
+	cmd.result = -ENODEV;
+	saa_call_all(dev, core, ioctl, RDS_CMD_POLL, &cmd);
+
+	return cmd.result;
 }
 
 /* ------------------------------------------------------------------ */
@@ -2451,8 +2486,10 @@
 static const struct v4l2_file_operations radio_fops = {
 	.owner	  = THIS_MODULE,
 	.open	  = video_open,
+	.read     = radio_read,
 	.release  = video_release,
 	.ioctl	  = video_ioctl2,
+	.poll     = radio_poll,
 };
 
 static const struct v4l2_ioctl_ops radio_ioctl_ops = {
diff -r 54ae11f1e777 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Wed Feb 11 23:28:30 2009 +0100
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Fri Feb 13 09:07:20 2009 +0100
@@ -326,6 +326,7 @@
 	unsigned int		radio_type;
 	unsigned char		tuner_addr;
 	unsigned char		radio_addr;
+	unsigned char		rds_addr;
 
 	unsigned int            tda9887_conf;
 	unsigned int            tuner_config;

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-04 10:03 Hans Verkuil
@ 2009-03-04 12:02 ` Dmitri Belimov
  2009-03-04 17:45   ` Hans Verkuil
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-04 12:02 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans J. Koch, hermann pitton, Hans J. Koch, video4linux-list,
	linux-media

Hi

> 
> > On Wed, Mar 04, 2009 at 01:43:08AM +0100, hermann pitton wrote:
> >> Hi,
> >>
> >> Am Montag, den 02.03.2009, 13:33 +0900 schrieb Dmitri Belimov:
> >> > Hi All.
> >> >
> >> > I want use RDS on our TV cards. But now saa7134 not work with
> >> > saa6588. I found this old patch from Hans J. Koch. Why this
> >> > patch is not in
> >> mercurial??
> >> > Yes I know that patch for v4l ver.1 and for old kernel. But why
> >> > not?? v4l has other way for RDS on saa7134 boards?
> >>
> >> I think the patch got lost, because it was not clear who should
> >> pull it in. Likely Hartmut or Mauro would have picked it up in
> >> 2006 if pinged directly.
> >
> > The main reason was that at that time there was a conflict with the
> > i2c ir keyboard driver. I couldn't fix it immediately and was
> > occupied with different things afterwards. I don't know if saa7134
> > i2c got fixed in the meantime.
> >
> >>
> >> Please try to work with Hans to get it in now. There was also a
> >> suggestion to add a has_rds capability flag and about how to deal
> >> with different RDS decoders later, IIRC.
> >
> > Right. We should have a flag you could set to something like
> >   .has_rds = RDS_SAA6588
> > so that the rds driver could be loaded automagically.
> >
> > But I'm afraid I cannot spend much time on this work ATM, sorry.
> >
> > Thanks,
> > Hans
> 
> Dmitri,
> 
> I have a patch pending to fix this for the saa7134 driver. The i2c
> problems are resolved, so this shouldn't be a problem anymore.

Good news!

> The one thing that is holding this back is that I first want to
> finalize the RFC regarding the RDS support. I posted an RFC a few
> weeks ago, but I need to make a second version and for that I need to
> do a bit of research into the US version of RDS. And I haven't found
> the time to do that yet.

Yes, I found your discussion in linux-media mailing list. If you
need any information from chip vendor I'll try find. I can get it
under NDA and help you.

> I'll see if I can get the patch merged anyway.
> 
> Regards,
> 
>         Hans

With my best regards, Dmitry.
 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
@ 2009-03-04 10:03 Hans Verkuil
  2009-03-04 12:02 ` Dmitri Belimov
  0 siblings, 1 reply; 17+ messages in thread
From: Hans Verkuil @ 2009-03-04 10:03 UTC (permalink / raw)
  To: Hans J. Koch
  Cc: hermann pitton, Dmitri Belimov, Hans J. Koch,
	Hans-Jürgen Koch, video4linux-list, linux-media


> On Wed, Mar 04, 2009 at 01:43:08AM +0100, hermann pitton wrote:
>> Hi,
>>
>> Am Montag, den 02.03.2009, 13:33 +0900 schrieb Dmitri Belimov:
>> > Hi All.
>> >
>> > I want use RDS on our TV cards. But now saa7134 not work with saa6588.
>> > I found this old patch from Hans J. Koch. Why this patch is not in
>> mercurial??
>> > Yes I know that patch for v4l ver.1 and for old kernel. But why not??
>> > v4l has other way for RDS on saa7134 boards?
>>
>> I think the patch got lost, because it was not clear who should pull it
>> in. Likely Hartmut or Mauro would have picked it up in 2006 if pinged
>> directly.
>
> The main reason was that at that time there was a conflict with the i2c
> ir keyboard driver. I couldn't fix it immediately and was occupied with
> different things afterwards. I don't know if saa7134 i2c got fixed
> in the meantime.
>
>>
>> Please try to work with Hans to get it in now. There was also a
>> suggestion to add a has_rds capability flag and about how to deal with
>> different RDS decoders later, IIRC.
>
> Right. We should have a flag you could set to something like
>   .has_rds = RDS_SAA6588
> so that the rds driver could be loaded automagically.
>
> But I'm afraid I cannot spend much time on this work ATM, sorry.
>
> Thanks,
> Hans

Dmitri,

I have a patch pending to fix this for the saa7134 driver. The i2c
problems are resolved, so this shouldn't be a problem anymore.

The one thing that is holding this back is that I first want to finalize
the RFC regarding the RDS support. I posted an RFC a few weeks ago, but I
need to make a second version and for that I need to do a bit of research
into the US version of RDS. And I haven't found the time to do that yet.

I'll see if I can get the patch merged anyway.

Regards,

        Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-04  0:43 ` hermann pitton
@ 2009-03-04  9:32   ` Hans J. Koch
  0 siblings, 0 replies; 17+ messages in thread
From: Hans J. Koch @ 2009-03-04  9:32 UTC (permalink / raw)
  To: hermann pitton
  Cc: Dmitri Belimov, Hans J. Koch, Hans-Jürgen Koch,
	video4linux-list, linux-media

On Wed, Mar 04, 2009 at 01:43:08AM +0100, hermann pitton wrote:
> Hi,
> 
> Am Montag, den 02.03.2009, 13:33 +0900 schrieb Dmitri Belimov:
> > Hi All.
> > 
> > I want use RDS on our TV cards. But now saa7134 not work with saa6588.
> > I found this old patch from Hans J. Koch. Why this patch is not in mercurial??
> > Yes I know that patch for v4l ver.1 and for old kernel. But why not?? 
> > v4l has other way for RDS on saa7134 boards?
> 
> I think the patch got lost, because it was not clear who should pull it
> in. Likely Hartmut or Mauro would have picked it up in 2006 if pinged
> directly.

The main reason was that at that time there was a conflict with the i2c
ir keyboard driver. I couldn't fix it immediately and was occupied with
different things afterwards. I don't know if saa7134 i2c got fixed
in the meantime.

> 
> Please try to work with Hans to get it in now. There was also a
> suggestion to add a has_rds capability flag and about how to deal with
> different RDS decoders later, IIRC.

Right. We should have a flag you could set to something like
  .has_rds = RDS_SAA6588
so that the rds driver could be loaded automagically.

But I'm afraid I cannot spend much time on this work ATM, sorry.

Thanks,
Hans


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: saa7134 and RDS
  2009-03-02  4:33 Dmitri Belimov
@ 2009-03-04  0:43 ` hermann pitton
  2009-03-04  9:32   ` Hans J. Koch
  0 siblings, 1 reply; 17+ messages in thread
From: hermann pitton @ 2009-03-04  0:43 UTC (permalink / raw)
  To: Dmitri Belimov, Hans J. Koch, Hans-Jürgen Koch
  Cc: video4linux-list, linux-media

Hi,

Am Montag, den 02.03.2009, 13:33 +0900 schrieb Dmitri Belimov:
> Hi All.
> 
> I want use RDS on our TV cards. But now saa7134 not work with saa6588.
> I found this old patch from Hans J. Koch. Why this patch is not in mercurial??
> Yes I know that patch for v4l ver.1 and for old kernel. But why not?? 
> v4l has other way for RDS on saa7134 boards?

I think the patch got lost, because it was not clear who should pull it
in. Likely Hartmut or Mauro would have picked it up in 2006 if pinged
directly.

Please try to work with Hans to get it in now. There was also a
suggestion to add a has_rds capability flag and about how to deal with
different RDS decoders later, IIRC.

Cheers,
Hermann

------- from Hans' original posting ------

> I finally succeeded adding support for the saa6588 RDS decoder to the saa7134 
> driver. I tested it with a Terratec Cinergy 600, and it seems to work. With 
> the attached patch applied to saa7134-video.c, I can do
> 
> modprobe saa6588 xtal=1
> 
> and can then read RDS data from /dev/radio.
> 
> I'd be pleased if you could apply that patch.
> 
> Cheers,
> Hans
> 
> Signed-off-by: Hans J. Koch <koch@xxxxxxxxx>
> 
> --- orig/v4l-dvb/linux/drivers/media/video/saa7134/saa7134-video.c	2006-05-06 13:27:49.000000000 +0200
> +++ mine/v4l-dvb/linux/drivers/media/video/saa7134/saa7134-video.c	2006-05-05 14:38:11.000000000 +0200
> @@ -31,6 +31,7 @@
>  #include "saa7134-reg.h"
>  #include "saa7134.h"
>  #include <media/v4l2-common.h>
> +#include <media/rds.h>
>  
>  #ifdef CONFIG_VIDEO_V4L1_COMPAT
>  /* Include V4L1 specific functions. Should be removed soon */
> @@ -1374,6 +1375,7 @@ static int video_release(struct inode *i
>  	struct saa7134_fh  *fh  = file->private_data;
>  	struct saa7134_dev *dev = fh->dev;
>  	unsigned long flags;
> +	struct rds_command cmd;
>  
>  	/* turn off overlay */
>  	if (res_check(fh, RESOURCE_OVERLAY)) {
> @@ -1409,6 +1411,7 @@ static int video_release(struct inode *i
>  	saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
>  
>  	saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
> +	saa7134_i2c_call_clients(dev, RDS_CMD_CLOSE, &cmd);
>  
>  	/* free stuff */
>  	videobuf_mmap_free(&fh->cap);
> @@ -2284,6 +2287,35 @@ static int radio_ioctl(struct inode *ino
>  	return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
>  }
>  
> +static ssize_t radio_read(struct file *file, char __user *data,
> +			 size_t count, loff_t *ppos)
> +{
> +	struct saa7134_fh *fh = file->private_data;
> +	struct saa7134_dev *dev = fh->dev;
> +	struct rds_command cmd;
> +	cmd.block_count = count/3;
> +	cmd.buffer = data;
> +	cmd.instance = file;
> +	cmd.result = -ENODEV;
> +
> +	saa7134_i2c_call_clients(dev, RDS_CMD_READ, &cmd);
> +
> +	return cmd.result;
> +}
> +
> +static unsigned int radio_poll(struct file *file, poll_table *wait)
> +{
> +	struct saa7134_fh *fh = file->private_data;
> +	struct saa7134_dev *dev = fh->dev;
> +	struct rds_command cmd;
> +	cmd.instance = file;
> +	cmd.event_list = wait;
> +	cmd.result = -ENODEV;
> +	saa7134_i2c_call_clients(dev, RDS_CMD_POLL, &cmd);
> +
> +	return cmd.result;
> +}
> +
>  static struct file_operations video_fops =
>  {
>  	.owner	  = THIS_MODULE,
> @@ -2305,6 +2337,8 @@ static struct file_operations radio_fops
>  	.open	  = video_open,
>  	.release  = video_release,
>  	.ioctl	  = radio_ioctl,
> +	.read	  = radio_read,
> +	.poll	  = radio_poll,
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
>  	.compat_ioctl	= v4l_compat_ioctl32,
>  #endif
> 
> --
> 
> 
> With my best regards, Dmitry.
> 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* saa7134 and RDS
@ 2009-03-02  4:33 Dmitri Belimov
  2009-03-04  0:43 ` hermann pitton
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitri Belimov @ 2009-03-02  4:33 UTC (permalink / raw)
  To: video4linux-list

Hi All.

I want use RDS on our TV cards. But now saa7134 not work with saa6588.
I found this old patch from Hans J. Koch. Why this patch is not in mercurial??
Yes I know that patch for v4l ver.1 and for old kernel. But why not?? 
v4l has other way for RDS on saa7134 boards?

I finally succeeded adding support for the saa6588 RDS decoder to the saa7134 
driver. I tested it with a Terratec Cinergy 600, and it seems to work. With 
the attached patch applied to saa7134-video.c, I can do

modprobe saa6588 xtal=1

and can then read RDS data from /dev/radio.

I'd be pleased if you could apply that patch.

Cheers,
Hans

Signed-off-by: Hans J. Koch <koch@xxxxxxxxx>

--- orig/v4l-dvb/linux/drivers/media/video/saa7134/saa7134-video.c	2006-05-06 13:27:49.000000000 +0200
+++ mine/v4l-dvb/linux/drivers/media/video/saa7134/saa7134-video.c	2006-05-05 14:38:11.000000000 +0200
@@ -31,6 +31,7 @@
 #include "saa7134-reg.h"
 #include "saa7134.h"
 #include <media/v4l2-common.h>
+#include <media/rds.h>
 
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
 /* Include V4L1 specific functions. Should be removed soon */
@@ -1374,6 +1375,7 @@ static int video_release(struct inode *i
 	struct saa7134_fh  *fh  = file->private_data;
 	struct saa7134_dev *dev = fh->dev;
 	unsigned long flags;
+	struct rds_command cmd;
 
 	/* turn off overlay */
 	if (res_check(fh, RESOURCE_OVERLAY)) {
@@ -1409,6 +1411,7 @@ static int video_release(struct inode *i
 	saa_andorb(SAA7134_OFMT_DATA_B, 0x1f, 0);
 
 	saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+	saa7134_i2c_call_clients(dev, RDS_CMD_CLOSE, &cmd);
 
 	/* free stuff */
 	videobuf_mmap_free(&fh->cap);
@@ -2284,6 +2287,35 @@ static int radio_ioctl(struct inode *ino
 	return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
 }
 
+static ssize_t radio_read(struct file *file, char __user *data,
+			 size_t count, loff_t *ppos)
+{
+	struct saa7134_fh *fh = file->private_data;
+	struct saa7134_dev *dev = fh->dev;
+	struct rds_command cmd;
+	cmd.block_count = count/3;
+	cmd.buffer = data;
+	cmd.instance = file;
+	cmd.result = -ENODEV;
+
+	saa7134_i2c_call_clients(dev, RDS_CMD_READ, &cmd);
+
+	return cmd.result;
+}
+
+static unsigned int radio_poll(struct file *file, poll_table *wait)
+{
+	struct saa7134_fh *fh = file->private_data;
+	struct saa7134_dev *dev = fh->dev;
+	struct rds_command cmd;
+	cmd.instance = file;
+	cmd.event_list = wait;
+	cmd.result = -ENODEV;
+	saa7134_i2c_call_clients(dev, RDS_CMD_POLL, &cmd);
+
+	return cmd.result;
+}
+
 static struct file_operations video_fops =
 {
 	.owner	  = THIS_MODULE,
@@ -2305,6 +2337,8 @@ static struct file_operations radio_fops
 	.open	  = video_open,
 	.release  = video_release,
 	.ioctl	  = radio_ioctl,
+	.read	  = radio_read,
+	.poll	  = radio_poll,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
 	.compat_ioctl	= v4l_compat_ioctl32,
 #endif

--


With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-03-10  8:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-05 12:07 saa7134 and RDS Hans Verkuil
2009-03-05 16:36 ` Hans Verkuil
2009-03-07  1:55   ` Hans J. Koch
2009-03-07  8:54     ` Hans Verkuil
2009-03-07  9:02       ` Dmitri Belimov
2009-03-07  9:19         ` Hans Verkuil
2009-03-10  2:49           ` Dmitri Belimov
2009-03-10  7:17             ` Hans Verkuil
2009-03-10  8:04               ` Dmitri Belimov
  -- strict thread matches above, loose matches on Subject: below --
2009-03-04 10:03 Hans Verkuil
2009-03-04 12:02 ` Dmitri Belimov
2009-03-04 17:45   ` Hans Verkuil
2009-03-05 12:01     ` Dmitri Belimov
2009-03-07  1:50       ` Hans J. Koch
2009-03-02  4:33 Dmitri Belimov
2009-03-04  0:43 ` hermann pitton
2009-03-04  9:32   ` Hans J. Koch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.