11 Mar, 2013
7 commits
-
Expose the newly added TCO LTC and sync check functions to userspace.
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
This patch adds new ALSA controls to query the LTC state from userspace.
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
This patch prepares snd_hdspm_get_sync_check() to also check the TCO
sync state. The added feature will be exposed to the user in a later
commit.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
Considerably shorten the code by using a macro. Though this won't lower
the binary size, it makes the source more readable.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
For 96kHz, MADI allows to multiplex the samples (SMUX) or to use a
dedicated 96K mode. The RME cards default to 96K mode, but since not all
external MADI equipment supports this, provide a switch to users that
changes the on-wire protocol to SMUX.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
When using the additional Time Code Option module in slave mode or the
SYNC-In wordclock connector, the sample rate needs to be returned by
hdspm_external_sample_rate().Since this sample rate may contain any value with 1Hz granularity, we
need to round it to a common rate as done by the OSX driver.[Fixed missing function declarations by tiwai]
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
This commit introduces hdspm_get_pll_freq() to avoid code duplication.
Reading the sample rate from the DDS register will be required by
upcoming code.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
23 Jan, 2013
1 commit
-
This is a preliminary merge before the upcoming merge of generic parser
branch.
16 Jan, 2013
4 commits
-
With HDSP_TOGGLE_SETTING in place, these functions are no longer
required. Removing them makes the code DRY and considerably shorter.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
HDSP_TOGGLE_SETTING and its corresponding functions allow to change
settings in the control register. Instead of using the specialised
functions, use the generic code to make the code DRY.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
The driver contains multiple similar functions that change only a single
bit in the control register, only the bit position varies.This patch implements a generic function to toggle a certain bit
position that will be used to replace the old code.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
The current iobox detection code reportedly fails for various users, so
simply do what the Win32 driver does instead.Patch originally by Karl Grill and then modified to
comply with kernel coding guidelines + current HEAD.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
09 Jan, 2013
1 commit
-
Use correct bitmask for AES32 cards to determine wordclock lock state,
add missing bitmask for sync check and make output of the corresponding
control and /proc coherent.Signed-off-by: Andre Schramm
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
07 Dec, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Signed-off-by: Bill Pemberton
Signed-off-by: Takashi Iwai
03 Dec, 2012
3 commits
-
With HDSPM_TOGGLE_SETTING in place, these functions are no longer
required. Removing them makes the code DRY and considerably shorter.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
HDSPM_TOGGLE_SETTING and its corresponding functions allow to change
settings in the control register. Instead of using the specialised
functions, use the generic code to make the code DRY.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
The driver contains at least six similar functions that change only a
single bit in the control register, only the bit position varies.This patch implements a generic function to toggle a certain bit
position that will be used to replace the old code.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
23 Nov, 2012
2 commits
-
Reported-by: Fengguang Wu
Signed-off-by: Takashi Iwai -
As the recent firmware code tries to reread and cache the firmware by
itself, it's even better to keep the struct firmware data instead of
keeping a local copy. Also, it makes little sense to disable the fw
loader for this driver, so added the explicit dependency, too.Last, but not least, allocate the firmware data loaded via ioctl in
vmalloc'ed buffer instead, as the firmware size isn't that small.Signed-off-by: Takashi Iwai
08 Nov, 2012
1 commit
-
The RayDAT reports the sync status of its inputs in consecutive bit
positions, so all we do in hdspm_s1_sync_check is to iterate over idx:status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
lock = (status & (0x1<<private_value:
HDSPM_SYNC_CHECK("WC SyncCheck", 0),
HDSPM_SYNC_CHECK("AES SyncCheck", 1),
HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),The patch corrects the indicated sync flags by passing the proper index
value to hdspm_s1_sync_check().Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
04 Nov, 2012
1 commit
-
Correct spelling typo in debug messages within drivers/sound
Signed-off-by: Masanari Iida
Signed-off-by: Takashi Iwai
20 Oct, 2012
9 commits
-
checkpatch.pl discourages the use of spaces at the beginning of lines.
Some of the CTL_ELEM defines were not properly indented.This patch replaces the leading spaces by tabs. No functionality is
changed, the commit is purely cosmetic.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
According to the documentation, AES32 cards use a different bit position
for reporting the sync_in status.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
In contrast to AES32, MADI uses the first status register to report the
sync_in status.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
MADI and MADIface used to report the autosync_sample_rate. This
functionality was lost in commit
0dca1793063c28dde8f6c49c9c72203fe5cb6efc, this commit now adds it back.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
Missing breaks lead to a fall-through, thus causing the wrong
autosync_sample_rate to be reported.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
Due to missing breaks and the resulting fall-through, card subtype
selection was effectively missing, thus causing the wrong sync check
functions to be called.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
As a follow-up to a97bda7d29d02a2e9c6609d0947b15e55f5200e5, report the
external sample rate as system_sample_rate when in slave mode.For PCIe MADI cards, the DDS value automatically contains the external
sample rate, but the PCI version needs this manual workaround.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai -
The DDS value is the actual physical sample rate. We set it indirectly
when selecting 44100, 48000 and so on via snd_hdspm_hw_params or
hdspm_set_clock_source.This commit now allows the DDS value to be altered at runtime, thus
speeding up or slowing down the physical sample rate. This is required
for MADI's varispeed that allows for ±12.5% speed adjustment from the
"selected" rate (32kHz, 44100kHz, 48kHz and so on).Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
20 Aug, 2012
1 commit
-
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}//
Signed-off-by: Julia Lawall
Signed-off-by: Takashi Iwai
31 May, 2012
1 commit
-
On PCI RME MADI cards, the PLL register does not contain the proper
value, so the calculated system_sample_rate is wrong. In this case, we
simply return the cached rate from struct hdspm.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
21 May, 2012
1 commit
08 May, 2012
1 commit
-
snd_hdsp uses its own ioctls to acquire config- and status information.
Expose the corresponding ioctl handler via ioctl_compat, so that 32bit applications can use it on 64bit kernels.Signed-off-by: Andre Schramm
Reviewed-by: Adrian Knoth
Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
24 Apr, 2012
1 commit
-
Signed-off-by: Takashi Iwai
08 Mar, 2012
1 commit
-
snd_hdspm uses its own ioctls to acquire config- and status information.
Expose the corresponding ioctl handler via ioctl_compat, so that 32bit
applications can use it on 64bit kernels.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
11 Jan, 2012
1 commit
-
Before, /proc/asound looked like this:
2 [Default ]: HDSPM - RME RayDAT_f1cd85
RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18In case of a second HDSPM card, its name would be Default_1. This is
cumbersome, because the order of the cards isn't stable across reboots.To help userspace tools referring to the correct card, this commit
provides a unique id for each card:2 [HDSPMxf1cd85 ]: HDSPM - RME RayDAT_f1cd85
RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18In this example, userspace (configuration files) would then use
hw:HDSPMxf1cd85 to choose the right card.The serial is masked to 24bits, so this string is always shorter than
sixteen chars.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
10 Jan, 2012
1 commit
-
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_hdsp_info_pref_sync_ref() may lead to Oops. This function should
return an error immediately in such a case instead.Cc: Dan Carpenter
Signed-off-by: Takashi Iwai
08 Jan, 2012
1 commit
-
The serial number is used multiple times in hdspm.c. Since it belongs
to the card, let's store it in struct hdspm and refer to it whenever
necessary.Signed-off-by: Adrian Knoth
Signed-off-by: Takashi Iwai
19 Dec, 2011
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Signed-off-by: Rusty Russell
Signed-off-by: Takashi Iwai