Re: [PATCH v2 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically.

2016-11-26 Thread Ezequiel Garcia
On 26 November 2016 at 10:38, Marcel Hasler  wrote:
> Hello, and thanks for your feedback.
>
> 2016-11-20 18:36 GMT+01:00 Ezequiel Garcia :
>> Marcel,
>>
>> On 27 October 2016 at 17:34, Marcel Hasler  wrote:
>>> Exposing all the channels of the device's internal AC97 codec to userspace 
>>> is unnecessary and
>>> confusing. Instead the driver should setup the codec with proper values. 
>>> This patch removes the
>>> mixer and sets up the codec using optimal values, i.e. the same values set 
>>> by the Windows
>>> driver. This also makes the device work out-of-the-box, without the need 
>>> for the user to
>>> reconfigure the device every time it's plugged in.
>>>
>>> Signed-off-by: Marcel Hasler 
>>
>> This patch is *awesome*.
>>
>> You've re-written the file ;-), so if you want to put your
>> copyright on stk1160-ac97.c, be my guest.
>>
>
> Thanks, will do :-)
>
>> Also, just a minor comment, see below.
>>
>>> ---
>>>  drivers/media/usb/stk1160/Kconfig|  10 +--
>>>  drivers/media/usb/stk1160/Makefile   |   4 +-
>>>  drivers/media/usb/stk1160/stk1160-ac97.c | 121 
>>> +++
>>>  drivers/media/usb/stk1160/stk1160-core.c |   5 +-
>>>  drivers/media/usb/stk1160/stk1160.h  |   9 +--
>>>  5 files changed, 47 insertions(+), 102 deletions(-)
>>>
>>> diff --git a/drivers/media/usb/stk1160/Kconfig 
>>> b/drivers/media/usb/stk1160/Kconfig
>>> index 95584c1..22dff4f 100644
>>> --- a/drivers/media/usb/stk1160/Kconfig
>>> +++ b/drivers/media/usb/stk1160/Kconfig
>>> @@ -8,17 +8,9 @@ config VIDEO_STK1160_COMMON
>>>   To compile this driver as a module, choose M here: the
>>>   module will be called stk1160
>>>
>>> -config VIDEO_STK1160_AC97
>>> -   bool "STK1160 AC97 codec support"
>>> -   depends on VIDEO_STK1160_COMMON && SND
>>> -
>>> -   ---help---
>>> - Enables AC97 codec support for stk1160 driver.
>>> -
>>>  config VIDEO_STK1160
>>> tristate
>>> -   depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && 
>>> VIDEO_STK1160_COMMON
>>> +   depends on VIDEO_STK1160_COMMON
>>> default y
>>> select VIDEOBUF2_VMALLOC
>>> select VIDEO_SAA711X
>>> -   select SND_AC97_CODEC if SND
>>> diff --git a/drivers/media/usb/stk1160/Makefile 
>>> b/drivers/media/usb/stk1160/Makefile
>>> index dfe3e90..42d0546 100644
>>> --- a/drivers/media/usb/stk1160/Makefile
>>> +++ b/drivers/media/usb/stk1160/Makefile
>>> @@ -1,10 +1,8 @@
>>> -obj-stk1160-ac97-$(CONFIG_VIDEO_STK1160_AC97) := stk1160-ac97.o
>>> -
>>>  stk1160-y :=   stk1160-core.o \
>>> stk1160-v4l.o \
>>> stk1160-video.o \
>>> stk1160-i2c.o \
>>> -   $(obj-stk1160-ac97-y)
>>> +   stk1160-ac97.o
>>>
>>>  obj-$(CONFIG_VIDEO_STK1160) += stk1160.o
>>>
>>> diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c 
>>> b/drivers/media/usb/stk1160/stk1160-ac97.c
>>> index 2dd308f..d3665ce 100644
>>> --- a/drivers/media/usb/stk1160/stk1160-ac97.c
>>> +++ b/drivers/media/usb/stk1160/stk1160-ac97.c
>>> @@ -21,19 +21,12 @@
>>>   */
>>>
>>>  #include 
>>> -#include 
>>> -#include 
>>> -#include 
>>>
>>>  #include "stk1160.h"
>>>  #include "stk1160-reg.h"
>>>
>>> -static struct snd_ac97 *stk1160_ac97;
>>> -
>>> -static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value)
>>> +static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value)
>>>  {
>>> -   struct stk1160 *dev = ac97->private_data;
>>> -
>>> /* Set codec register address */
>>> stk1160_write_reg(dev, STK1160_AC97_ADDR, reg);
>>>
>>> @@ -48,9 +41,9 @@ static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 
>>> reg, u16 value)
>>> stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c);
>>>  }
>>>
>>> -static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg)
>>> +#ifdef DEBUG
>>> +static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg)
>>>  {
>>> -   struct stk1160 *dev = ac97->private_data;
>>> u8 vall = 0;
>>> u8 valh = 0;
>>>
>>> @@ -70,81 +63,53 @@ static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 
>>> reg)
>>> return (valh << 8) | vall;
>>>  }
>>>
>>> -static void stk1160_reset_ac97(struct snd_ac97 *ac97)
>>> +void stk1160_ac97_dump_regs(struct stk1160 *dev)
>>
>> static void stk1160_ac97_dump_regs ?
>>
>
> Right, this was just to test the issue addressed in the last patch
> that I submitted separately. I didn't know at that point, whether the
> issue was with writing or reading the registers, or both. This can of
> course be removed, since it's not really needed for anything anymore.
>

