You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ASoC: simple-card: add optional "hp-pin-name" for hp_jack
Signed-off-by: jensen <jensenhuang@friendlyarm.com>
This commit is contained in:
@@ -614,9 +614,14 @@ static int simple_get_dais_count(struct asoc_simple_priv *priv,
|
||||
static int simple_soc_probe(struct snd_soc_card *card)
|
||||
{
|
||||
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
|
||||
char prop[128];
|
||||
const char *hp_pin = NULL;
|
||||
int ret;
|
||||
|
||||
ret = asoc_simple_init_hp(card, &priv->hp_jack, PREFIX);
|
||||
snprintf(prop, sizeof(prop), "%shp-pin-name", PREFIX);
|
||||
of_property_read_string(card->dev->of_node, prop, &hp_pin);
|
||||
|
||||
ret = asoc_simple_init_jack(card, &priv->hp_jack, 1, PREFIX, (char *)hp_pin);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user