[Alsa-user] Resampling tipstricks

2011-08-19 Thread Ronaldinho

Hello dear all!
There are 2 sound cards on my PC: hda_intel (ALC888 from Realtek) and 
SBLive 5.1


1. I could that ALSA make software resampling (44.1 to 48 kHz) when 
sound playing through SBLive and do not resampling if using hda_intel. 
How asoundrc must be configured in this case?

I've fund some different examples - what's the best choice?
1.1.
pcm.HQ {
type rate
slave {
pcm hw:0,0
rate 48000
}
converter samplerate_best
}
1.2.
defaults.pcm.rate_converter samplerate_best

2. In my OS (Kubuntu 10.04) installed not latest version of ALSA libs. 
How I can know exactly which version of ALSA using. I mean are there any 
incompatibilities between for instance 1.0.23 ver of ALSA and 1.0.24 of 
alsa-lib, alsa-plugins (I have choose right version of alsa-lib, 
alsa-plugins and install them).


3. Is it possible to use OSS and ALSA both? I could that hda_intel uses 
ALSA, SBLive -­ OSS. How exactly?


Thank you in advance

--
Ronaldinho

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Acer 4820TG hda-intel wrong BIOS-autoprobing

2011-08-19 Thread Tommaso Falchi Delitala
I noticed that error messages

hda-intel: spurious response 
hda-intel: azx_get_response timeout, switching to polling mode:
...
hda_intel: azx_get_response timeout, switching to single_cmd mode

are present in dmesg only when Intel integrated graphic card is used. The
system has two GPUs (Intel + ATI dedicated).
If ATI card is selected at boot (using vga_switcheroo) no such messages are
displayed.

Is there any logical explanation to this behavior?
Thanks and regards,

Tommaso

2011/7/27 Tommaso Falchi Delitala volalt...@gmail.com

 Hi everybody,

 I think there is something wrong with the intel-hda model autoprobing
 on my Acer TimelineX 4820TG.

 The chip is recognized as:
 hda_codec: ALC271X: BIOS auto-probing,
 but Pcwizard under Windows 7 reports it as Realtek ALC-269. Other info
 I found on the Internet seem to confirm 269 is the right codec.

 Can anybody confirm the correct model onboard the Acer 4820TG?

 Dmesg is populated with:
 hda-intel: spurious response 0x0:0x0, last cmd=0x270d80
 [...]
 hda-intel: azx_get_response timeout, switching to polling mode: last
 cmd=0x00270e02
 [...]
 hda_intel: azx_get_response timeout, switching to single_cmd mode:
 last cmd=0x00170503
 azx_single_send_cmd: 177 callbacks suppressed

 I guess these erros result from wrong model autoprobing.
 Audio works anyway, but occasionally lags and shows major problems
 after enabling powersave features.

 I tried to force audio model with:
 options snd-hda-intel model=laptop-amic probe_mask=1, or
 options snd-hda-intel model=acer
 but it doesn't work.

 Is there a real problem in the codec model auto-probing?
 Should I file a kernel bug or am I missing something in the configuration?.

 Thank you for your help,
 Best Regards,

 Tommaso

 -Other useful info:
 OS: Arch Linux, kernel 3.0.0 (same with 2.6.39)

 Driver version: 1.0.24
 Library version:1.0.24.1

 Soundcards recognised by ALSA

 0 [Intel]: HDA-Intel - HDA Intel
   HDA Intel at 0xdc50 irq 44
  1 [Generic]: HDA-Intel - HD-Audio Generic
   HD-Audio Generic at 0xdc42 irq 45

 PCI Soundcards installed in the system

 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset
 High Definition Audio (rev 05)
 01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio
 [Mobility Radeon HD 5000 Series] (rev ff)

 00:1b.0 0403: 8086:3b56 (rev 05)
Subsystem: 1025:0359
 --
 01:00.1 0403: 1002:aa68 (rev ff) (prog-if ff)
!!! Unknown header type 7f

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Alsa-user Digest, Vol 64, Issue 9

2011-08-19 Thread alsa
Hi,

This is an automated message. I am currently out of the office for a couple of 
days and will read your mail when I return.

;o) Cor



--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] From git, building ALSA fails with error caused by SND_SOC_CUSTOM is used but never declared

2011-08-19 Thread Jose R R
Good day!


I tried to build ALSA from git and SND_SOC_CUSTOM is never declared in
file alsa-kernel/soc/soc-io.c, hence the build fails with first error:

alsa-kernel/soc/soc-io.c:370:7: error: ‘SND_SOC_CUSTOM’ undeclared (first
use in this function)

