Loading Documentation/devicetree/bindings/sound/st,stm32-sai.txt +7 −5 Original line number Diff line number Diff line Loading @@ -20,11 +20,6 @@ Required properties: Optional properties: - resets: Reference to a reset controller asserting the SAI - st,sync: specify synchronization mode. By default SAI sub-block is in asynchronous mode. This property sets SAI sub-block as slave of another SAI sub-block. Must contain the phandle and index of the sai sub-block providing the synchronization. SAI subnodes: Two subnodes corresponding to SAI sub-block instances A et B can be defined. Loading @@ -44,6 +39,13 @@ SAI subnodes required properties: - pinctrl-names: should contain only value "default" - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt SAI subnodes Optional properties: - st,sync: specify synchronization mode. By default SAI sub-block is in asynchronous mode. This property sets SAI sub-block as slave of another SAI sub-block. Must contain the phandle and index of the sai sub-block providing the synchronization. The device node should contain one 'port' child node with one child 'endpoint' node, according to the bindings defined in Documentation/devicetree/bindings/ graph.txt. Loading Documentation/devicetree/bindings/sound/sun4i-i2s.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Required properties: - compatible: should be one of the following: - "allwinner,sun4i-a10-i2s" - "allwinner,sun6i-a31-i2s" - "allwinner,sun8i-a83t-i2s" - "allwinner,sun8i-h3-i2s" - reg: physical base address of the controller and length of memory mapped region. Loading @@ -23,6 +24,7 @@ Required properties: Required properties for the following compatibles: - "allwinner,sun6i-a31-i2s" - "allwinner,sun8i-a83t-i2s" - "allwinner,sun8i-h3-i2s" - resets: phandle to the reset line for this codec Loading Documentation/devicetree/bindings/sound/tas5720.txt +3 −1 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ audio playback. For more product information please see the links below: http://www.ti.com/product/TAS5720L http://www.ti.com/product/TAS5720M http://www.ti.com/product/TAS5722L Required properties: - compatible : "ti,tas5720" - compatible : "ti,tas5720", "ti,tas5722" - reg : I2C slave address - dvdd-supply : phandle to a 3.3-V supply for the digital circuitry - pvdd-supply : phandle to a supply used for the Class-D amp and the analog Loading include/sound/soc-dai.h +0 −3 Original line number Diff line number Diff line Loading @@ -296,9 +296,6 @@ struct snd_soc_dai { /* DAI runtime info */ unsigned int capture_active:1; /* stream is in use */ unsigned int playback_active:1; /* stream is in use */ unsigned int symmetric_rates:1; unsigned int symmetric_channels:1; unsigned int symmetric_samplebits:1; unsigned int probed:1; unsigned int active; Loading sound/soc/codecs/tas5720.c +53 −8 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ /* Define how often to check (and clear) the fault status register (in ms) */ #define TAS5720_FAULT_CHECK_INTERVAL 200 enum tas572x_type { TAS5720, TAS5722, }; static const char * const tas5720_supply_names[] = { "dvdd", /* Digital power supply. Connect to 3.3-V supply. */ "pvdd", /* Class-D amp and analog power supply (connected). */ Loading @@ -47,6 +52,7 @@ struct tas5720_data { struct snd_soc_codec *codec; struct regmap *regmap; struct i2c_client *tas5720_client; enum tas572x_type devtype; struct regulator_bulk_data supplies[TAS5720_NUM_SUPPLIES]; struct delayed_work fault_check_work; unsigned int last_fault; Loading Loading @@ -264,7 +270,7 @@ static void tas5720_fault_check_work(struct work_struct *work) static int tas5720_codec_probe(struct snd_soc_codec *codec) { struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec); unsigned int device_id; unsigned int device_id, expected_device_id; int ret; tas5720->codec = codec; Loading @@ -276,6 +282,11 @@ static int tas5720_codec_probe(struct snd_soc_codec *codec) return ret; } /* * Take a liberal approach to checking the device ID to allow the * driver to be used even if the device ID does not match, however * issue a warning if there is a mismatch. */ ret = regmap_read(tas5720->regmap, TAS5720_DEVICE_ID_REG, &device_id); if (ret < 0) { dev_err(codec->dev, "failed to read device ID register: %d\n", Loading @@ -283,13 +294,22 @@ static int tas5720_codec_probe(struct snd_soc_codec *codec) goto probe_fail; } if (device_id != TAS5720_DEVICE_ID) { dev_err(codec->dev, "wrong device ID. expected: %u read: %u\n", TAS5720_DEVICE_ID, device_id); ret = -ENODEV; goto probe_fail; switch (tas5720->devtype) { case TAS5720: expected_device_id = TAS5720_DEVICE_ID; break; case TAS5722: expected_device_id = TAS5722_DEVICE_ID; break; default: dev_err(codec->dev, "unexpected private driver data\n"); return -EINVAL; } if (device_id != expected_device_id) dev_warn(codec->dev, "wrong device ID. expected: %u read: %u\n", expected_device_id, device_id); /* Set device to mute */ ret = snd_soc_update_bits(codec, TAS5720_DIGITAL_CTRL2_REG, TAS5720_MUTE, TAS5720_MUTE); Loading Loading @@ -446,6 +466,15 @@ static const struct regmap_config tas5720_regmap_config = { .volatile_reg = tas5720_is_volatile_reg, }; static const struct regmap_config tas5722_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = TAS5722_MAX_REG, .cache_type = REGCACHE_RBTREE, .volatile_reg = tas5720_is_volatile_reg, }; /* * DAC analog gain. There are four discrete values to select from, ranging * from 19.2 dB to 26.3dB. Loading Loading @@ -544,6 +573,7 @@ static int tas5720_probe(struct i2c_client *client, { struct device *dev = &client->dev; struct tas5720_data *data; const struct regmap_config *regmap_config; int ret; int i; Loading @@ -552,7 +582,20 @@ static int tas5720_probe(struct i2c_client *client, return -ENOMEM; data->tas5720_client = client; data->regmap = devm_regmap_init_i2c(client, &tas5720_regmap_config); data->devtype = id->driver_data; switch (id->driver_data) { case TAS5720: regmap_config = &tas5720_regmap_config; break; case TAS5722: regmap_config = &tas5722_regmap_config; break; default: dev_err(dev, "unexpected private driver data\n"); return -EINVAL; } data->regmap = devm_regmap_init_i2c(client, regmap_config); if (IS_ERR(data->regmap)) { ret = PTR_ERR(data->regmap); dev_err(dev, "failed to allocate register map: %d\n", ret); Loading Loading @@ -592,7 +635,8 @@ static int tas5720_remove(struct i2c_client *client) } static const struct i2c_device_id tas5720_id[] = { { "tas5720", 0 }, { "tas5720", TAS5720 }, { "tas5722", TAS5722 }, { } }; MODULE_DEVICE_TABLE(i2c, tas5720_id); Loading @@ -600,6 +644,7 @@ MODULE_DEVICE_TABLE(i2c, tas5720_id); #if IS_ENABLED(CONFIG_OF) static const struct of_device_id tas5720_of_match[] = { { .compatible = "ti,tas5720", }, { .compatible = "ti,tas5722", }, { }, }; MODULE_DEVICE_TABLE(of, tas5720_of_match); Loading Loading
Documentation/devicetree/bindings/sound/st,stm32-sai.txt +7 −5 Original line number Diff line number Diff line Loading @@ -20,11 +20,6 @@ Required properties: Optional properties: - resets: Reference to a reset controller asserting the SAI - st,sync: specify synchronization mode. By default SAI sub-block is in asynchronous mode. This property sets SAI sub-block as slave of another SAI sub-block. Must contain the phandle and index of the sai sub-block providing the synchronization. SAI subnodes: Two subnodes corresponding to SAI sub-block instances A et B can be defined. Loading @@ -44,6 +39,13 @@ SAI subnodes required properties: - pinctrl-names: should contain only value "default" - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt SAI subnodes Optional properties: - st,sync: specify synchronization mode. By default SAI sub-block is in asynchronous mode. This property sets SAI sub-block as slave of another SAI sub-block. Must contain the phandle and index of the sai sub-block providing the synchronization. The device node should contain one 'port' child node with one child 'endpoint' node, according to the bindings defined in Documentation/devicetree/bindings/ graph.txt. Loading
Documentation/devicetree/bindings/sound/sun4i-i2s.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Required properties: - compatible: should be one of the following: - "allwinner,sun4i-a10-i2s" - "allwinner,sun6i-a31-i2s" - "allwinner,sun8i-a83t-i2s" - "allwinner,sun8i-h3-i2s" - reg: physical base address of the controller and length of memory mapped region. Loading @@ -23,6 +24,7 @@ Required properties: Required properties for the following compatibles: - "allwinner,sun6i-a31-i2s" - "allwinner,sun8i-a83t-i2s" - "allwinner,sun8i-h3-i2s" - resets: phandle to the reset line for this codec Loading
Documentation/devicetree/bindings/sound/tas5720.txt +3 −1 Original line number Diff line number Diff line Loading @@ -6,10 +6,12 @@ audio playback. For more product information please see the links below: http://www.ti.com/product/TAS5720L http://www.ti.com/product/TAS5720M http://www.ti.com/product/TAS5722L Required properties: - compatible : "ti,tas5720" - compatible : "ti,tas5720", "ti,tas5722" - reg : I2C slave address - dvdd-supply : phandle to a 3.3-V supply for the digital circuitry - pvdd-supply : phandle to a supply used for the Class-D amp and the analog Loading
include/sound/soc-dai.h +0 −3 Original line number Diff line number Diff line Loading @@ -296,9 +296,6 @@ struct snd_soc_dai { /* DAI runtime info */ unsigned int capture_active:1; /* stream is in use */ unsigned int playback_active:1; /* stream is in use */ unsigned int symmetric_rates:1; unsigned int symmetric_channels:1; unsigned int symmetric_samplebits:1; unsigned int probed:1; unsigned int active; Loading
sound/soc/codecs/tas5720.c +53 −8 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ /* Define how often to check (and clear) the fault status register (in ms) */ #define TAS5720_FAULT_CHECK_INTERVAL 200 enum tas572x_type { TAS5720, TAS5722, }; static const char * const tas5720_supply_names[] = { "dvdd", /* Digital power supply. Connect to 3.3-V supply. */ "pvdd", /* Class-D amp and analog power supply (connected). */ Loading @@ -47,6 +52,7 @@ struct tas5720_data { struct snd_soc_codec *codec; struct regmap *regmap; struct i2c_client *tas5720_client; enum tas572x_type devtype; struct regulator_bulk_data supplies[TAS5720_NUM_SUPPLIES]; struct delayed_work fault_check_work; unsigned int last_fault; Loading Loading @@ -264,7 +270,7 @@ static void tas5720_fault_check_work(struct work_struct *work) static int tas5720_codec_probe(struct snd_soc_codec *codec) { struct tas5720_data *tas5720 = snd_soc_codec_get_drvdata(codec); unsigned int device_id; unsigned int device_id, expected_device_id; int ret; tas5720->codec = codec; Loading @@ -276,6 +282,11 @@ static int tas5720_codec_probe(struct snd_soc_codec *codec) return ret; } /* * Take a liberal approach to checking the device ID to allow the * driver to be used even if the device ID does not match, however * issue a warning if there is a mismatch. */ ret = regmap_read(tas5720->regmap, TAS5720_DEVICE_ID_REG, &device_id); if (ret < 0) { dev_err(codec->dev, "failed to read device ID register: %d\n", Loading @@ -283,13 +294,22 @@ static int tas5720_codec_probe(struct snd_soc_codec *codec) goto probe_fail; } if (device_id != TAS5720_DEVICE_ID) { dev_err(codec->dev, "wrong device ID. expected: %u read: %u\n", TAS5720_DEVICE_ID, device_id); ret = -ENODEV; goto probe_fail; switch (tas5720->devtype) { case TAS5720: expected_device_id = TAS5720_DEVICE_ID; break; case TAS5722: expected_device_id = TAS5722_DEVICE_ID; break; default: dev_err(codec->dev, "unexpected private driver data\n"); return -EINVAL; } if (device_id != expected_device_id) dev_warn(codec->dev, "wrong device ID. expected: %u read: %u\n", expected_device_id, device_id); /* Set device to mute */ ret = snd_soc_update_bits(codec, TAS5720_DIGITAL_CTRL2_REG, TAS5720_MUTE, TAS5720_MUTE); Loading Loading @@ -446,6 +466,15 @@ static const struct regmap_config tas5720_regmap_config = { .volatile_reg = tas5720_is_volatile_reg, }; static const struct regmap_config tas5722_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = TAS5722_MAX_REG, .cache_type = REGCACHE_RBTREE, .volatile_reg = tas5720_is_volatile_reg, }; /* * DAC analog gain. There are four discrete values to select from, ranging * from 19.2 dB to 26.3dB. Loading Loading @@ -544,6 +573,7 @@ static int tas5720_probe(struct i2c_client *client, { struct device *dev = &client->dev; struct tas5720_data *data; const struct regmap_config *regmap_config; int ret; int i; Loading @@ -552,7 +582,20 @@ static int tas5720_probe(struct i2c_client *client, return -ENOMEM; data->tas5720_client = client; data->regmap = devm_regmap_init_i2c(client, &tas5720_regmap_config); data->devtype = id->driver_data; switch (id->driver_data) { case TAS5720: regmap_config = &tas5720_regmap_config; break; case TAS5722: regmap_config = &tas5722_regmap_config; break; default: dev_err(dev, "unexpected private driver data\n"); return -EINVAL; } data->regmap = devm_regmap_init_i2c(client, regmap_config); if (IS_ERR(data->regmap)) { ret = PTR_ERR(data->regmap); dev_err(dev, "failed to allocate register map: %d\n", ret); Loading Loading @@ -592,7 +635,8 @@ static int tas5720_remove(struct i2c_client *client) } static const struct i2c_device_id tas5720_id[] = { { "tas5720", 0 }, { "tas5720", TAS5720 }, { "tas5722", TAS5722 }, { } }; MODULE_DEVICE_TABLE(i2c, tas5720_id); Loading @@ -600,6 +644,7 @@ MODULE_DEVICE_TABLE(i2c, tas5720_id); #if IS_ENABLED(CONFIG_OF) static const struct of_device_id tas5720_of_match[] = { { .compatible = "ti,tas5720", }, { .compatible = "ti,tas5722", }, { }, }; MODULE_DEVICE_TABLE(of, tas5720_of_match); Loading