Skip to content

Commit abc026f

Browse files
committed
Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/hdmi', 'asoc/topic/maintainers' and 'asoc/topic/max8960' into asoc-next
5 parents dd0111d + d93c506 + efc9194 + 181ad2a + 716540f commit abc026f

File tree

9 files changed

+976
-13
lines changed

9 files changed

+976
-13
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
MAX9860 Mono Audio Voice Codec
2+
3+
Required properties:
4+
5+
- compatible : "maxim,max9860"
6+
7+
- reg : the I2C address of the device
8+
9+
- AVDD-supply, DVDD-supply and DVDDIO-supply : power supplies for
10+
the device, as covered in bindings/regulator/regulator.txt
11+
12+
- clock-names : Required element: "mclk".
13+
14+
- clocks : A clock specifier for the clock connected as MCLK.
15+
16+
Examples:
17+
18+
max9860: max9860@10 {
19+
compatible = "maxim,max9860";
20+
reg = <0x10>;
21+
22+
AVDD-supply = <&reg_1v8>;
23+
DVDD-supply = <&reg_1v8>;
24+
DVDDIO-supply = <&reg_3v0>;
25+
26+
clock-names = "mclk";
27+
clocks = <&pck2>;
28+
};

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7270,6 +7270,13 @@ F: Documentation/devicetree/bindings/i2c/max6697.txt
72707270
F: drivers/hwmon/max6697.c
72717271
F: include/linux/platform_data/max6697.h
72727272

7273+
MAX9860 MONO AUDIO VOICE CODEC DRIVER
7274+
M: Peter Rosin <[email protected]>
7275+
L: [email protected] (moderated for non-subscribers)
7276+
S: Maintained
7277+
F: Documentation/devicetree/bindings/sound/max9860.txt
7278+
F: sound/soc/codecs/max9860.*
7279+
72737280
MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
72747281
M: Krzysztof Kozlowski <[email protected]>
72757282
@@ -10724,6 +10731,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
1072410731
L: [email protected] (moderated for non-subscribers)
1072510732
W: http://alsa-project.org/main/index.php/ASoC
1072610733
S: Supported
10734+
F: Documentation/devicetree/bindings/sound/
1072710735
F: Documentation/sound/alsa/soc/
1072810736
F: sound/soc/
1072910737
F: include/sound/soc*

include/sound/hdmi-codec.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,40 @@ struct hdmi_codec_params {
5353
int channels;
5454
};
5555

