Configuration settings for WM8850 wolfson audio codec

2015-07-14 Thread bineet
I need to check setting done for WM8850 wolfson audio codec chip. I tried
browsing linux code, but couldn't find any clue.
Could someone please help with the same?

Thanks,
Bineet
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Query on operstatus for link, can I change it?

2015-07-14 Thread Amit Agarwal
On 15-07-14 20:38:49, Jeff Haran wrote:
> > -Original Message-
> 
> I think of the two virtual interfaces as real NICs with a cable between them. 
> I am pretty sure they are protocol agnostic.
Yes, pretty much that.

> 
> > If so, how do I make sure that no packets other than one
> > injected by me are seen on this interface. Sorry, if this sounds too 
> > stupid, but
> > I am noob in this area.
> 
> That's what routing tables are for. 8^)
right :)

Thanks a ton Jeff. With your advice and some google, I think I can settle for
dummy interface which is similar to veth - only difference being it creates one
interface. Commands remain the same and I have to change only veth to dummy
for type in the ip command.

Also I found that I can set netmask to /32, turn off multicast and arp which
should get me to what I wanted. Thanks again.

-- 
 Thanks,
-aka

Beware of Programmers who carry screwdrivers.
-- Leonard Brandwein

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Query on operstatus for link, can I change it?

2015-07-14 Thread Jeff Haran
> -Original Message-
> From: kernelnewbies-bounces+jharan=bytemobile@kernelnewbies.org
> [mailto:kernelnewbies-
> bounces+jharan=bytemobile@kernelnewbies.org] On Behalf Of Amit
> Agarwal
> Sent: Tuesday, July 14, 2015 12:54 PM
> To: Kernelnewbies
> Subject: Re: Query on operstatus for link, can I change it?
> 
... 
> One last query on this, does this interface receive any packet by default of
> any protocol.

I think of the two virtual interfaces as real NICs with a cable between them. I 
am pretty sure they are protocol agnostic.

> If so, how do I make sure that no packets other than one
> injected by me are seen on this interface. Sorry, if this sounds too stupid, 
> but
> I am noob in this area.

That's what routing tables are for. 8^)

Jeff Haran


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Query on operstatus for link, can I change it?

2015-07-14 Thread Amit Agarwal
On 15-07-14 19:34:42, Jeff Haran wrote:
> 
> The last time I looked into this (and this was quite a while ago so take this 
> with much salt) the lo device was not a "regular network device". The stack 
> sets up an instance of lo in every network name space created, more or less 
> automatically via the registration of its init routine in a struct 
> pernet_operations. So lo doesn't initialize like most other network devices. 
> You might have issues there. I know I did last time I tried to "borrow" 
> loopback.c to do something similar for some prototyping I was doing.

Realized that while looking at this code. But thankd for pointing this.


> 
> If you are willing to monkey with kernel code, it might be easier to just 
> twiddle the link sense routine in driver for the "other NIC" you were 
> planning to use to always report the link as up regardless of what the PHY 
> says.
>
This too is good option. 

Found anther option that looks like should solve the problem I am after. veth
device - as you suggested earlier. So, as I understand veth device creates a
sender and receiver. So, if I send on veth0, I will receive on veth1. So, the
steps that I would need is (using iproute2 utility):

ip link add type veth name veth0 peer name veth1
ip link set dev veth0 up
ip link set dev veth1 up
and then add the address to what ever I require.

I quickly tested and seems that I am able to play on veth0 and receive on
veth1.

One last query on this, does this interface receive any packet by default of
any protocol. If so, how do I make sure that no packets other than one
injected by me are seen on this interface. Sorry, if this sounds too stupid,
but I am noob in this area.

>
>
> 

-- 
 Thanks,
-aka


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: About Low Hanging Fruits

2015-07-14 Thread Valdis . Kletnieks
On Mon, 13 Jul 2015 13:11:57 -0400, "Robert P. J. Day" said:

>   actually, one area of low-hanging fruit is the Documentation/
> directory, which could always use some attention. documentation is
> always getting out of date, so pick a subsystem and clean up the docs.

