diff options
Diffstat (limited to 'sound/soc/rockchip/rockchip_i2s.c')
| -rw-r--r-- | sound/soc/rockchip/rockchip_i2s.c | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 908211e1d6fc..950823d69e9c 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -328,6 +328,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,  		val |= I2S_CHN_4;  		break;  	case 2: +	case 1:  		val |= I2S_CHN_2;  		break;  	default: @@ -460,7 +461,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {  	},  	.capture = {  		.stream_name = "Capture", -		.channels_min = 2, +		.channels_min = 1,  		.channels_max = 2,  		.rates = SNDRV_PCM_RATE_8000_192000,  		.formats = (SNDRV_PCM_FMTBIT_S8 | @@ -504,6 +505,7 @@ static bool rockchip_i2s_rd_reg(struct device *dev, unsigned int reg)  	case I2S_INTCR:  	case I2S_XFER:  	case I2S_CLR: +	case I2S_TXDR:  	case I2S_RXDR:  	case I2S_FIFOLR:  	case I2S_INTSR: @@ -518,6 +520,9 @@ static bool rockchip_i2s_volatile_reg(struct device *dev, unsigned int reg)  	switch (reg) {  	case I2S_INTSR:  	case I2S_CLR: +	case I2S_FIFOLR: +	case I2S_TXDR: +	case I2S_RXDR:  		return true;  	default:  		return false; @@ -527,6 +532,8 @@ static bool rockchip_i2s_volatile_reg(struct device *dev, unsigned int reg)  static bool rockchip_i2s_precious_reg(struct device *dev, unsigned int reg)  {  	switch (reg) { +	case I2S_RXDR: +		return true;  	default:  		return false;  	} @@ -654,7 +661,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)  	}  	if (!of_property_read_u32(node, "rockchip,capture-channels", &val)) { -		if (val >= 2 && val <= 8) +		if (val >= 1 && val <= 8)  			soc_dai->capture.channels_max = val;  	} |