Below is the actual contents of alsa-kernel/soc/soc-io.c, where it can be
verified that SND_SOC_CUSTOM is used but never declared

Please note that I am using Linux kernel 3.0.0-1 in Debian Sid.

/*
* soc-io.c -- ASoC register I/O helpers
*
* Copyright 2009-2011 Wolfson Microelectronics PLC.
*
* Author: Mark Brown broo...@opensource.wolfsonmicro.com
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/

#include linux/i2c.h
#include linux/spi/spi.h
#include sound/soc.h

#include trace/events/asoc.h

#ifdef CONFIG_SPI_MASTER
static int do_spi_write(void *control, const char *data, int len)
{
struct spi_device *spi = control;
int ret;

ret = spi_write(spi, data, len);
if (ret  0)
return ret;

return len;
}
#endif

static int do_hw_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value, const void *data, int len)
{
int ret;

if (!snd_soc_codec_volatile_register(codec, reg) 
reg  codec-driver-reg_cache_size 
!codec-cache_bypass) {
ret = snd_soc_cache_write(codec, reg, value);
if (ret  0)
return -1;
}

if (codec-cache_only) {
codec-cache_sync = 1;
return 0;
}

ret = codec-hw_write(codec-control_data, data, len);
if (ret == len)
return 0;
if (ret  0)
return ret;
else
return -EIO;
}

static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
{
int ret;
unsigned int val;

if (reg = codec-driver-reg_cache_size ||
snd_soc_codec_volatile_register(codec, reg) ||
codec-cache_bypass) {
if (codec-cache_only)
return -1;

BUG_ON(!codec-hw_read);
return codec-hw_read(codec, reg);
}

ret = snd_soc_cache_read(codec, reg, val);
if (ret  0)
return -1;
return val;
}

static int snd_soc_4_12_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u16 data;

data = cpu_to_be16((reg  12) | (value  0xff));

return do_hw_write(codec, reg, value, data, 2);
}

static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u16 data;

data = cpu_to_be16((reg  9) | (value  0x1ff));

return do_hw_write(codec, reg, value, data, 2);
}

static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u8 data[2];

reg = 0xff;
data[0] = reg;
data[1] = value  0xff;

return do_hw_write(codec, reg, value, data, 2);
}

static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u8 data[3];
u16 val = cpu_to_be16(value);

data[0] = reg;
memcpy(data[1], val, sizeof(val));

return do_hw_write(codec, reg, value, data, 3);
}

#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE)  defined(MODULE))
static unsigned int do_i2c_read(struct snd_soc_codec *codec,
void *reg, int reglen,
void *data, int datalen)
{
struct i2c_msg xfer[2];
int ret;
struct i2c_client *client = codec-control_data;

/* Write register */
xfer[0].addr = client-addr;
xfer[0].flags = 0;
xfer[0].len = reglen;
xfer[0].buf = reg;

/* Read data */
xfer[1].addr = client-addr;
xfer[1].flags = I2C_M_RD;
xfer[1].len = datalen;
xfer[1].buf = data;

ret = i2c_transfer(client-adapter, xfer, 2);
if (ret == 2)
return 0;
else if (ret  0)
return ret;
else
return -EIO;
}
#endif

#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE)  defined(MODULE))
static unsigned int snd_soc_8_8_read_i2c(struct snd_soc_codec *codec,
unsigned int r)
{
u8 reg = r;
u8 data;
int ret;

ret = do_i2c_read(codec, reg, 1, data, 1);
if (ret  0)
return 0;
return data;
}
#else
#define snd_soc_8_8_read_i2c NULL
#endif

#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE)  defined(MODULE))
static unsigned int snd_soc_8_16_read_i2c(struct snd_soc_codec *codec,
unsigned int r)
{
u8 reg = r;
u16 data;
int ret;

ret = do_i2c_read(codec, reg, 1, data, 2);
if (ret  0)
return 0;
return (data  8) | ((data  0xff)  8);
}
#else
#define snd_soc_8_16_read_i2c NULL
#endif

#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE)  defined(MODULE))
static unsigned int snd_soc_16_8_read_i2c(struct snd_soc_codec *codec,
unsigned int r)
{
u16 reg = r;
u8 data;
int ret;

ret = do_i2c_read(codec, reg, 2, data, 1);
if (ret  0)
return 0;
return data;
}
#else
#define snd_soc_16_8_read_i2c NULL
#endif

static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u8 data[3];
u16 rval = cpu_to_be16(reg);

