Closed bardliao closed 5 months ago
@plbossart The issue is that bus->params.curr_dr_freq will be assigned in sdw_compute_bus_params(). But we call sdw_slave_set_frequency() only when a peripheral is attached. And we set scale based on mclk and curr_dr_freq in sdw_slave_set_frequency(). The bus->params.curr_dr_freq is set to bus->params.max_dr_freq in sdw_bus_master_add(), and will be calculated in sdw_compute_bus_params() based on required bandwidth. It means peripherals may use a scale based on a wrong curr_dr_freq value.
Close it as we will use single clock rate for now.
Currently, we set only peripheral frequency when the peripheral is initialized. However, curr_dr_freq may change after a stream is prepared. set peripheral frequency before sdw_program_slave_port_params() to ensure peripheral frequency is correct when a stream starts.