Merge branch 'asoc-5.0' into asoc-linus
This commit is contained in:
commit
b5e806ae4a
|
@ -17,7 +17,7 @@ Required properties:
|
|||
Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
Optional properties:
|
||||
- reset-gpio: the reset pin for the chip, for more details consult
|
||||
- reset-gpios: the reset pin for the chip, for more details consult
|
||||
Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
||||
- DVDD-supply: supply voltage for the digital core, please consult
|
||||
|
@ -40,7 +40,7 @@ Examples:
|
|||
AVDD-supply = <®ulator>;
|
||||
DVDD-supply = <®ulator_digital>;
|
||||
|
||||
reset_gpio = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
adau1977_i2c: adau1977@11 {
|
||||
|
@ -50,5 +50,5 @@ Examples:
|
|||
AVDD-supply = <®ulator>;
|
||||
DVDD-supply = <®ulator_digital>;
|
||||
|
||||
reset_gpio = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
|
|
@ -42,7 +42,7 @@ struct pcm186x_priv {
|
|||
bool is_master_mode;
|
||||
};
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 4000, 50);
|
||||
static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 50, 0);
|
||||
|
||||
static const struct snd_kcontrol_new pcm1863_snd_controls[] = {
|
||||
SOC_DOUBLE_R_S_TLV("ADC Capture Volume", PCM186X_PGA_VAL_CH1_L,
|
||||
|
@ -158,7 +158,7 @@ static const struct snd_soc_dapm_widget pcm1863_dapm_widgets[] = {
|
|||
* Put the codec into SLEEP mode when not in use, allowing the
|
||||
* Energysense mechanism to operate.
|
||||
*/
|
||||
SND_SOC_DAPM_ADC("ADC", "HiFi Capture", PCM186X_POWER_CTRL, 1, 0),
|
||||
SND_SOC_DAPM_ADC("ADC", "HiFi Capture", PCM186X_POWER_CTRL, 1, 1),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_widget pcm1865_dapm_widgets[] = {
|
||||
|
@ -184,8 +184,8 @@ static const struct snd_soc_dapm_widget pcm1865_dapm_widgets[] = {
|
|||
* Put the codec into SLEEP mode when not in use, allowing the
|
||||
* Energysense mechanism to operate.
|
||||
*/
|
||||
SND_SOC_DAPM_ADC("ADC1", "HiFi Capture 1", PCM186X_POWER_CTRL, 1, 0),
|
||||
SND_SOC_DAPM_ADC("ADC2", "HiFi Capture 2", PCM186X_POWER_CTRL, 1, 0),
|
||||
SND_SOC_DAPM_ADC("ADC1", "HiFi Capture 1", PCM186X_POWER_CTRL, 1, 1),
|
||||
SND_SOC_DAPM_ADC("ADC2", "HiFi Capture 2", PCM186X_POWER_CTRL, 1, 1),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route pcm1863_dapm_routes[] = {
|
||||
|
|
|
@ -3422,6 +3422,23 @@ static int wm_adsp_buffer_free(struct wm_adsp *dsp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int wm_adsp_buffer_get_error(struct wm_adsp_compr_buf *buf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = wm_adsp_buffer_read(buf, HOST_BUFFER_FIELD(error), &buf->error);
|
||||
if (ret < 0) {
|
||||
adsp_err(buf->dsp, "Failed to check buffer error: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (buf->error != 0) {
|
||||
adsp_err(buf->dsp, "Buffer error occurred: %d\n", buf->error);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd)
|
||||
{
|
||||
struct wm_adsp_compr *compr = stream->runtime->private_data;
|
||||
|
@ -3443,6 +3460,10 @@ int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd)
|
|||
}
|
||||
}
|
||||
|
||||
ret = wm_adsp_buffer_get_error(compr->buf);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
wm_adsp_buffer_clear(compr->buf);
|
||||
|
||||
/* Trigger the IRQ at one fragment of data */
|
||||
|
@ -3518,23 +3539,6 @@ static int wm_adsp_buffer_update_avail(struct wm_adsp_compr_buf *buf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int wm_adsp_buffer_get_error(struct wm_adsp_compr_buf *buf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = wm_adsp_buffer_read(buf, HOST_BUFFER_FIELD(error), &buf->error);
|
||||
if (ret < 0) {
|
||||
adsp_err(buf->dsp, "Failed to check buffer error: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
if (buf->error != 0) {
|
||||
adsp_err(buf->dsp, "Buffer error occurred: %d\n", buf->error);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wm_adsp_compr_handle_irq(struct wm_adsp *dsp)
|
||||
{
|
||||
struct wm_adsp_compr_buf *buf;
|
||||
|
|
|
@ -398,7 +398,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
|||
break;
|
||||
case SND_SOC_DAIFMT_RIGHT_J:
|
||||
/* Data on rising edge of bclk, frame high, right aligned */
|
||||
xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCR_xWA;
|
||||
xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP;
|
||||
xcr |= ESAI_xCR_xWA;
|
||||
break;
|
||||
case SND_SOC_DAIFMT_DSP_A:
|
||||
/* Data on rising edge of bclk, frame high, 1clk before data */
|
||||
|
@ -455,12 +456,12 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR;
|
||||
mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR | ESAI_xCR_xWA;
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, mask, xcr);
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, mask, xcr);
|
||||
|
||||
mask = ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCCR_xFSP |
|
||||
ESAI_xCCR_xFSD | ESAI_xCCR_xCKD | ESAI_xCR_xWA;
|
||||
ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, mask, xccr);
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR, mask, xccr);
|
||||
|
||||
|
|
|
@ -255,6 +255,30 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv)
|
|||
RSND_GEN_M_REG(SSI_MODE, 0xc, 0x80),
|
||||
RSND_GEN_M_REG(SSI_CTRL, 0x10, 0x80),
|
||||
RSND_GEN_M_REG(SSI_INT_ENABLE, 0x18, 0x80),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF0_MODE, 0x48c),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF0_ADINR, 0x484),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF0_DALIGN, 0x488),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF1_MODE, 0x4a0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF1_ADINR, 0x4a4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF1_DALIGN, 0x4a8),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF2_MODE, 0x4c0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF2_ADINR, 0x4c4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF2_DALIGN, 0x4c8),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF3_MODE, 0x4e0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF3_ADINR, 0x4e4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF3_DALIGN, 0x4e8),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF4_MODE, 0xd80),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF4_ADINR, 0xd84),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF4_DALIGN, 0xd88),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF5_MODE, 0xda0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF5_ADINR, 0xda4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF5_DALIGN, 0xda8),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF6_MODE, 0xdc0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF6_ADINR, 0xdc4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF6_DALIGN, 0xdc8),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF7_MODE, 0xde0),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF7_ADINR, 0xde4),
|
||||
RSND_GEN_S_REG(SSI9_BUSIF7_DALIGN, 0xde8),
|
||||
};
|
||||
|
||||
static const struct rsnd_regmap_field_conf conf_scu[] = {
|
||||
|
|
|
@ -191,6 +191,30 @@ enum rsnd_reg {
|
|||
SSI_SYS_STATUS7,
|
||||
HDMI0_SEL,
|
||||
HDMI1_SEL,
|
||||
SSI9_BUSIF0_MODE,
|
||||
SSI9_BUSIF1_MODE,
|
||||
SSI9_BUSIF2_MODE,
|
||||
SSI9_BUSIF3_MODE,
|
||||
SSI9_BUSIF4_MODE,
|
||||
SSI9_BUSIF5_MODE,
|
||||
SSI9_BUSIF6_MODE,
|
||||
SSI9_BUSIF7_MODE,
|
||||
SSI9_BUSIF0_ADINR,
|
||||
SSI9_BUSIF1_ADINR,
|
||||
SSI9_BUSIF2_ADINR,
|
||||
SSI9_BUSIF3_ADINR,
|
||||
SSI9_BUSIF4_ADINR,
|
||||
SSI9_BUSIF5_ADINR,
|
||||
SSI9_BUSIF6_ADINR,
|
||||
SSI9_BUSIF7_ADINR,
|
||||
SSI9_BUSIF0_DALIGN,
|
||||
SSI9_BUSIF1_DALIGN,
|
||||
SSI9_BUSIF2_DALIGN,
|
||||
SSI9_BUSIF3_DALIGN,
|
||||
SSI9_BUSIF4_DALIGN,
|
||||
SSI9_BUSIF5_DALIGN,
|
||||
SSI9_BUSIF6_DALIGN,
|
||||
SSI9_BUSIF7_DALIGN,
|
||||
|
||||
/* SSI */
|
||||
SSICR,
|
||||
|
@ -209,6 +233,9 @@ enum rsnd_reg {
|
|||
#define SSI_BUSIF_MODE(i) (SSI_BUSIF0_MODE + (i))
|
||||
#define SSI_BUSIF_ADINR(i) (SSI_BUSIF0_ADINR + (i))
|
||||
#define SSI_BUSIF_DALIGN(i) (SSI_BUSIF0_DALIGN + (i))
|
||||
#define SSI9_BUSIF_MODE(i) (SSI9_BUSIF0_MODE + (i))
|
||||
#define SSI9_BUSIF_ADINR(i) (SSI9_BUSIF0_ADINR + (i))
|
||||
#define SSI9_BUSIF_DALIGN(i) (SSI9_BUSIF0_DALIGN + (i))
|
||||
#define SSI_SYS_STATUS(i) (SSI_SYS_STATUS0 + (i))
|
||||
|
||||
|
||||
|
|
|
@ -181,28 +181,26 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
|
|||
if (rsnd_ssi_use_busif(io)) {
|
||||
int id = rsnd_mod_id(mod);
|
||||
int busif = rsnd_mod_id_sub(mod);
|
||||
enum rsnd_reg adinr_reg, mode_reg, dalign_reg;
|
||||
|
||||
/*
|
||||
* FIXME
|
||||
*
|
||||
* We can't support SSI9-4/5/6/7, because its address is
|
||||
* out of calculation rule
|
||||
*/
|
||||
if ((id == 9) && (busif >= 4)) {
|
||||
struct device *dev = rsnd_priv_to_dev(priv);
|
||||
|
||||
dev_err(dev, "This driver doesn't support SSI%d-%d, so far",
|
||||
id, busif);
|
||||
adinr_reg = SSI9_BUSIF_ADINR(busif);
|
||||
mode_reg = SSI9_BUSIF_MODE(busif);
|
||||
dalign_reg = SSI9_BUSIF_DALIGN(busif);
|
||||
} else {
|
||||
adinr_reg = SSI_BUSIF_ADINR(busif);
|
||||
mode_reg = SSI_BUSIF_MODE(busif);
|
||||
dalign_reg = SSI_BUSIF_DALIGN(busif);
|
||||
}
|
||||
|
||||
rsnd_mod_write(mod, SSI_BUSIF_ADINR(busif),
|
||||
rsnd_mod_write(mod, adinr_reg,
|
||||
rsnd_get_adinr_bit(mod, io) |
|
||||
(rsnd_io_is_play(io) ?
|
||||
rsnd_runtime_channel_after_ctu(io) :
|
||||
rsnd_runtime_channel_original(io)));
|
||||
rsnd_mod_write(mod, SSI_BUSIF_MODE(busif),
|
||||
rsnd_mod_write(mod, mode_reg,
|
||||
rsnd_get_busif_shift(io, mod) | 1);
|
||||
rsnd_mod_write(mod, SSI_BUSIF_DALIGN(busif),
|
||||
rsnd_mod_write(mod, dalign_reg,
|
||||
rsnd_get_dalign(mod, io));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue