This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TAS2780: Porting TAS2780 issues on Qualcomm paltform

Part Number: TAS2780
Other Parts Discussed in Thread: TAS2781

Tool/software:

Hi TI:

I'm porting the tas2780 driver.

Currently, We can see below tinymix command and can dump register

5172    INT      1          tas2780-amp-gain-volume                  20

5174    INT      1          tas2780-digital-volume                   201

5175    INT      1          TASDEVICE Profile id                     0

 

$ echo>fwload

[  107.447594] tasdevice-codec 1-0038: fwload: count = 1

[  107.447623] tasdevice-codec 1-0038: fw tas2780-1amp-reg.bin already loaded

 

Q1:

I followed the gen bin tool documentation and used the default tas2780-1amp-reg.json to generate the bin file.

Play www.youtube.com/watch

Measure the input of the speaker

Are below waveform are correct?

dump register

lahaina:/sys/bus/i2c/devices/1-0038 # cat regdump                                                                                                                                            

i2c-addr: 0x38

DeviceID: 0x00

Chn0B0x00P0x00R0x00:0x00

Chn0B0x00P0x00R0x01:0x00

Chn0B0x00P0x00R0x02:0x02

Chn0B0x00P0x00R0x03:0x28

Chn0B0x00P0x00R0x04:0x21

Chn0B0x00P0x00R0x05:0x41

Chn0B0x00P0x00R0x06:0x00

Chn0B0x00P0x00R0x07:0x20

Chn0B0x00P0x00R0x08:0x09

Chn0B0x00P0x00R0x09:0x02

Chn0B0x00P0x00R0x0a:0x0a

Chn0B0x00P0x00R0x0b:0x80

Chn0B0x00P0x00R0x0c:0x10

Chn0B0x00P0x00R0x0d:0x01

Chn0B0x00P0x00R0x0e:0x00

Chn0B0x00P0x00R0x0f:0x00

Chn0B0x00P0x00R0x10:0x04

Chn0B0x00P0x00R0x11:0x05

Chn0B0x00P0x00R0x12:0x06

Chn0B0x00P0x00R0x13:0x08

Chn0B0x00P0x00R0x14:0x0a

Chn0B0x00P0x00R0x15:0x00

Chn0B0x00P0x00R0x16:0x40

Chn0B0x00P0x00R0x17:0x0c

Chn0B0x00P0x00R0x18:0x00

Chn0B0x00P0x00R0x19:0x0d

Chn0B0x00P0x00R0x1a:0x00

Chn0B0x00P0x00R0x1b:0x62

Chn0B0x00P0x00R0x1c:0x32

Chn0B0x00P0x00R0x1d:0x40

Chn0B0x00P0x00R0x1e:0x32

Chn0B0x00P0x00R0x1f:0x02

Chn0B0x00P0x00R0x20:0x06

Chn0B0x00P0x00R0x21:0x2c

Chn0B0x00P0x00R0x22:0x4c

Chn0B0x00P0x00R0x23:0x20

Chn0B0x00P0x00R0x24:0x02

Chn0B0x00P0x00R0x25:0x06

Chn0B0x00P0x00R0x26:0x32

Chn0B0x00P0x00R0x27:0x46

Chn0B0x00P0x00R0x28:0x20

Chn0B0x00P0x00R0x29:0x02

Chn0B0x00P0x00R0x2a:0x06

Chn0B0x00P0x00R0x2b:0x38

Chn0B0x00P0x00R0x2c:0x40

Chn0B0x00P0x00R0x2d:0x20

Chn0B0x00P0x00R0x2e:0x02

Chn0B0x00P0x00R0x2f:0x06

Chn0B0x00P0x00R0x30:0x3e

Chn0B0x00P0x00R0x31:0x37

Chn0B0x00P0x00R0x32:0x20

Chn0B0x00P0x00R0x33:0xff

Chn0B0x00P0x00R0x34:0xe6

Chn0B0x00P0x00R0x35:0xbd

Chn0B0x00P0x00R0x36:0xad

Chn0B0x00P0x00R0x37:0xa8

Chn0B0x00P0x00R0x38:0x03

Chn0B0x00P0x00R0x39:0xff

Chn0B0x00P0x00R0x3a:0xff

Chn0B0x00P0x00R0x3b:0xfc

Chn0B0x00P0x00R0x3c:0xbf

Chn0B0x00P0x00R0x3d:0xdf

Chn0B0x00P0x00R0x3e:0xff

Chn0B0x00P0x00R0x3f:0xff

Chn0B0x00P0x00R0x40:0xf6

Chn0B0x00P0x00R0x41:0x00

Chn0B0x00P0x00R0x42:0x00

Chn0B0x00P0x00R0x43:0x00

Chn0B0x00P0x00R0x44:0x00

Chn0B0x00P0x00R0x45:0x80