memcpy(data, rval, sizeof(rval));
data[2] = value;

return do_hw_write(codec, reg, value, data, 3);
}

#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE)  defined(MODULE))
static unsigned int snd_soc_16_16_read_i2c(struct snd_soc_codec *codec,
unsigned int r)
{
u16 reg = cpu_to_be16(r);
u16 data;
int ret;

ret = 

Re: [Alsa-user] Acer 4820TG hda-intel wrong BIOS-autoprobing

2011-08-19 Thread Takashi Iwai
At Wed, 27 Jul 2011 01:07:15 +0200,
Tommaso Falchi Delitala wrote:
 
 Hi everybody,
 
 I think there is something wrong with the intel-hda model autoprobing
 on my Acer TimelineX 4820TG.
 
 The chip is recognized as:
 hda_codec: ALC271X: BIOS auto-probing,
 but Pcwizard under Windows 7 reports it as Realtek ALC-269. Other info
 I found on the Internet seem to confirm 269 is the right codec.

ALC271x is a variant of ALC269, and it's the right chip name.


Takashi

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] Acer 4820TG hda-intel wrong BIOS-autoprobing

2011-08-19 Thread Takashi Iwai
At Fri, 19 Aug 2011 12:14:33 +0200,
Tommaso Falchi Delitala wrote:
 
 I noticed that error messages
 
 hda-intel: spurious response 
 hda-intel: azx_get_response timeout, switching to polling mode:
 ...
 hda_intel: azx_get_response timeout, switching to single_cmd mode
 
 are present in dmesg only when Intel integrated graphic card is used. The
 system has two GPUs (Intel + ATI dedicated).
 If ATI card is selected at boot (using vga_switcheroo) no such messages are
 displayed.
 
 Is there any logical explanation to this behavior?

Your machine have two HD-audio controllers, one for on-board audio
and another for HDMI.  HDMI looks like ATI D-GPU, and this confuses
the system when GPU isn't active.  It seems that HDMI controller
doesn't respond when GPU is disabled.

A question is whether HDMI really works when D-GPU is enabled.
Did you test it?


Takashi

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] usb audio has no capture wrong

2011-08-19 Thread Carl Karsten
Ubuntu 11.04 natty -
apt-get remove --purge pulseaudio
rebooted. (just to be sure, didn't seem to change anything.)

alsa-info:
http://www.alsa-project.org/db/?f=f749b9b0c63f43de97c9d692fa7fc6780441c7a9

lsusb
Bus 008 Device 003: ID 08bb:2902 Texas Instruments Japan PCM2902 Audio Codec

problem:
I can capture from the device, but the level is pretty low.  I think
it is at 50%, would like to A) double check that and if so  B)
increase it.
But:
alsamixer -c 1 --view=capture
This sound device does not have any capture controls.

This looks like some other problem:
(veyepar)juser@pc9d:~/alsa$ alsamixer -c 1 --view=capture -a basic
ALSA lib python.c:991:(alsa_mixer_simple_finit) Unable to find python
module '/usr/lib/alsa-lib/smixer/python/main.py'
cannot open mixer: No such device

-- 
Carl K

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb audio has no capture wrong

2011-08-19 Thread Carl Karsten
On Fri, Aug 19, 2011 at 10:43 AM, Carl Karsten c...@personnelware.com wrote:
 Ubuntu 11.04 natty -
 apt-get remove --purge pulseaudio
 rebooted. (just to be sure, didn't seem to change anything.)

 alsa-info:
 http://www.alsa-project.org/db/?f=f749b9b0c63f43de97c9d692fa7fc6780441c7a9

 lsusb
 Bus 008 Device 003: ID 08bb:2902 Texas Instruments Japan PCM2902 Audio Codec

 problem:
 I can capture from the device, but the level is pretty low.  I think
 it is at 50%, would like to A) double check that and if so  B)
 increase it.
 But:
 alsamixer -c 1 --view=capture
 This sound device does not have any capture controls.

 This looks like some other problem:
 (veyepar)juser@pc9d:~/alsa$ alsamixer -c 1 --view=capture -a basic
 ALSA lib python.c:991:(alsa_mixer_simple_finit) Unable to find python
 module '/usr/lib/alsa-lib/smixer/python/main.py'
 cannot open mixer: No such device

For kicks I installed ubuntu beta:
3.0.0-8-generic #11-Ubuntu SMP Fri Aug 12

http://www.alsa-project.org/db/?f=f42f65402eb315265baae14e76fa1f48a32af611

no help.

-- 
Carl K

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user