Skip to contentSkip to conversation

davinci ASoC interface changes

PATCH In review Kevin Hilman 2 participants 8 messages Jul 6, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover davinci ASoC interface changes

This series updates the DaVinci ASoC support after various DaVinci core interface changes. These core changes are part of the DaVinci core changes submitted for 2.6.32.

This compiles on top of the v2.6.31-rc2 based 'davinci-next' branch of the DaVinci git repo here:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git

Naresh Medisetty (1):
ASoC: DaVinci: Change default output volume

Sudhakar Rajashekhara (1):
ASoC: davinci: update after EDMA interface changes

 sound/soc/codecs/tlv320aic3x.h  |    2 +-
 sound/soc/davinci/davinci-evm.c |    8 ++++----
 sound/soc/davinci/davinci-pcm.c |    6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)
#1 lore raw

PATCH 1/2 ASoC: davinci: update after EDMA interface changes

From: Sudhakar Rajashekhara <[email protected]>

---
 sound/soc/davinci/davinci-evm.c |    8 ++++----
 sound/soc/davinci/davinci-pcm.c |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
sound/soc/davinci/davinci-evm.c +4 -4
index 58fd1cb..832d5db 100644
@@ -175,8 +175,8 @@ static struct resource evm_snd_resources[] = {
 };
 
 static struct evm_snd_platform_data evm_snd_data = {
-	.tx_dma_ch	= DAVINCI_DMA_ASP0_TX,
-	.rx_dma_ch	= DAVINCI_DMA_ASP0_RX,
+	.tx_dma_ch	= EDMA_CTLR_CHAN(0, DAVINCI_DMA_ASP0_TX),
+	.rx_dma_ch	= EDMA_CTLR_CHAN(0, DAVINCI_DMA_ASP0_RX),
 };
 
 /* DM335 EVM uses ASP1; line-out is a stereo mini-jack */
@@ -189,8 +189,8 @@ static struct resource dm335evm_snd_resources[] = {
 };
 
 static struct evm_snd_platform_data dm335evm_snd_data = {
-	.tx_dma_ch	= DAVINCI_DMA_ASP1_TX,
-	.rx_dma_ch	= DAVINCI_DMA_ASP1_RX,
+	.tx_dma_ch	= EDMA_CTLR_CHAN(0, DAVINCI_DMA_ASP1_TX),
+	.rx_dma_ch	= EDMA_CTLR_CHAN(0, DAVINCI_DMA_ASP1_RX),
 };
 
 static struct platform_device *evm_snd_device;
sound/soc/davinci/davinci-pcm.c +3 -3
index a059965..3ee38b6 100644
@@ -143,7 +143,7 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)
 	prtd->master_lch = ret;
 
 	/* Request parameter RAM reload slot */
-	ret = edma_alloc_slot(EDMA_SLOT_ANY);
+	ret = edma_alloc_slot(EDMA_CTLR(prtd->master_lch), EDMA_SLOT_ANY);
 	if (ret < 0) {
 		edma_free_channel(prtd->master_lch);
 		return ret;
@@ -160,8 +160,8 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)
 	 * so davinci_pcm_enqueue_dma() takes less time in IRQ.
 	 */
 	edma_read_slot(prtd->slave_lch, &p_ram);
-	p_ram.opt |= TCINTEN | EDMA_TCC(prtd->master_lch);
-	p_ram.link_bcntrld = prtd->slave_lch << 5;
+	p_ram.opt |= TCINTEN | EDMA_TCC(EDMA_CHAN_SLOT(prtd->master_lch));
+	p_ram.link_bcntrld = EDMA_CHAN_SLOT(prtd->slave_lch) << 5;
 	edma_write_slot(prtd->slave_lch, &p_ram);
 
 	return 0;
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 2/2 ASoC: DaVinci: Change default output volume

From: Naresh Medisetty <[email protected]>

Changes default output volume of alsa driver since it is very low

---
 sound/soc/codecs/tlv320aic3x.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/tlv320aic3x.h +1 -1
index ac827e5..76dbff4 100644
@@ -195,7 +195,7 @@
 #define INVERT_VOL(val)   (0x7f - val)
 
 /* Default output volume (inverted) */
-#define DEFAULT_VOL     INVERT_VOL(0x50)
+#define DEFAULT_VOL     INVERT_VOL(0x60)
 /* Default input volume */
 #define DEFAULT_GAIN    0x20
 
Signature · 1 line
1.6.3.3
#3 lore raw

Re: [PATCH 2/2] ASoC: DaVinci: Change default output volume

Quoted 6 lines · Kevin Hilman

From: Naresh Medisetty <[email protected]>

Changes default output volume of alsa driver since it is very low

Nack. The setup of the audio routing should be handled by user space on the system - the default setup is generally taken from hardware. Most of the ASoC CODECs are flexible enough to make choosing a default which makes sense to all systems pretty much impossible, and even within systems many have sufficient options to mean that something needs to be worked out dynamically at runtime rather than hard coded into the kernel.

Naresh, changes like this which are not specific to the architecture should be submmitted directly to the subsystems.

#5 lore raw

Re: [PATCH 1/2] ASoC: davinci: update after EDMA interface changes

Quoted 8 lines · Mark Brown
Quoted 5 lines · Kevin Hilman

From: Sudhakar Rajashekhara <[email protected]>

Mark,

So should I queue this up along with my changes, or do you want to merge this into asoc?

Kevin

#6 lore raw

Re: [PATCH 1/2] ASoC: davinci: update after EDMA interface changes

Quoted 2 lines · Kevin Hilman

So should I queue this up along with my changes, or do you want to merge this into asoc?

It needs to go along with your changes at least to preserve bisect (it should really be in the same commit that changes the API from that point of view). But see my reply to Troy's post - he's got some further ASoC changes which depend on the new API and complicate matters a little.

So long as it all merges down fine for 2.6.32 I'm open to anything which works well for you guys.

#7 lore raw

Re: [PATCH 1/2] ASoC: davinci: update after EDMA interface changes

Quoted 8 lines · Mark Brown
Quoted 2 lines · Kevin Hilman

So should I queue this up along with my changes, or do you want to merge this into asoc?

It needs to go along with your changes at least to preserve bisect (it should really be in the same commit that changes the API from that point of view).

OK, it was originally part of the same patch, but I separated it out thinking that the sound/* part would go upstream separately.

I'll merge it back into the original commit and update davinci-next.

Quoted 2 lines

But see my reply to Troy's post - he's got some further ASoC changes which depend on the new API and complicate matters a little.

OK, will reply there.

Kevin