I'm not opposed to keeping the dump. Remove it if you think
it's useless, or keep it if you think it has debugging value.

I'm fine either way.
-- 
Ezequiel GarcĂ­a, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in

Re: [PATCH v2 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically.

2016-11-26 Thread Marcel Hasler
Hello, and thanks for your feedback.

2016-11-20 18:36 GMT+01:00 Ezequiel Garcia :
> Marcel,
>
> On 27 October 2016 at 17:34, Marcel Hasler  wrote:
>> Exposing all the channels of the device's internal AC97 codec to userspace 
>> is unnecessary and
>> confusing. Instead the driver should setup the codec with proper values. 
>> This patch removes the
>> mixer and sets up the codec using optimal values, i.e. the same values set 
>> by the Windows
>> driver. This also makes the device work out-of-the-box, without the need for 
>> the user to
>> reconfigure the device every time it's plugged in.
>>
>> Signed-off-by: Marcel Hasler 
>
> This patch is *awesome*.
>
> You've re-written the file ;-), so if you want to put your
> copyright on stk1160-ac97.c, be my guest.
>

Thanks, will do :-)

> Also, just a minor comment, see below.
>
>> ---
>>  drivers/media/usb/stk1160/Kconfig|  10 +--
>>  drivers/media/usb/stk1160/Makefile   |   4 +-
>>  drivers/media/usb/stk1160/stk1160-ac97.c | 121 
>> +++
>>  drivers/media/usb/stk1160/stk1160-core.c |   5 +-
>>  drivers/media/usb/stk1160/stk1160.h  |   9 +--
>>  5 files changed, 47 insertions(+), 102 deletions(-)
>>
>> diff --git a/drivers/media/usb/stk1160/Kconfig 
>> b/drivers/media/usb/stk1160/Kconfig
>> index 95584c1..22dff4f 100644
>> --- a/drivers/media/usb/stk1160/Kconfig
>> +++ b/drivers/media/usb/stk1160/Kconfig
>> @@ -8,17 +8,9 @@ config VIDEO_STK1160_COMMON
>>   To compile this driver as a module, choose M here: the
>>   module will be called stk1160
>>
>> -config VIDEO_STK1160_AC97
>> -   bool "STK1160 AC97 codec support"
>> -   depends on VIDEO_STK1160_COMMON && SND
>> -
>> -   ---help---
>> - Enables AC97 codec support for stk1160 driver.
>> -
>>  config VIDEO_STK1160
>> tristate
>> -   depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && 
>> VIDEO_STK1160_COMMON
>> +   depends on VIDEO_STK1160_COMMON
>> default y
>> select VIDEOBUF2_VMALLOC
>> select VIDEO_SAA711X
>> -   select SND_AC97_CODEC if SND
>> diff --git a/drivers/media/usb/stk1160/Makefile 
>> b/drivers/media/usb/stk1160/Makefile
>> index dfe3e90..42d0546 100644
>> --- a/drivers/media/usb/stk1160/Makefile
>> +++ b/drivers/media/usb/stk1160/Makefile
>> @@ -1,10 +1,8 @@
>> -obj-stk1160-ac97-$(CONFIG_VIDEO_STK1160_AC97) := stk1160-ac97.o
>> -
>>  stk1160-y :=   stk1160-core.o \
>> stk1160-v4l.o \
>> stk1160-video.o \
>> stk1160-i2c.o \
>> -   $(obj-stk1160-ac97-y)
>> +   stk1160-ac97.o
>>
>>  obj-$(CONFIG_VIDEO_STK1160) += stk1160.o
>>
>> diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c 
>> b/drivers/media/usb/stk1160/stk1160-ac97.c
>> index 2dd308f..d3665ce 100644
>> --- a/drivers/media/usb/stk1160/stk1160-ac97.c
>> +++ b/drivers/media/usb/stk1160/stk1160-ac97.c
>> @@ -21,19 +21,12 @@
>>   */
>>
>>  #include 
>> -#include 
>> -#include 
>> -#include 
>>
>>  #include "stk1160.h"
>>  #include "stk1160-reg.h"
>>
>> -static struct snd_ac97 *stk1160_ac97;
>> -
>> -static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value)
>> +static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value)
>>  {
>> -   struct stk1160 *dev = ac97->private_data;
>> -
>> /* Set codec register address */
>> stk1160_write_reg(dev, STK1160_AC97_ADDR, reg);
>>
>> @@ -48,9 +41,9 @@ static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 
>> reg, u16 value)
>> stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c);
>>  }
>>
>> -static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg)
>> +#ifdef DEBUG
>> +static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg)
>>  {
>> -   struct stk1160 *dev = ac97->private_data;
>> u8 vall = 0;
>> u8 valh = 0;
>>
>> @@ -70,81 +63,53 @@ static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 
>> reg)
>> return (valh << 8) | vall;
>>  }
>>
>> -static void stk1160_reset_ac97(struct snd_ac97 *ac97)
>> +void stk1160_ac97_dump_regs(struct stk1160 *dev)
>
> static void stk1160_ac97_dump_regs ?
>