Good catch, I'll add it to my standard reply. :)


pgp0fWSRkia_j.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Query on operstatus for link, can I change it?

2015-07-14 Thread Jeff Haran
> -Original Message-
> From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-
> boun...@kernelnewbies.org] On Behalf Of Amit Agarwal
> Sent: Tuesday, July 14, 2015 11:41 AM
> To: Kernelnewbies
> Subject: Re: Query on operstatus for link, can I change it?
> 
> Hi Jeff,
> On 15-07-14 16:06:39, Jeff Haran wrote:
> > > -Original Message-
> >
> > You might be able to make something like this work using network
> namespaces and veth devices. Depends on whether you really need to use
> your extra physical interface as the tcpreplay device.
> 
> Thanks for this pointer. I will check if I can achieve what I want with netns.
> 
> Also, I was wondering if I can just copy the loopback.c file, build it as 
> module
> and do insmod after changing the network name from "lo" to something
> else, will that work?

The last time I looked into this (and this was quite a while ago so take this 
with much salt) the lo device was not a "regular network device". The stack 
sets up an instance of lo in every network name space created, more or less 
automatically via the registration of its init routine in a struct 
pernet_operations. So lo doesn't initialize like most other network devices. 
You might have issues there. I know I did last time I tried to "borrow" 
loopback.c to do something similar for some prototyping I was doing.

If you are willing to monkey with kernel code, it might be easier to just 
twiddle the link sense routine in driver for the "other NIC" you were planning 
to use to always report the link as up regardless of what the PHY says.

Jeff Haran


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Query on operstatus for link, can I change it?

2015-07-14 Thread Amit Agarwal
Hi Jeff,
On 15-07-14 16:06:39, Jeff Haran wrote:
> > -Original Message-
> 
> You might be able to make something like this work using network namespaces 
> and veth devices. Depends on whether you really need to use your extra 
> physical interface as the tcpreplay device.

Thanks for this pointer. I will check if I can achieve what I want with netns.

Also, I was wondering if I can just copy the loopback.c file, build it as
module and do insmod after changing the network name from "lo" to something
else, will that work?

-- 
 Thanks,
-aka


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Which comments is unnessary?

2015-07-14 Thread Miles Fidelman
Seems to me that every comment there is useful to someone who might come 
along later and try to understand that piece of code, and what it's doing.

Navy wrote:
> Hi,
> Here is a code fragment, which comments is unnessary? I think the all the 
> comments should be remove because the comments should show "What to do rather 
> than "How to do?". Am I right?
>
>
> /
>   * Unit flag definitions for un_flags.
>   /
> #define UN_ISOPEN 0x0001  /* Device is open   */
> #define UN_CLOSING0x0002  /* Line is being closed */
> #define UN_IMM0x0004  /* Service immediately  
> */
> #define UN_BUSY   0x0008  /* Some work this channel   
> */
> #define UN_BREAKI 0x0010  /* Input break received */
> #define UN_PWAIT  0x0020  /* Printer waiting for terminal */
> #define UN_TIME   0x0040  /* Waiting on time  
> */
> #define UN_EMPTY  0x0080  /* Waiting output queue empty   */
> #define UN_LOW0x0100  /* Waiting output low water 
> mark*/
> #define UN_EXCL_OPEN  0x0200  /* Open for exclusive use   */
> #define UN_WOPEN  0x0400  /* Device waiting for open  */
> #define UN_WIOCTL 0x0800  /* Device waiting for open  */
> #define UN_HANGUP 0x8000  /* Carrier lost */
>
> struct device;
>
> /
>   * Structure for terminal or printer unit.
>   /
> struct un_t {
>   int magic;  /* Unit Magic Number.   */
>   struct  channel_t *un_ch;
>   ulong   un_time;
>   uintun_type;
>   uintun_open_count;  /* Counter of opens to port */
>   struct tty_struct *un_tty;/* Pointer to unit tty structure  */
>   uintun_flags;   /* Unit flags   */
>   wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */
>   uintun_dev; /* Minor device number  */
>   struct device *un_sysfs;
> };
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-- 
In theory, there is no difference between theory and practice.
In practice, there is.    Yogi Berra


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Which comments is unnessary?

