summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorManjula Gupta <magupta@nvidia.com>2010-02-11 17:44:18 +0530
committerManjula Gupta <magupta@nvidia.com>2010-02-15 16:21:22 +0530
commit94d035397f1e4d9d82387bfffb91c675da5a2a83 (patch)
tree10b5a2593cc1d10223a27ca1b025d4ba41f8c8e9 /sound
parent98b44d09775f5b84a798294bd36666f0e5fb7b82 (diff)
[ALSA]: Fix sample rate conversion for recording
- Add SRC and convert pin in Standard Input Path. - Modify the TEGRA_DEFAULT_BUFFER_SIZE to 8KB, it fixes the breaks in 8bit Mono playback. - Add S16_BE in supported format to support .au format. Sample data and other fields are stored in Big endian form in a-law(au) format. - Fix review comments on Patch Set 1. For Bug [LDK/Whistler/ALSA] Attempt to a-law(au) audio record results application/device hang(9/10). Change-Id: I8be2b8c85506ae60f10d5a0318e34a888be9e71c
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_transport.c6
-rw-r--r--sound/soc/tegra/tegra_transport.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra_transport.c b/sound/soc/tegra/tegra_transport.c
index 47b62c07f057..c64e452f0c90 100644
--- a/sound/soc/tegra/tegra_transport.c
+++ b/sound/soc/tegra/tegra_transport.c
@@ -1,5 +1,5 @@
/*
- * sound/soc/tegra/alsa_transport.c
+ * sound/soc/tegra/tegra_transport.c
*
* ALSA SOC driver for NVIDIA Tegra SoCs
*
@@ -891,11 +891,13 @@ NvError tegra_audiofx_create_input(NvRmDeviceHandle hRmDevice,
}
audiofx_path_connect(pInput->Resize, pInput->Stream);
+ audiofx_path_connect(pInput->Convert, pInput->Resize);
+ audiofx_path_connect(pInput->Src, pInput->Convert);
/* Wire 5 */
connection.SourcePin = (InputSelect == NvAudioInputSelect_Record) ?
NvAudioFxSourcePin : NvAudioFxLoopbackPin;
- connection.hSink = (NvAudioFxHandle)pInput->Resize;
+ connection.hSink = (NvAudioFxHandle)pInput->Src;
connection.SinkPin = NvAudioFxSinkPin;
e = tegra_transport_set_property(0,
NvAudioFxProperty_Attach,
diff --git a/sound/soc/tegra/tegra_transport.h b/sound/soc/tegra/tegra_transport.h
index d3306f0f1496..f5799a650c5d 100644
--- a/sound/soc/tegra/tegra_transport.h
+++ b/sound/soc/tegra/tegra_transport.h
@@ -1,5 +1,5 @@
/*
- * sound/soc/tegra/alsa_transport.h
+ * sound/soc/tegra/tegra_transport.h
*
* ALSA SOC driver for NVIDIA Tegra SoCs
*
@@ -49,12 +49,12 @@
#define WHISTLER_CODEC_ADDRESS 0x1a
#define WHISTLER_CODEC_BUS 0
#define NVALSA_BUFFER_COUNT 1
-#define TEGRA_DEFAULT_BUFFER_SIZE 4096
+#define TEGRA_DEFAULT_BUFFER_SIZE 8192
#define NVALSA_INVALID_STATE -1
#define TEGRA_SAMPLE_RATES (SNDRV_PCM_RATE_8000_48000)
#define TEGRA_SAMPLE_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |\
SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |\
- SNDRV_PCM_FMTBIT_S32_LE)
+ SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S16_BE)
#define TEGRA_TRANSPORT_SEND_TIMEOUT 5000
#define TEGRA_TRANSPORT_CONNECT_TIMEOUT 60000