Right, this was just to test the issue addressed in the last patch
that I submitted separately. I didn't know at that point, whether the
issue was with writing or reading the registers, or both. This can of
course be removed, since it's not really needed for anything anymore.

>>  {
>> -   struct stk1160 *dev = ac97->private_data;
>> -   /* Two-step reset AC97 interface and hardware codec */
>> -   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94);
>> -   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x88);
>> +   u16 value;
>>
>> -   /* Set 16-bit audio data and choose L channel*/
>> -   stk1160_write_reg(dev, STK1160_AC97CTL_1 + 2, 0x01);
>> -}
>> +   value = stk1160_read_ac97(dev, 0x12); /* CD volume */
>> +   stk1160_dbg("0x12 == 

Re: [PATCH v2 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically.

2016-11-20 Thread Ezequiel Garcia
Marcel,

On 27 October 2016 at 17:34, Marcel Hasler  wrote:
> Exposing all the channels of the device's internal AC97 codec to userspace is 
> unnecessary and
> confusing. Instead the driver should setup the codec with proper values. This 
> patch removes the
> mixer and sets up the codec using optimal values, i.e. the same values set by 
> the Windows
> driver. This also makes the device work out-of-the-box, without the need for 
> the user to
> reconfigure the device every time it's plugged in.
>
> Signed-off-by: Marcel Hasler 

This patch is *awesome*.

You've re-written the file ;-), so if you want to put your
copyright on stk1160-ac97.c, be my guest.

Also, just a minor comment, see below.

> ---
>  drivers/media/usb/stk1160/Kconfig|  10 +--
>  drivers/media/usb/stk1160/Makefile   |   4 +-
>  drivers/media/usb/stk1160/stk1160-ac97.c | 121 
> +++
>  drivers/media/usb/stk1160/stk1160-core.c |   5 +-
>  drivers/media/usb/stk1160/stk1160.h  |   9 +--
>  5 files changed, 47 insertions(+), 102 deletions(-)
>
> diff --git a/drivers/media/usb/stk1160/Kconfig 
> b/drivers/media/usb/stk1160/Kconfig
> index 95584c1..22dff4f 100644
> --- a/drivers/media/usb/stk1160/Kconfig
> +++ b/drivers/media/usb/stk1160/Kconfig
> @@ -8,17 +8,9 @@ config VIDEO_STK1160_COMMON
>   To compile this driver as a module, choose M here: the
>   module will be called stk1160
>
> -config VIDEO_STK1160_AC97
> -   bool "STK1160 AC97 codec support"
> -   depends on VIDEO_STK1160_COMMON && SND
> -
> -   ---help---
> - Enables AC97 codec support for stk1160 driver.
> -
>  config VIDEO_STK1160
> tristate
> -   depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && 
> VIDEO_STK1160_COMMON
> +   depends on VIDEO_STK1160_COMMON
> default y
> select VIDEOBUF2_VMALLOC
> select VIDEO_SAA711X
> -   select SND_AC97_CODEC if SND
> diff --git a/drivers/media/usb/stk1160/Makefile 
> b/drivers/media/usb/stk1160/Makefile
> index dfe3e90..42d0546 100644
> --- a/drivers/media/usb/stk1160/Makefile
> +++ b/drivers/media/usb/stk1160/Makefile
> @@ -1,10 +1,8 @@
> -obj-stk1160-ac97-$(CONFIG_VIDEO_STK1160_AC97) := stk1160-ac97.o
> -
>  stk1160-y :=   stk1160-core.o \
> stk1160-v4l.o \
> stk1160-video.o \
> stk1160-i2c.o \
> -   $(obj-stk1160-ac97-y)
> +   stk1160-ac97.o
>
>  obj-$(CONFIG_VIDEO_STK1160) += stk1160.o
>
> diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c 
> b/drivers/media/usb/stk1160/stk1160-ac97.c
> index 2dd308f..d3665ce 100644
> --- a/drivers/media/usb/stk1160/stk1160-ac97.c
> +++ b/drivers/media/usb/stk1160/stk1160-ac97.c
> @@ -21,19 +21,12 @@
>   */
>
>  #include 
> -#include 
> -#include 
> -#include 
>
>  #include "stk1160.h"
>  #include "stk1160-reg.h"
>
> -static struct snd_ac97 *stk1160_ac97;
> -
> -static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value)
> +static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value)
>  {
> -   struct stk1160 *dev = ac97->private_data;
> -
> /* Set codec register address */
> stk1160_write_reg(dev, STK1160_AC97_ADDR, reg);
>
> @@ -48,9 +41,9 @@ static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 
> reg, u16 value)
> stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c);
>  }
>
> -static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg)
> +#ifdef DEBUG
> +static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg)
>  {
> -   struct stk1160 *dev = ac97->private_data;
> u8 vall = 0;
> u8 valh = 0;
>
> @@ -70,81 +63,53 @@ static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 
> reg)
> return (valh << 8) | vall;
>  }
>
> -static void stk1160_reset_ac97(struct snd_ac97 *ac97)
> +void stk1160_ac97_dump_regs(struct stk1160 *dev)

