• TI Thinks Resolved

Linux/PCM9211: Issue in getting data from PCM9211

Prodigy 190 points

Replies: 4

Views: 153

Part Number: PCM9211

Tool/software: Linux

Hi everyone,

We are working on a project which involves 3 PCM9211 together to route the signal to and from different devices.

We reuse the unofficial Linux driver from patchwork.kernel.org/.../ We improved it a bit (Auxillary output + DIT supports, some required fixes, etc.).

The driver works fine, from Linux I can use the device tree + alsamixer to set up properly the routing of all of them. And when I read back registers it seems to be consistent with the settings.

To simplify the understanding, you can watch the following schematics of the PCM9211 system. PCM9211routing.pdf

And then you have the registers values for all of them. The audio depth is 16 bits. We are using XTI in cascade (through MPIO A to propagate it, and we have this clock signal for all of them). Addresses and values are in hexadecimal.

First device:

20: 00
21: 00
22: 01
23: 04
24: 10
25: 01
26: 01
27: 00
28: 07
29: 0c
2a: a9
2b: ff
2c: 00
2d: 00
2e: 00
2f: 03
30: 12
31: 0d
32: 22
33: 31
34: 00
35: 02
36: 02
37: 00
38: 08
39: 80
3a: 00
3b: 00
3c: 00
3d: 00
40: 60
42: 02
46: d7
47: d7
48: 03
49: 00
5a: 00
5b: 00
5c: 00
5d: 00
5e: 00
5f: 00
60: 11
61: 13
62: 00
63: 00
64: 00
65: 00
66: 00
67: 00
68: 00
6a: 00
6b: 11
6c: 11
6d: 00
6e: 00
6f: 48
70: 00
71: 00
72: 00
73: 00
74: 00
75: 00
76: 00
77: 00
78: 0d
79: 00
7a: 00
7b: 00
7c: 00
7d: 00
7e: 02

Second device:

20: 00
21: 00
22: 01
23: 04
24: 10
25: 01
26: 01
27: 00
28: 07
29: 0c
2a: a9
2b: ff
2c: 00
2d: 00
2e: 00
2f: 03
30: 12
31: 0d
32: 22
33: 31
34: 00
35: 02
36: 02
37: 00
38: 08
39: 80
3a: 00
3b: 00
3c: 00
3d: 00
40: 60
42: 02
46: d7
47: d7
48: 03
49: 00
5a: 00
5b: 00
5c: 00
5d: 00
5e: 00
5f: 00
60: 11
61: 13
62: 00
63: 00
64: 00
65: 00
66: 00
67: 00
68: 00
6a: 00
6b: 11
6c: 11
6d: 00
6e: 00
6f: 48
70: 00
71: 00
72: 00
73: 00
74: 00
75: 00
76: 00
77: 00
78: 0d
79: 00
7a: 00
7b: 00
7c: 00
7d: 00
7e: 02

Third device:

20: 00
21: 00
22: 01
23: 04
24: 10
25: 01
26: 01
27: 00
28: 07
29: 0c
2a: a9
2b: ff
2c: 00
2d: 00
2e: 00
2f: 03
30: 12
31: 0d
32: 22
33: 31
34: 00
35: 02
36: 02
37: 00
38: 08
39: 80
3a: 00
3b: 00
3c: 00
3d: 00
40: 60
42: 02
46: d7
47: d7
48: 03
49: 00
5a: 00
5b: 00
5c: 00
5d: 00
5e: 00
5f: 00
60: 11
61: 13
62: 00
63: 00
64: 00
65: 00
66: 00
67: 00
68: 00
6a: 00
6b: 11
6c: 44
6d: 00
6e: 00
6f: 40
70: 00
71: 00
72: 00
73: 00
74: 00
75: 00
76: 00
77: 00
78: 0d
79: 00
7a: 00
7b: 00
7c: 00
7d: 00
7e: 02

The behavior at some points seems correct. We can see on analog output the clock signals consistent with our configuration but no data on the line. Digital outputs has a signal which seems valid also, but when we plugged them into into an audio system we don't get any sound.

The documentation (example on page 50 to explain some registers configuration) + the forum explanations + EVM software do not help us to configure it correctly. Everything seems ok from our point of view.

