Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Fri, 19 Feb 2010 15:37:17 +0200 Eero Nurkkala wrote: > > It seems to work with I2S too. > > > > For both channels? I don't recall so.. and for the one channel only, the > FIR doesn't behave expectedly? (maybe this works [1,0,..0], but more > sophisticated ones may not..) > Could be. At least the control 'McBSP2 Sidetone Channel 1' doesn't have any effect. But the control 0 is affecting both channels simultaneously. (I didn't check the meaning of those two controls) -- Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Fri, 19 Feb 2010 12:05:40 +0200 (EET) Ilkka Koskinen wrote: > > 2. I cannot change the sidetone level with alsamixer > > > I think with the previous patch set, it was impossible to set the other > channel's gain as Peter pointed out. But at least now that I try, i can > change it with alsamixer. > Probably there is some difference with SW? I'm using Debian and alsa-utils 1.0.21-1. > > Is this bug with the alsamixer? With amixer I'm able to set positive > > values but not negative > > > > amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767 > > If you try to give negative values, you need to put '--' before the value. > Thanks, works fine (lazy me). -- Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Fri, 2010-02-19 at 14:39 +0100, ext Jarkko Nikula wrote: > On Fri, 19 Feb 2010 10:34:32 +0200 > Peter Ujfalusi wrote: > > > I'm not sure, but you might need to configure the taps as well to have the > > correct sidetone. > > Also I have a recollection, that the McBSP sidetone requires DSP mode (TDM) > > in > > order to operate correctly, so on Beagle you might need to set up 4 channel > > mode. And how the channel mapping in 4 channel mode works in McBSP sidetone > > is > > another matter... > > > It seems to work with I2S too. > For both channels? I don't recall so.. and for the one channel only, the FIR doesn't behave expectedly? (maybe this works [1,0,..0], but more sophisticated ones may not..) > I think I forgot to enable control 'McBSP2 Sidetone' when I last time > tried this set (v1 or v2). But now my null test below works and I can > hear that the level is changing when I adjust the volumes with amixer. > > echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps > > arecord -f dat >/dev/null |aplay -f dat /dev/zero > > amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32700 > amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 327 > amixer set -D hw:0 'McBSP2 Sidetone Channel 0' -- -32700 > > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Fri, 19 Feb 2010 10:34:32 +0200 Peter Ujfalusi wrote: > I'm not sure, but you might need to configure the taps as well to have the > correct sidetone. > Also I have a recollection, that the McBSP sidetone requires DSP mode (TDM) > in > order to operate correctly, so on Beagle you might need to set up 4 channel > mode. And how the channel mapping in 4 channel mode works in McBSP sidetone > is > another matter... > It seems to work with I2S too. I think I forgot to enable control 'McBSP2 Sidetone' when I last time tried this set (v1 or v2). But now my null test below works and I can hear that the level is changing when I adjust the volumes with amixer. echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps arecord -f dat >/dev/null |aplay -f dat /dev/zero amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32700 amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 327 amixer set -D hw:0 'McBSP2 Sidetone Channel 0' -- -32700 -- Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Thu, 18 Feb 2010, ext Jarkko Nikula wrote: On Thu, 18 Feb 2010 20:42:27 +0200 Ilkka Koskinen wrote: The first patch implements McBSP sidetone feature on OMAP3 while the second one provides ALSA interface for using it. The patch set is based on the patch Eduardo Valentin sent to alsa-devel mailing list in October 2009. Channel gain control and enabling the sidetone have been moved to ALSA interface as suggested in comments. These patches apply on top of Janusz Krzysztofik's McBSP register cache patches in linux-omap-2.6.git Since the version 3, the buggy channel gain control has been fixed. ASoC part have been simplified resulting in removing a couple unnecessary functions. Added a comment to ASoC part explaining McBSP port number vs. index values used in OMAP McBSP implementation. I still have two concern: 1. port number vs. index difference inside driver code is not enough It's just confusing if a machine driver and internal API (mcbsp.c) has to use different indexing. See: omap_mcbsp_st_add_controls(codec, 2); ... *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */ and mcbsp->id use in mcbsp.c. Ah, that's what you meant by it. Sure, I'll change it. 2. I cannot change the sidetone level with alsamixer I think with the previous patch set, it was impossible to set the other channel's gain as Peter pointed out. But at least now that I try, i can change it with alsamixer. Is this bug with the alsamixer? With amixer I'm able to set positive values but not negative amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767 If you try to give negative values, you need to put '--' before the value. Such as: # amixer -Dhw:0 -- sset 'McBSP3 Sidetone Channel 0' -1 Simple mixer control 'McBSP3 Sidetone Channel 0',0 Capabilities: volume volume-joined Playback channels: Mono Capture channels: Mono Limits: -32768 - 32767 Mono: -1 [35%] What I'm looking here, is that I can execute a test below with unit impulse response tap filter, hear the sound and note that the volume is changing as I'm changing the sidetone volume :-) arecord -f dat >/dev/null |aplay -f dat /dev/zero As Peter said in the other mail, you need to have the taps also. Cheers, Ilkka -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Thursday 18 February 2010 22:22:29 ext Jarkko Nikula wrote: > > I still have two concern: > > 1. port number vs. index difference inside driver code is not enough > > It's just confusing if a machine driver and internal API (mcbsp.c) has > to use different indexing. See: > > omap_mcbsp_st_add_controls(codec, 2); > ... > *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */ Agreed. > and mcbsp->id use in mcbsp.c. It has always bothered me, I'll take a look and check if there is a reason why it is like that, and if possible I'll change the mcbsp->id to be 0 based (thus harmonizing the internal and external interface). > 2. I cannot change the sidetone level with alsamixer > > Is this bug with the alsamixer? With amixer I'm able to set positive > values but not negative > > amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767 > > What I'm looking here, is that I can execute a test below with unit > impulse response tap filter, hear the sound and note that the volume is > changing as I'm changing the sidetone volume :-) I'm not sure, but you might need to configure the taps as well to have the correct sidetone. Also I have a recollection, that the McBSP sidetone requires DSP mode (TDM) in order to operate correctly, so on Beagle you might need to set up 4 channel mode. And how the channel mapping in 4 channel mode works in McBSP sidetone is another matter... > > arecord -f dat >/dev/null |aplay -f dat /dev/zero -- Péter -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
On Thu, 18 Feb 2010 20:42:27 +0200 Ilkka Koskinen wrote: > The first patch implements McBSP sidetone feature on OMAP3 while the second > one provides ALSA interface for using it. > > The patch set is based on the patch Eduardo Valentin sent to alsa-devel > mailing list in October 2009. Channel gain control and enabling the sidetone > have been moved to ALSA interface as suggested in comments. > > These patches apply on top of Janusz Krzysztofik's McBSP register cache > patches in linux-omap-2.6.git > > Since the version 3, the buggy channel gain control has been fixed. ASoC part > have been simplified resulting in removing a couple unnecessary functions. > Added a comment to ASoC part explaining McBSP port number vs. index values > used in OMAP McBSP implementation. > I still have two concern: 1. port number vs. index difference inside driver code is not enough It's just confusing if a machine driver and internal API (mcbsp.c) has to use different indexing. See: omap_mcbsp_st_add_controls(codec, 2); ... *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */ and mcbsp->id use in mcbsp.c. 2. I cannot change the sidetone level with alsamixer Is this bug with the alsamixer? With amixer I'm able to set positive values but not negative amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767 What I'm looking here, is that I can execute a test below with unit impulse response tap filter, hear the sound and note that the volume is changing as I'm changing the sidetone volume :-) arecord -f dat >/dev/null |aplay -f dat /dev/zero -- Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv4 0/2] McBSP: OMAP3: Add sidetone feature
The first patch implements McBSP sidetone feature on OMAP3 while the second one provides ALSA interface for using it. The patch set is based on the patch Eduardo Valentin sent to alsa-devel mailing list in October 2009. Channel gain control and enabling the sidetone have been moved to ALSA interface as suggested in comments. These patches apply on top of Janusz Krzysztofik's McBSP register cache patches in linux-omap-2.6.git Since the version 3, the buggy channel gain control has been fixed. ASoC part have been simplified resulting in removing a couple unnecessary functions. Added a comment to ASoC part explaining McBSP port number vs. index values used in OMAP McBSP implementation. Eero Nurkkala (1): McBSP: OMAP3: Add sidetone feature Ilkka Koskinen (1): ASoC: OMAP-McBSP: ASoC interface for McBSP sidetone arch/arm/mach-omap2/mcbsp.c |2 + arch/arm/plat-omap/include/plat/mcbsp.h | 60 + arch/arm/plat-omap/mcbsp.c | 402 ++- sound/soc/omap/omap-mcbsp.c | 138 +++ sound/soc/omap/omap-mcbsp.h |2 + 5 files changed, 603 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html