Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak464…
Browse files Browse the repository at this point in the history
…2', 'asoc/topic/arizona', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next
  • Loading branch information
broonie committed Sep 23, 2015
6 parents f950aa9 + e3a4d95 + 544637b + ccaadda + 3f8958c + 2342caf commit 97e15d9
Show file tree
Hide file tree
Showing 14 changed files with 844 additions and 111 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/sound/ak4613.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
AK4613 I2C transmitter

This device supports I2C mode only.

Required properties:

- compatible : "asahi-kasei,ak4613"
- reg : The chip select number on the I2C bus

Example:

&i2c {
ak4613: ak4613@0x10 {
compatible = "asahi-kasei,ak4613";
reg = <0x10>;
};
};
22 changes: 21 additions & 1 deletion Documentation/devicetree/bindings/sound/ak4642.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,31 @@ Required properties:
- compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
- reg : The chip select number on the I2C bus

Example:
Optional properties:

- #clock-cells : common clock binding; shall be set to 0
- clocks : common clock binding; MCKI clock
- clock-frequency : common clock binding; frequency of MCKO
- clock-output-names : common clock binding; MCKO clock name

Example 1:

&i2c {
ak4648: ak4648@0x12 {
compatible = "asahi-kasei,ak4642";
reg = <0x12>;
};
};

Example 2:

&i2c {
ak4643: codec@12 {
compatible = "asahi-kasei,ak4643";
reg = <0x12>;
#clock-cells = <0>;
clocks = <&audio_clock>;
clock-frequency = <12288000>;
clock-output-names = "ak4643_mcko";
};
};
21 changes: 6 additions & 15 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,14 +871,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as,
* Calculate the lowest divider that satisfies the
* constraint, assuming div32/fdiv/mbz == 0.
*/
if (xfer->speed_hz)
scbr = DIV_ROUND_UP(bus_hz, xfer->speed_hz);
else
/*
* This can happend if max_speed is null.
* In this case, we set the lowest possible speed
*/
scbr = 0xff;
scbr = DIV_ROUND_UP(bus_hz, xfer->speed_hz);

/*
* If the resulting divider doesn't fit into the
Expand Down Expand Up @@ -1300,14 +1293,12 @@ static int atmel_spi_one_transfer(struct spi_master *master,
return -EINVAL;
}

if (xfer->bits_per_word) {
asd = spi->controller_state;
bits = (asd->csr >> 4) & 0xf;
if (bits != xfer->bits_per_word - 8) {
dev_dbg(&spi->dev,
asd = spi->controller_state;
bits = (asd->csr >> 4) & 0xf;
if (bits != xfer->bits_per_word - 8) {
dev_dbg(&spi->dev,
"you can't yet change bits_per_word in transfers\n");
return -ENOPROTOOPT;
}
return -ENOPROTOOPT;
}

/*
Expand Down
12 changes: 12 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,18 @@
.info = snd_soc_info_volsw, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) }
#define SOC_SINGLE_RANGE_EXT_TLV(xname, xreg, xshift, xmin, xmax, xinvert, \
xhandler_get, xhandler_put, tlv_array) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.info = snd_soc_info_volsw_range, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = (unsigned long)&(struct soc_mixer_control) \
{.reg = xreg, .rreg = xreg, .shift = xshift, \
.rshift = xshift, .min = xmin, .max = xmax, \
.platform_max = xmax, .invert = xinvert} }
#define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\
xhandler_get, xhandler_put, tlv_array) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
Expand Down
1 change: 1 addition & 0 deletions sound/soc/atmel/atmel_wm8904.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ static const struct of_device_id atmel_asoc_wm8904_dt_ids[] = {
{ .compatible = "atmel,asoc-wm8904", },
{ }
};
MODULE_DEVICE_TABLE(of, atmel_asoc_wm8904_dt_ids);
#endif

static struct platform_driver atmel_asoc_wm8904_driver = {
Expand Down
10 changes: 1 addition & 9 deletions sound/soc/au1x/db1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ static int db1000_audio_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = &db1000_ac97;
card->dev = &pdev->dev;
return snd_soc_register_card(card);
}

static int db1000_audio_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
return devm_snd_soc_register_card(&pdev->dev, card);
}

static struct platform_driver db1000_audio_driver = {
Expand All @@ -54,7 +47,6 @@ static struct platform_driver db1000_audio_driver = {
.pm = &snd_soc_pm_ops,
},
.probe = db1000_audio_probe,
.remove = db1000_audio_remove,
};

module_platform_driver(db1000_audio_driver);
Expand Down
10 changes: 1 addition & 9 deletions sound/soc/au1x/db1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,7 @@ static int db1200_audio_probe(struct platform_device *pdev)

card = db1200_cards[pid->driver_data];
card->dev = &pdev->dev;
return snd_soc_register_card(card);
}

static int db1200_audio_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
snd_soc_unregister_card(card);
return 0;
return devm_snd_soc_register_card(&pdev->dev, card);
}

static struct platform_driver db1200_audio_driver = {
Expand All @@ -191,7 +184,6 @@ static struct platform_driver db1200_audio_driver = {
},
.id_table = db1200_pids,
.probe = db1200_audio_probe,
.remove = db1200_audio_remove,
};

module_platform_driver(db1200_audio_driver);
Expand Down
5 changes: 5 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_AK4104 if SPI_MASTER
select SND_SOC_AK4535 if I2C
select SND_SOC_AK4554
select SND_SOC_AK4613 if I2C
select SND_SOC_AK4641 if I2C
select SND_SOC_AK4642 if I2C
select SND_SOC_AK4671 if I2C
Expand Down Expand Up @@ -319,6 +320,10 @@ config SND_SOC_AK4535
config SND_SOC_AK4554
tristate "AKM AK4554 CODEC"

config SND_SOC_AK4613
tristate "AKM AK4613 CODEC"
depends on I2C

config SND_SOC_AK4641
tristate

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ snd-soc-ads117x-objs := ads117x.o
snd-soc-ak4104-objs := ak4104.o
snd-soc-ak4535-objs := ak4535.o
snd-soc-ak4554-objs := ak4554.o
snd-soc-ak4613-objs := ak4613.o
snd-soc-ak4641-objs := ak4641.o
snd-soc-ak4642-objs := ak4642.o
snd-soc-ak4671-objs := ak4671.o
Expand Down Expand Up @@ -216,6 +217,7 @@ obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o
obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o
obj-$(CONFIG_SND_SOC_AK4554) += snd-soc-ak4554.o
obj-$(CONFIG_SND_SOC_AK4613) += snd-soc-ak4613.o
obj-$(CONFIG_SND_SOC_AK4641) += snd-soc-ak4641.o
obj-$(CONFIG_SND_SOC_AK4642) += snd-soc-ak4642.o
obj-$(CONFIG_SND_SOC_AK4671) += snd-soc-ak4671.o
Expand Down
Loading

0 comments on commit 97e15d9

Please sign in to comment.