Do you have any idea? Thank you in advance!

  • User, 

    one thing I noticed is your routing assumes that the MPIO0/1 selector has a DITOUT input,  but this is not the case.   This is an error in the Datasheet,  you need to use the RECOUT0 or RECOUT1 MUX (either register 0x35 or 0x36) and then select one of those for the MPIO selector inputs.

     

    best regards,

    -STeve Wilson

  • In reply to Steve-Wilson:

    Hi,

    Thank you for the suggestion. Unfortunately, it is not enough to solve our issue.

    A dump of my registers with these settings:

    root@CORELINKRES:~# cat /sys/kernel/debug/regmap/0-0040/registers
    20: 00
    21: 00
    22: 01
    23: 04
    24: 10
    25: 01
    26: 01
    27: 00
    28: 07
    29: 0c
    2a: a9
    2b: ff
    2c: 02
    2d: 00
    2e: 00
    2f: 03
    30: 12
    31: 0d
    32: 22
    33: 31
    34: 00
    35: 0f
    36: 02
    37: 00
    38: 08
    39: 0c
    3a: 00
    3b: 00
    3c: 00
    3d: 00
    40: 40
    42: 02
    46: d7
    47: d7
    48: 03
    49: 00
    5a: 00
    5b: 00
    5c: 00
    5d: 00
    5e: 00
    5f: 00
    60: 11
    61: 13
    62: 00
    63: 00
    64: 00
    65: 00
    66: 00
    67: 00
    68: 00
    6a: 00
    6b: 11
    6c: 00
    6d: 00
    6e: 00
    6f: 48
    70: 00
    71: 00
    72: 00
    73: 00
    74: 00
    75: 00
    76: 00
    77: 00
    78: 0e
    79: 00
    7a: 00
    7b: 00
    7c: 00
    7d: 00
    7e: 02
    root@CORELINKRES:~# cat /sys/kernel/debug/regmap/0-0041/registers
    20: 00
    21: 00
    22: 01
    23: 04
    24: 10
    25: 01
    26: 01
    27: 00
    28: 07
    29: 0c
    2a: a9
    2b: ff
    2c: 02
    2d: 00
    2e: 00
    2f: 03
    30: 12
    31: 0d
    32: 22
    33: 31
    34: 00
    35: 0f
    36: 02
    37: 00
    38: 08
    39: 0c
    3a: 00
    3b: 00
    3c: 00
    3d: 00
    40: 40
    42: 02
    46: d7
    47: d7
    48: 03
    49: 00
    5a: 00
    5b: 00
    5c: 00
    5d: 00
    5e: 00
    5f: 00
    60: 11
    61: 13
    62: 00
    63: 00
    64: 00
    65: 00
    66: 00
    67: 00
    68: 00
    6a: 00
    6b: 11
    6c: 00
    6d: 00
    6e: 00
    6f: 48
    70: 00
    71: 00
    72: 00
    73: 00
    74: 00
    75: 00
    76: 00
    77: 00
    78: 0e
    79: 00
    7a: 00
    7b: 00
    7c: 00
    7d: 00
    7e: 02
    root@CORELINKRES:~# cat /sys/kernel/debug/regmap/0-0042/registers
    20: 00
    21: 00
    22: 01
    23: 04
    24: 10
    25: 01
    26: 01
    27: 00
    28: 07
    29: 0c
    2a: a9
    2b: ff
    2c: 02
    2d: 00
    2e: 00
    2f: 03
    30: 12
    31: 0d
    32: 22
    33: 31
    34: 00
    35: 0f
    36: 02
    37: 07
    38: 08
    39: 80
    3a: 00
    3b: 00
    3c: 00
    3d: 00
    40: 40
    42: 02
    46: d7
    47: d7
    48: 03
    49: 00
    5a: 00
    5b: 00
    5c: 00
    5d: 00
    5e: 00
    5f: 00
    60: 22
    61: 13
    62: 00
    63: 00
    64: 00
    65: 00
    66: 00
    67: 00
    68: 00
    6a: 00
    6b: 00
    6c: 00
    6d: 00
    6e: 00
    6f: 40
    70: 00
    71: 00
    72: 00
    73: 00
    74: 00
    75: 00
    76: 00
    77: 00
    78: 0e
    79: 00
    7a: 00
    7b: 00
    7c: 00
    7d: 00
    7e: 02

    There are in the natural order.

    The current routing for these settings is the following.

    First PCM : RXIN0 -> DIR -> DIT -> RECOUT0 -> MPO0 and RXIN0 -> DIR -> Main

    Second PCM: RXIN0 -> DIR -> DIT -> RECOUT0 -> MPO0

    Third PCM: ADC -> DIT -> RECOUT0 -> MPO0

    The ADC is the only real input for the moment. I play something from my PC connected through Jack cable to our board. We can detect a signal on input pins for ADC.

    Do you have an idea what is missing? What can be wrong in our config?

  • In reply to Steve-Wilson:

    Any idea to solve my issue?

  • In reply to user4201415:

    User, 

    The sequence to connect Rx0 to MPO0 is 

    w 80 34 00 0c

    w 80 60 11

    w 80 78 0e 

    best regards,

    -Steve Wilson