static void stk1160_ac97_dump_regs ?

>  {
> -   struct stk1160 *dev = ac97->private_data;
> -   /* Two-step reset AC97 interface and hardware codec */
> -   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94);
> -   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x88);
> +   u16 value;
>
> -   /* Set 16-bit audio data and choose L channel*/
> -   stk1160_write_reg(dev, STK1160_AC97CTL_1 + 2, 0x01);
> -}
> +   value = stk1160_read_ac97(dev, 0x12); /* CD volume */
> +   stk1160_dbg("0x12 == 0x%04x", value);
>
> -static struct snd_ac97_bus_ops stk1160_ac97_ops = {
> -   .read   = stk1160_read_ac97,
> -   .write  = stk1160_write_ac97,
> -   .reset  = stk1160_reset_ac97,
> -};
> +   value = stk1160_read_ac97(dev, 0x10); /* Line-in volume */
> +   stk1160_dbg("0x10 == 0x%04x", value);
>
> -int stk1160_ac97_register(struct stk1160 *dev)
> -{
> -   struct snd_card *card = NULL;
> -   struct snd_ac97_bus *ac97_bus;
> -   struct snd_ac97_template ac97_template;
> -   int rc;
> +   value = 

[PATCH v2 1/3] stk1160: Remove stk1160-mixer and setup internal AC97 codec automatically.

2016-10-27 Thread Marcel Hasler
Exposing all the channels of the device's internal AC97 codec to userspace is 
unnecessary and
confusing. Instead the driver should setup the codec with proper values. This 
patch removes the
mixer and sets up the codec using optimal values, i.e. the same values set by 
the Windows
driver. This also makes the device work out-of-the-box, without the need for 
the user to
reconfigure the device every time it's plugged in.

Signed-off-by: Marcel Hasler 
---
 drivers/media/usb/stk1160/Kconfig|  10 +--
 drivers/media/usb/stk1160/Makefile   |   4 +-
 drivers/media/usb/stk1160/stk1160-ac97.c | 121 +++
 drivers/media/usb/stk1160/stk1160-core.c |   5 +-
 drivers/media/usb/stk1160/stk1160.h  |   9 +--
 5 files changed, 47 insertions(+), 102 deletions(-)

diff --git a/drivers/media/usb/stk1160/Kconfig 
b/drivers/media/usb/stk1160/Kconfig
index 95584c1..22dff4f 100644
--- a/drivers/media/usb/stk1160/Kconfig
+++ b/drivers/media/usb/stk1160/Kconfig
@@ -8,17 +8,9 @@ config VIDEO_STK1160_COMMON
  To compile this driver as a module, choose M here: the
  module will be called stk1160
 
-config VIDEO_STK1160_AC97
-   bool "STK1160 AC97 codec support"
-   depends on VIDEO_STK1160_COMMON && SND
-
-   ---help---
- Enables AC97 codec support for stk1160 driver.
-
 config VIDEO_STK1160
tristate
-   depends on (!VIDEO_STK1160_AC97 || (SND='n') || SND) && 
VIDEO_STK1160_COMMON
+   depends on VIDEO_STK1160_COMMON
default y
select VIDEOBUF2_VMALLOC
select VIDEO_SAA711X
-   select SND_AC97_CODEC if SND
diff --git a/drivers/media/usb/stk1160/Makefile 
b/drivers/media/usb/stk1160/Makefile
index dfe3e90..42d0546 100644
--- a/drivers/media/usb/stk1160/Makefile
+++ b/drivers/media/usb/stk1160/Makefile
@@ -1,10 +1,8 @@
-obj-stk1160-ac97-$(CONFIG_VIDEO_STK1160_AC97) := stk1160-ac97.o
-
 stk1160-y :=   stk1160-core.o \
stk1160-v4l.o \
stk1160-video.o \
stk1160-i2c.o \
-   $(obj-stk1160-ac97-y)
+   stk1160-ac97.o
 
 obj-$(CONFIG_VIDEO_STK1160) += stk1160.o
 
diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c 
b/drivers/media/usb/stk1160/stk1160-ac97.c
index 2dd308f..d3665ce 100644
--- a/drivers/media/usb/stk1160/stk1160-ac97.c
+++ b/drivers/media/usb/stk1160/stk1160-ac97.c
@@ -21,19 +21,12 @@
  */
 
 #include 
-#include 
-#include 
-#include 
 
 #include "stk1160.h"
 #include "stk1160-reg.h"
 
-static struct snd_ac97 *stk1160_ac97;
-
-static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 reg, u16 value)
+static void stk1160_write_ac97(struct stk1160 *dev, u16 reg, u16 value)
 {
-   struct stk1160 *dev = ac97->private_data;
-
/* Set codec register address */
stk1160_write_reg(dev, STK1160_AC97_ADDR, reg);
 
@@ -48,9 +41,9 @@ static void stk1160_write_ac97(struct snd_ac97 *ac97, u16 
reg, u16 value)
stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x8c);
 }
 