Chn0B0x00P0x00R0x46:0x00

Chn0B0x00P0x00R0x47:0x00

Chn0B0x00P0x00R0x48:0x00

Chn0B0x00P0x00R0x49:0x04

Chn0B0x00P0x00R0x4a:0x02

Chn0B0x00P0x00R0x4b:0x19

Chn0B0x00P0x00R0x4c:0x80

Chn0B0x00P0x00R0x4d:0x00

Chn0B0x00P0x00R0x4e:0x1c

Chn0B0x00P0x00R0x4f:0x00

Chn0B0x00P0x00R0x50:0x20

Chn0B0x00P0x00R0x51:0x07

Chn0B0x00P0x00R0x52:0x24

Chn0B0x00P0x00R0x53:0x50

Chn0B0x00P0x00R0x54:0x1c

Chn0B0x00P0x00R0x55:0xa7

Chn0B0x00P0x00R0x56:0x7f

Chn0B0x00P0x00R0x57:0xff

Chn0B0x00P0x00R0x58:0xc0

Chn0B0x00P0x00R0x59:0xc8

Chn0B0x00P0x00R0x5a:0x40

Chn0B0x00P0x00R0x5b:0x88

Chn0B0x00P0x00R0x5c:0xd9

Chn0B0x00P0x00R0x5d:0x80

Chn0B0x00P0x00R0x5e:0x00

Chn0B0x00P0x00R0x5f:0xe0

Chn0B0x00P0x00R0x60:0x0d

Chn0B0x00P0x00R0x61:0x08

Chn0B0x00P0x00R0x62:0x3c

Chn0B0x00P0x00R0x63:0x48

Chn0B0x00P0x00R0x64:0x84

Chn0B0x00P0x00R0x65:0x08

Chn0B0x00P0x00R0x66:0xb2

Chn0B0x00P0x00R0x67:0x00

Chn0B0x00P0x00R0x68:0x24

Chn0B0x00P0x00R0x69:0x09

Chn0B0x00P0x00R0x6a:0x12

Chn0B0x00P0x00R0x6b:0x43

Chn0B0x00P0x00R0x6c:0x00

Chn0B0x00P0x00R0x6d:0x00

Chn0B0x00P0x00R0x6e:0x1a

Chn0B0x00P0x00R0x6f:0x00

Chn0B0x00P0x00R0x70:0x96

Chn0B0x00P0x00R0x71:0x02

Chn0B0x00P0x00R0x72:0x00

Chn0B0x00P0x00R0x73:0x00

Chn0B0x00P0x00R0x74:0x00

Chn0B0x00P0x00R0x75:0x00

Chn0B0x00P0x00R0x76:0x00

Chn0B0x00P0x00R0x77:0x00

Chn0B0x00P0x00R0x78:0x00

Chn0B0x00P0x00R0x79:0x00

Chn0B0x00P0x00R0x7a:0xc0

Chn0B0x00P0x00R0x7b:0x00

Chn0B0x00P0x00R0x7c:0x00

Chn0B0x00P0x00R0x7d:0x10

Chn0B0x00P0x00R0x7e:0x18

Chn0B0x00P0x00R0x7f:0x00

======caught smartpa reg end ======

Q2:

In our design

What register do I need to set?

CHNL_0 (page=0x00 address=0x03) bit7~6:10b

TDM_CFG0 (page=0x00 address=0x08) bit5:0b

TDM_CFG0 (page=0x00 address=0x08) bit4:0b

TDM_CFG0 (page=0x00 address=0x08) bit3~1:100b

TDM_CFG2 (page=0x00 address=0x0A) bit5~4:?

TDM_CFG2 (page=0x00 address=0x0A) bit3~2:?

TDM_CFG2 (page=0x00 address=0x0A) bit1~0:?

TDM_CFG3 (page=0x00 address=0x0C) bit7~4:? // We use i2c, no use TDM

TDM_CFG3 (page=0x00 address=0x0C) bit3~0:? // We use i2c, no use TDM

TDM_CFG12 (page=0x00 address=0x16) bit7:1b

TDM_CFG12 (page=0x00 address=0x16) bit6:1b

TDM_CFG12 (page=0x00 address=0x16) bit5~0:?

CLOCK_CFG (page=0x00 address=0x60) bit5~2:100b  // our hardware, sbclk:3.068Mhz, Fsync:48khz

and other register ...

The project has three amps ic on the same i2c bus.

What specs do I need to provide?

Please reference below schematic

Q3:

In generate bin file tool, I don't find TAS2780.

What type of device do I need to select?

Q4:

echo chn 0xBK 0xPG 0xRG 0xXX > reg

What's chn?  Is it i2c channel?

Our tas2780 is in /sys/bus/i2c/devices/1-0038

Is the chn parameter 1?

thanks