Move some code from pcm.h into pcm.c

Those structures and symbolic constants are only used in pcm.c there is
no need for them to be public in a header file.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Check return value when allocating urb buffers

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Don't do allocation in initializers

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Return earlier if chip is NULL in  hiface_chip_disconnect

This reduces the indentation level and makes the code more readable.

While at it remove a stale comment about firmware upload, a leftover
from the 6fire driver.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Divide by 8 when converting from bits to bytes

When converting from bits to bytes just divide by eight instead of right
shifting by three, it is more readable this way.

Eventually we will be using utility functions from sound/pcm.h like
frames_to_bytes() but for now this will do.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Reformat debug print statements

Just cosmetics to make it easier to follow what is going to be printed.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Add a very simple test-rates.sh script

It needs speaker-test from alsa-utils

An alternative path for speaker-testy can be specified by setting the
SPEAKER_TEST evn variable.

This can be used for instance to run the version from git which supports
more sample rates.

The alsa device can be specified by setting the DEVICE env variable.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Make testing extra rates optional in test-rate.sh

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Remove __dev* attributes

CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove any use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

This makes the driver compile with 3.8-rc kernels.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>