Skip to content

Commit c9ca8a4

Browse files
committed
Merge tag 'asoc-fix-v6.14-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.14 A few fixes I and James Calligero picked out of the Asahi tree.
2 parents 9af3b4f + f5468be commit c9ca8a4

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

sound/soc/codecs/tas2764.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
365365
{
366366
struct snd_soc_component *component = dai->component;
367367
struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
368-
u8 tdm_rx_start_slot = 0, asi_cfg_0 = 0, asi_cfg_1 = 0;
368+
u8 tdm_rx_start_slot = 0, asi_cfg_0 = 0, asi_cfg_1 = 0, asi_cfg_4 = 0;
369369
int ret;
370370

371371
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
@@ -374,12 +374,14 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
374374
fallthrough;
375375
case SND_SOC_DAIFMT_NB_NF:
376376
asi_cfg_1 = TAS2764_TDM_CFG1_RX_RISING;
377+
asi_cfg_4 = TAS2764_TDM_CFG4_TX_FALLING;
377378
break;
378379
case SND_SOC_DAIFMT_IB_IF:
379380
asi_cfg_0 ^= TAS2764_TDM_CFG0_FRAME_START;
380381
fallthrough;
381382
case SND_SOC_DAIFMT_IB_NF:
382383
asi_cfg_1 = TAS2764_TDM_CFG1_RX_FALLING;
384+
asi_cfg_4 = TAS2764_TDM_CFG4_TX_RISING;
383385
break;
384386
}
385387

@@ -389,6 +391,12 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
389391
if (ret < 0)
390392
return ret;
391393

394+
ret = snd_soc_component_update_bits(component, TAS2764_TDM_CFG4,
395+
TAS2764_TDM_CFG4_TX_MASK,
396+
asi_cfg_4);
397+
if (ret < 0)
398+
return ret;
399+
392400
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
393401
case SND_SOC_DAIFMT_I2S:
394402
asi_cfg_0 ^= TAS2764_TDM_CFG0_FRAME_START;

sound/soc/codecs/tas2764.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/* Power Control */
2727
#define TAS2764_PWR_CTRL TAS2764_REG(0X0, 0x02)
28-
#define TAS2764_PWR_CTRL_MASK GENMASK(1, 0)
28+
#define TAS2764_PWR_CTRL_MASK GENMASK(2, 0)
2929
#define TAS2764_PWR_CTRL_ACTIVE 0x0
3030
#define TAS2764_PWR_CTRL_MUTE BIT(0)
3131
#define TAS2764_PWR_CTRL_SHUTDOWN BIT(1)
@@ -79,6 +79,12 @@
7979
#define TAS2764_TDM_CFG3_RXS_SHIFT 0x4
8080
#define TAS2764_TDM_CFG3_MASK GENMASK(3, 0)
8181

82+
/* TDM Configuration Reg4 */
83+
#define TAS2764_TDM_CFG4 TAS2764_REG(0X0, 0x0d)
84+
#define TAS2764_TDM_CFG4_TX_MASK BIT(0)
85+
#define TAS2764_TDM_CFG4_TX_RISING 0x0
86+
#define TAS2764_TDM_CFG4_TX_FALLING BIT(0)
87+
8288
/* TDM Configuration Reg5 */
8389
#define TAS2764_TDM_CFG5 TAS2764_REG(0X0, 0x0e)
8490
#define TAS2764_TDM_CFG5_VSNS_MASK BIT(6)

sound/soc/codecs/tas2770.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
506506
}
507507

508508
static DECLARE_TLV_DB_SCALE(tas2770_digital_tlv, 1100, 50, 0);
509-
static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -12750, 50, 0);
509+
static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -10050, 50, 0);
510510

511511
static const struct snd_kcontrol_new tas2770_snd_controls[] = {
512512
SOC_SINGLE_TLV("Speaker Playback Volume", TAS2770_PLAY_CFG_REG2,

0 commit comments

Comments
 (0)