(self, device:str="")
| 147 | |
| 148 | class DSPDevice(Compiled): |
| 149 | def __init__(self, device:str=""): |
| 150 | if getenv("MOCKDSP"): super().__init__(device, DSPAllocator(self), [MockDSPRenderer], MockDSPProgram) |
| 151 | else: |
| 152 | self.ion_fd = os.open('/dev/ion', os.O_RDONLY) |
| 153 | super().__init__(device, DSPAllocator(self), [DSPRenderer], functools.partial(DSPProgram, self)) |
| 154 | fastrpc_shell = memoryview(bytearray(pathlib.Path('/dsp/cdsp/fastrpc_shell_3').read_bytes())) |
| 155 | self.shell_buf = self.allocator.alloc(round_up(fastrpc_shell.nbytes, 0x1000), BufferSpec(nolru=True)) |
| 156 | ctypes.memmove(self.shell_buf.va_addr, mv_address(fastrpc_shell), fastrpc_shell.nbytes) |
| 157 | |
| 158 | self.init_dsp() |
| 159 | RPCListener(self).start() |
| 160 | |
| 161 | def open_lib(self, lib): |
| 162 | self.binded_lib, self.binded_lib_off = lib, 0 |
nothing calls this directly
no test coverage detected