2015-07-14 Thread Navy
Hi,
Here is a code fragment, which comments is unnessary? I think the all the 
comments should be remove because the comments should show "What to do rather 
than "How to do?". Am I right?


/
 * Unit flag definitions for un_flags.
 /
#define UN_ISOPEN   0x0001  /* Device is open   */
#define UN_CLOSING  0x0002  /* Line is being closed */
#define UN_IMM  0x0004  /* Service immediately  */
#define UN_BUSY 0x0008  /* Some work this channel   */
#define UN_BREAKI   0x0010  /* Input break received */
#define UN_PWAIT0x0020  /* Printer waiting for terminal */
#define UN_TIME 0x0040  /* Waiting on time  */
#define UN_EMPTY0x0080  /* Waiting output queue empty   */
#define UN_LOW  0x0100  /* Waiting output low water mark*/
#define UN_EXCL_OPEN0x0200  /* Open for exclusive use   */
#define UN_WOPEN0x0400  /* Device waiting for open  */
#define UN_WIOCTL   0x0800  /* Device waiting for open  */
#define UN_HANGUP   0x8000  /* Carrier lost */

struct device;

/
 * Structure for terminal or printer unit.
 /
struct un_t {
int magic;  /* Unit Magic Number.   */
struct  channel_t *un_ch;
ulong   un_time;
uintun_type;
uintun_open_count;  /* Counter of opens to port */
struct tty_struct *un_tty;/* Pointer to unit tty structure  */
uintun_flags;   /* Unit flags   */
wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */
uintun_dev; /* Minor device number  */
struct device *un_sysfs;
};


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Query on operstatus for link, can I change it?

2015-07-14 Thread Jeff Haran
> -Original Message-
> From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-
> boun...@kernelnewbies.org] On Behalf Of Amit Agarwal
> Sent: Tuesday, July 14, 2015 5:14 AM
> To: Kernelnewbies
> Subject: Query on operstatus for link, can I change it?
> 
> 
> Hi,
> 
> I am looking for a way to change the operstatus shown for the network
> interface.
> 
> Problem:
> I have an extra interface on the machine that I would like to use for some
> program like tcpreplay and tcpdump/wireshark. So, I would like to play a pcap
> file on this interface and then capture on the same interface with wireshark.
> Now the problem with this is that unless a cable is plugged in I do not see 
> any
> packets in wireshark, although I do not see any failures in sending the
> packets. I would like to do this without any cable being plugged in as I do 
> not
> intend to send the packets out, is this possible?
> 
> The reason I cannot use lo interface for doing this is: there will be other
> packets on the lo interface and I want to capture only the packets in the pcap
> file that I am playing with tcpreplay.
> 
> Thanks in advance for any advice on this.
> 
> --
>  Thanks,
> -aka

You might be able to make something like this work using network namespaces and 
veth devices. Depends on whether you really need to use your extra physical 
interface as the tcpreplay device.

Jeff Haran


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Query on operstatus for link, can I change it?

2015-07-14 Thread Amit Agarwal

Hi,

I am looking for a way to change the operstatus shown for the network
interface.

Problem:
I have an extra interface on the machine that I would like to use for some
program like tcpreplay and tcpdump/wireshark. So, I would like to play a pcap
file on this interface and then capture on the same interface with wireshark.
Now the problem with this is that unless a cable is plugged in I do not see
any packets in wireshark, although I do not see any failures in sending the
packets. I would like to do this without any cable being
plugged in as I do not intend to send the packets out, is this possible?

The reason I cannot use lo interface for doing this is: there will be other
packets on the lo interface and I want to capture only the packets in the pcap
file that I am playing with tcpreplay.

Thanks in advance for any advice on this.

-- 
 Thanks,
-aka

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies