diff options
Diffstat (limited to 'drivers/soundwire/stream.c')
-rw-r--r-- | drivers/soundwire/stream.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index b970cb31f3131..fbdaf624cb1b9 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -131,17 +131,12 @@ static int sdw_program_slave_port_params(struct sdw_bus *bus, int ret; u8 wbuf; -pr_err("DEBUG: %s: %d \n", __func__, __LINE__); dpn_prop = sdw_get_slave_dpn_prop(s_rt->slave, s_rt->direction, t_params->port_num); - if (!dpn_prop) { - - pr_err("DEBUG: %s: %d INVAL \n", __func__, __LINE__); + if (!dpn_prop) return -EINVAL; - } -pr_err("DEBUG: %s: %d \n", __func__, __LINE__); addr1 = SDW_DPN_PORTCTRL(t_params->port_num); addr2 = SDW_DPN_BLOCKCTRL1(t_params->port_num); @@ -161,7 +156,7 @@ pr_err("DEBUG: %s: %d \n", __func__, __LINE__); /* Program DPN_PortCtrl register */ wbuf = p_params->data_mode << SDW_REG_SHIFT(SDW_DPN_PORTCTRL_DATAMODE); wbuf |= p_params->flow_mode; - +#if 0 ret = sdw_update(s_rt->slave, addr1, 0xF, wbuf); if (ret < 0) { dev_err(&s_rt->slave->dev, @@ -178,7 +173,7 @@ pr_err("DEBUG: %s: %d \n", __func__, __LINE__); t_params->port_num); return ret; } - +#endif /* Program DPN_SampleCtrl1 register */ wbuf = (t_params->sample_interval - 1) & SDW_DPN_SAMPLECTRL_LOW; ret = sdw_write(s_rt->slave, addr3, wbuf); @@ -324,6 +319,9 @@ static int sdw_enable_disable_slave_ports(struct sdw_bus *bus, "Slave chn_en reg write failed:%d port:%d", ret, t_params->port_num); + pr_err("DEBUG: %s: port %d channelen status %x vs ch_mask %x \n", + __func__, p_rt->num, sdw_read(s_rt->slave, addr), p_rt->ch_mask); + return ret; } @@ -389,6 +387,8 @@ static int sdw_enable_disable_ports(struct sdw_master_runtime *m_rt, bool en) return ret; } + + return 0; } @@ -1189,7 +1189,6 @@ static struct sdw_port_runtime *sdw_port_alloc(struct device *dev, p_rt->ch_mask = port_config[port_index].ch_mask; p_rt->num = port_config[port_index].num; - pr_err("DEBUG: %s: %d: port number %d port index %d\n", __func__, __LINE__, p_rt->num, port_index); p_rt->ch_rate = port_config[port_index].ch_rate; return p_rt; @@ -1202,7 +1201,6 @@ static int sdw_master_port_config(struct sdw_bus *bus, { struct sdw_port_runtime *p_rt; int i; - pr_err("DEBUG: %s: %d: port numbers %d \n", __func__, __LINE__, num_ports); /* Iterate for number of ports to perform initialization */ for (i = 0; i < num_ports; i++) { @@ -1419,7 +1417,6 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave, } for (i = 0; i < num_ports; i++) { - pr_err("DEBUG: %s: %d %d vs %d\n", __func__, __LINE__, dpn_prop[i].num, port_num); if (dpn_prop[i].num == port_num) return &dpn_prop[i]; } |