56+
struct hdmi_codec_pdata;
5657
struct hdmi_codec_ops {
5758
/*
5859
* Called when ASoC starts an audio stream setup.
5960
* Optional
6061
*/
61-
int (*audio_startup)(struct device *dev);
62+
int (*audio_startup)(struct device *dev, void *data);
6263

6364
/*
6465
* Configures HDMI-encoder for audio stream.
6566
* Mandatory
6667
*/
67-
int (*hw_params)(struct device *dev,
68+
int (*hw_params)(struct device *dev, void *data,
6869
struct hdmi_codec_daifmt *fmt,
6970
struct hdmi_codec_params *hparms);
7071

7172
/*
7273
* Shuts down the audio stream.
7374
* Mandatory
7475
*/
75-
void (*audio_shutdown)(struct device *dev);
76+
void (*audio_shutdown)(struct device *dev, void *data);
7677

7778
/*
7879
* Mute/unmute HDMI audio stream.
7980
* Optional
8081
*/
81-
int (*digital_mute)(struct device *dev, bool enable);
82+
int (*digital_mute)(struct device *dev, void *data, bool enable);
8283

8384
/*
8485
* Provides EDID-Like-Data from connected HDMI device.
8586
* Optional
8687
*/
87-
int (*get_eld)(struct device *dev, uint8_t *buf, size_t len);
88+
int (*get_eld)(struct device *dev, void *data,
89+
uint8_t *buf, size_t len);
8890
};
8991

9092
/* HDMI codec initalization data */
@@ -93,6 +95,7 @@ struct hdmi_codec_pdata {
9395
uint i2s:1;
9496
uint spdif:1;
9597
int max_i2s_channels;
98+
void *data;
9699
};
97100

98101
#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec"

sound/soc/codecs/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ config SND_SOC_ALL_CODECS
8787
select SND_SOC_MAX98925 if I2C
8888
select SND_SOC_MAX98926 if I2C
8989
select SND_SOC_MAX9850 if I2C
90+
select SND_SOC_MAX9860 if I2C
9091
select SND_SOC_MAX9768 if I2C
9192
select SND_SOC_MAX9877 if I2C
9293
select SND_SOC_MC13783 if MFD_MC13XXX
@@ -568,6 +569,11 @@ config SND_SOC_MAX98926
568569
config SND_SOC_MAX9850
569570
tristate
570571

572+
config SND_SOC_MAX9860
573+
tristate "Maxim MAX9860 Mono Audio Voice Codec"
574+
depends on I2C
575+
select REGMAP_I2C
576+
571577
config SND_SOC_PCM1681
572578
tristate "Texas Instruments PCM1681 CODEC"
573579
depends on I2C

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ snd-soc-max9867-objs := max9867.o
8383
snd-soc-max98925-objs := max98925.o
8484
snd-soc-max98926-objs := max98926.o
8585
snd-soc-max9850-objs := max9850.o
86+
snd-soc-max9860-objs := max9860.o
8687
snd-soc-mc13783-objs := mc13783.o
8788
snd-soc-ml26124-objs := ml26124.o
8889
snd-soc-nau8825-objs := nau8825.o
@@ -301,6 +302,7 @@ obj-$(CONFIG_SND_SOC_MAX9867) += snd-soc-max9867.o
301302
obj-$(CONFIG_SND_SOC_MAX98925) += snd-soc-max98925.o
302303
obj-$(CONFIG_SND_SOC_MAX98926) += snd-soc-max98926.o
303304
obj-$(CONFIG_SND_SOC_MAX9850) += snd-soc-max9850.o
305+
obj-$(CONFIG_SND_SOC_MAX9860) += snd-soc-max9860.o
304306
obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o
305307
obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o
306308
obj-$(CONFIG_SND_SOC_NAU8825) += snd-soc-nau8825.o

sound/soc/codecs/hdmi-codec.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
112112
return ret;
113113

114114
if (hcp->hcd.ops->audio_startup) {
115-
ret = hcp->hcd.ops->audio_startup(dai->dev->parent);
115+
ret = hcp->hcd.ops->audio_startup(dai->dev->parent, hcp->hcd.data);
116116
if (ret) {
117117
mutex_lock(&hcp->current_stream_lock);
118118
hcp->current_stream = NULL;
@@ -122,8 +122,8 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
122122
}
123123

124124
if (hcp->hcd.ops->get_eld) {
125-
ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->eld,
126-
sizeof(hcp->eld));
125+
ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->hcd.data,
126+
hcp->eld, sizeof(hcp->eld));
127127

128128
if (!ret) {
129129
ret = snd_pcm_hw_constraint_eld(substream->runtime,
@@ -144,7 +144,7 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
144144

145145
WARN_ON(hcp->current_stream != substream);
146146

147-
hcp->hcd.ops->audio_shutdown(dai->dev->parent);
147+
hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data);
148148

149149
mutex_lock(&hcp->current_stream_lock);
150150
hcp->current_stream = NULL;
@@ -195,8 +195,8 @@ static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
195195
hp.sample_rate = params_rate(params);
196196
hp.channels = params_channels(params);
197197

198-
return hcp->hcd.ops->hw_params(dai->dev->parent, &hcp->daifmt[dai->id],
199-
&hp);
198+
return hcp->hcd.ops->hw_params(dai->dev->parent, hcp->hcd.data,
199+
&hcp->daifmt[dai->id], &hp);
200200
}
201201

202202
static int hdmi_codec_set_fmt(struct snd_soc_dai *dai,
@@ -280,7 +280,8 @@ static int hdmi_codec_digital_mute(struct snd_soc_dai *dai, int mute)
280280
dev_dbg(dai->dev, "%s()\n", __func__);
281281

282282
if (hcp->hcd.ops->digital_mute)
283-
return hcp->hcd.ops->digital_mute(dai->dev->parent, mute);
283+
return hcp->hcd.ops->digital_mute(dai->dev->parent,
284+
hcp->hcd.data, mute);
284285

285286
return 0;
286287
}

0 commit comments

Comments
 (0)