-static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg)
+#ifdef DEBUG
+static u16 stk1160_read_ac97(struct stk1160 *dev, u16 reg)
 {
-   struct stk1160 *dev = ac97->private_data;
u8 vall = 0;
u8 valh = 0;
 
@@ -70,81 +63,53 @@ static u16 stk1160_read_ac97(struct snd_ac97 *ac97, u16 reg)
return (valh << 8) | vall;
 }
 
-static void stk1160_reset_ac97(struct snd_ac97 *ac97)
+void stk1160_ac97_dump_regs(struct stk1160 *dev)
 {
-   struct stk1160 *dev = ac97->private_data;
-   /* Two-step reset AC97 interface and hardware codec */
-   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x94);
-   stk1160_write_reg(dev, STK1160_AC97CTL_0, 0x88);
+   u16 value;
 
-   /* Set 16-bit audio data and choose L channel*/
-   stk1160_write_reg(dev, STK1160_AC97CTL_1 + 2, 0x01);
-}
+   value = stk1160_read_ac97(dev, 0x12); /* CD volume */
+   stk1160_dbg("0x12 == 0x%04x", value);
 
-static struct snd_ac97_bus_ops stk1160_ac97_ops = {
-   .read   = stk1160_read_ac97,
-   .write  = stk1160_write_ac97,
-   .reset  = stk1160_reset_ac97,
-};
+   value = stk1160_read_ac97(dev, 0x10); /* Line-in volume */
+   stk1160_dbg("0x10 == 0x%04x", value);
 
-int stk1160_ac97_register(struct stk1160 *dev)
-{
-   struct snd_card *card = NULL;
-   struct snd_ac97_bus *ac97_bus;
-   struct snd_ac97_template ac97_template;
-   int rc;
+   value = stk1160_read_ac97(dev, 0x0e); /* MIC volume (mono) */
+   stk1160_dbg("0x0e == 0x%04x", value);
 
-   /*
-* Just want a card to access ac96 controls,
-* the actual capture interface will be handled by snd-usb-audio
-*/
-   rc = snd_card_new(dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
- THIS_MODULE, 0, );
-   if (rc < 0)
-   return rc;
-
-   /* TODO: I'm not sure where should I get these names :-( */
-   snprintf(card->shortname, sizeof(card->shortname),
-