/* register 1 */ #define CS4398_REV_MASK 0x07 #define CS4398_PART_MASK 0xf8 #define CS4398_PART_CS4398 0x70 /* register 2 */ #define CS4398_FM_MASK 0x03 #define CS4398_FM_SINGLE 0x00 #define CS4398_FM_DOUBLE 0x01 #define CS4398_FM_QUAD 0x02 #define CS4398_FM_DSD 0x03 #define CS4398_DEM_MASK 0x0c #define CS4398_DEM_NONE 0x00 #define CS4398_DEM_44100 0x04 #define CS4398_DEM_48000 0x08 #define CS4398_DEM_32000 0x0c #define CS4398_DIF_MASK 0x70 #define CS4398_DIF_LJUST 0x00 #define CS4398_DIF_I2S 0x10 #define CS4398_DIF_RJUST_16 0x20 #define CS4398_DIF_RJUST_24 0x30 #define CS4398_DIF_RJUST_20 0x40 #define CS4398_DIF_RJUST_18 0x50 #define CS4398_DSD_SRC 0x80 /* register 3 */ #define CS4398_ATAPI_MASK 0x1f #define CS4398_ATAPI_B_MUTE 0x00 #define CS4398_ATAPI_B_R 0x01 #define CS4398_ATAPI_B_L 0x02 #define CS4398_ATAPI_B_LR 0x03 #define CS4398_ATAPI_A_MUTE 0x00 #define CS4398_ATAPI_A_R 0x04 #define CS4398_ATAPI_A_L 0x08 #define CS4398_ATAPI_A_LR 0x0c #define CS4398_ATAPI_MIX_LR_VOL 0x10 #define CS4398_INVERT_B 0x20 #define CS4398_INVERT_A 0x40 #define CS4398_VOL_B_EQ_A 0x80 /* register 4 */ #define CS4398_MUTEP_MASK 0x03 #define CS4398_MUTEP_AUTO 0x00 #define CS4398_MUTEP_LOW 0x02 #define CS4398_MUTEP_HIGH 0x03 #define CS4398_MUTE_B 0x08 #define CS4398_MUTE_A 0x10 #define CS4398_MUTEC_A_EQ_B 0x20 #define CS4398_DAMUTE 0x40 #define CS4398_PAMUTE 0x80 /* register 5 */ #define CS4398_VOL_A_MASK 0xff /* register 6 */ #define CS4398_VOL_B_MASK 0xff /* register 7 */ #define CS4398_DIR_DSD 0x01 #define CS4398_FILT_SEL 0x04 #define CS4398_RMP_DN 0x10 #define CS4398_RMP_UP 0x20 #define CS4398_ZERO_CROSS 0x40 #define CS4398_SOFT_RAMP 0x80 /* register 8 */ #define CS4398_MCLKDIV3 0x08 #define CS4398_MCLKDIV2 0x10 #define CS4398_FREEZE 0x20 #define CS4398_CPEN 0x40 #define CS4398_PDN 0x80 /* register 9 */ #define CS4398_DSD_PM_EN 0x01 #define CS4398_DSD_PM_MODE 0x02 #define CS4398_INVALID_DSD 0x04 #define CS4398_STATIC_DSD 0x08 69a447482c0dd0cd4be495e47'>treecommitdiff
path: root/tools/testing
AgeCommit message (Collapse)AuthorFilesLines
2017-02-10bpf: Add test_tag to .gitignoreMickaël Salaün1-0/+1
Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Remove bpf_sys.h from selftestsMickaël Salaün6-34/+3
Add require dependency headers. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_create_map() from the libraryMickaël Salaün6-30/+15
Replace bpf_map_create() with bpf_create_map() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_map_get_next_key() from the libraryMickaël Salaün3-29/+18
Replace bpf_map_next_key() with bpf_map_get_next_key() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_map_delete_elem() from the libraryMickaël Salaün3-24/+14
Replace bpf_map_delete() with bpf_map_delete_elem() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_map_lookup_elem() from the libraryMickaël Salaün4-48/+37
Replace bpf_map_lookup() with bpf_map_lookup_elem() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_map_update_elem() from the libraryMickaël Salaün4-89/+97
Replace bpf_map_update() with bpf_map_update_elem() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Use bpf_load_program() from the libraryMickaël Salaün4-27/+12
Replace bpf_prog_load() with bpf_load_program() calls. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Always test unprivileged programsMickaël Salaün2-6/+64
If selftests are run as root, then execute the unprivileged checks as well. This switch from 243 to 368 tests. The test numbers are suffixed with "/u" when executed as unprivileged or with "/p" when executed as privileged. The geteuid() check is replaced with a capability check. Handling capabilities requires the libcap dependency. Signed-off-by: Mickaël Salaün <mic@digikod.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-10bpf: Change the include directory for selftestMickaël Salaün1-1/+1
Use the tools include directory instead of the installed one to allow builds from other kernels. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-06bpf: enable verifier to add 0 to packet ptrWilliam Tu1-0/+23
The patch fixes the case when adding a zero value to the packet pointer. The zero value could come from src_reg equals type BPF_K or CONST_IMM. The patch fixes both, otherwise the verifer reports the following error: [...] R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12 R4=imm4,min_value=4,max_value=4 R5=pkt(id=0,off=4,r=4) 269: (bf) r2 = r0 // r2 becomes imm0 270: (77) r2 >>= 3 271: (bf) r4 = r1 // r4 becomes pkt ptr 272: (0f) r4 += r2 // r4 += 0 addition of negative constant to packet pointer is not allowed Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Mihai Budiu <mbudiu@vmware.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-06bpf: test for AND edge casesJosef Bacik1-0/+55
These two tests are based on the work done for f23cc643f9ba. The first test is just a basic one to make sure we don't allow AND'ing negative values, even if it would result in a valid index for the array. The second is a cleaned up version of the original testcase provided by Jann Horn that resulted in the commit. Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>